Cod sursa(job #307380)
Utilizator | Data | 24 aprilie 2009 01:50:41 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include<fstream.h>
#include<math.h>
int main()
{
int a,b,s,d;
ifstream in("sumdiv.in");
ofstream out("sumdiv.out");
in >> a;
in >> b;
s = 0;
x = pow(a,b)
for (d=1; d<=x/2; d++)
s = s + d;
out << s % 9901;
}