Mai intai trebuie sa te autentifici.
Cod sursa(job #129417)
Utilizator | Data | 29 ianuarie 2008 13:50:26 | |
---|---|---|---|
Problema | Suma divizorilor | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
# include <fstream.h>
# include <math.h>
//using namespace std;
long a,b;
long long x,S;
ifstream fin ("sumdiv.in");
ofstream fout ("sumdiv.out");
int main ()
{
fin>>a>>b;
x=pow(a%9901,b%9901);
for (long long i=1;i<sqrt(x);i++)
if (x%i==0)
{
S=(S+i)%9901;
S=(S+x/i)%9901;
}
if (sqrt(x)== (long long )sqrt(x))
S+=(sqrt(x))%9901;
fout<<S%9901<<"\n";
return 0;
}