Cod sursa(job #471334)
| Utilizator | Data | 18 iulie 2010 11:10:54 | |
|---|---|---|---|
| Problema | Suma si numarul divizorilor | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.53 kb |
#include<fstream>
using namespace std;
const int MOD=9973;
ifstream fin ("ssnd.in");
ofstream fout ("ssnd.out");
int t,x,d,nr,k;
long long s,a,S,D,nrd,i;
int main(){
fin>>t;
for(i=1;i<=t;++i){
fin>>x;
d=2;
nr=1;
while(x>1){
if(x%d==0)
{
k=0;
D=1;
S=1;
while(x%d==0)
{
D*=d;D%=MOD;
S+=d;
S%=MOD;
++k;
x/=d;
}
nrd*=k+1;
s*=S;
s%=MOD;
}
d++;
}
}
return 0;
}
