| ||||||||||
| 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 | |||||||||
Re:100题贴代码In Reply To:100题贴代码 Posted by:zhjou at 2014-06-08 23:43:00 > 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