Cod sursa(job #561253)
Utilizator | Data | 19 martie 2011 14:11:24 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<fstream.h>
#include<conio.h>
#include<math.h>
void main()
{
clrscr();
int n, a, b, sd, d, i;
ifstream in("sumdiv.in");
in>>a>>b;
in.close();
n=pow(a, b);
sd=1;
for(d=2;d<=n;d++)
if(n%d==0)sd=sd+d;
i=sd%9901;
ofstream out("sumadiv.out");
out<<i;
out.close();
}