| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
100题贴代码main()
{
long long s,n,x,r,i;
while(scanf("%I64d",&n)+1){
s=1;
for(i=2;i*i<=n;i++){
if(n%i==0){
x=1;r=0;
while(n%i==0){
n/=i;x*=i;
r++;
}
s*=(r+1)*x-r*x/i;
}
}
if(n>1)s*=2*n-1;
printf("%I64d\n",s);
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator