Cod sursa(job #305318)
Utilizator | Data | 16 aprilie 2009 22:36:56 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include<fstream.h>
int main()
{
long long s=0,a,b,p,i;
ifstream f("sumdiv.in");
ofstream g("sumdiv.out");
f>>a>>b;
p=1;
for (i=1;i<=b;i++)
p=p*a;
for (i=1;i<=p;i++)
if(p%i==0)s=s+i;
s=s%9901;
g<<s;
f.close();
g.close();
return 0;
}