Pagini recente » Cod sursa (job #493882) | Statistici Nguyen Tan Bao (farmerboy) | Cod sursa (job #192512) | Cod sursa (job #125892) | Cod sursa (job #129418)
Cod sursa(job #129418)
# 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+=(long long)((sqrt(x)))%9901;
fout<<S%9901<<"\n";
return 0;
}