Cod sursa(job #1040939)
Utilizator | Data | 25 noiembrie 2013 10:39:36 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<fstream>
#include<cmath>
#define mod 9901
using namespace std;
long long n,i,s,m,p;
int main()
{
ifstream f("sumdiv.in");
ofstream g("sumdiv.out");
f>>n>>m;
p=pow(n,m);
for(i=1;i<=p;i++)
if(p%i==0)
s+=i%mod;
g<<s;
return 0;
}