Cod sursa(job #873499)
Utilizator | Data | 7 februarie 2013 12:06:58 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 20 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;
ifstream f("sumdiv.in");
ofstream g("sumdiv.out") ;
int main()
{
long long A,B;
int S,c,i;
f>>A;
f>>B;
f.close () ;
c=pow(A,B) ;
for (i=1;i<=c;i++)
S+=i ;
g<<S%9901 ;
g.close () ;
return 0 ;
}