Cod sursa(job #305360)
Utilizator | Data | 17 aprilie 2009 00:22:57 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<fstream.h>
#include<math.h>
long int A,B,C,d,i,j,s;
int main ()
{
ifstream in("sumdiv.in");
ofstream out("sumdiv.out");
in>>A;
in>>B;
C=pow(A,B);
for (j=1;j<=C;j++)
{ if (C%j==0) s=s+j; }
out<<s%9901;
in.close();
out.close();
return 0;
}