标签:bit nbsp typedef for 吐槽 load type name logs
出题人怎么这么不认真啊==明明官方译名是爱蜜莉雅……
而且我们爱蜜莉雅碳是有英文名哒!是Emilia。你那个aimiliya我实在是无力吐槽……
不过抱图跑23333
1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 ll n; 5 ll calcsum(ll n){ 6 int m=(int)sqrt(n+0.5); 7 ll cnt=0,ans=0; 8 for(int i=1;i<=m;i++){ 9 if(n%i==0){ 10 ans+=i;if(i*i!=n)ans+=n/i; 11 else break; 12 } 13 } 14 return ans; 15 } 16 ll calcphi(ll n){ 17 int m=(int)sqrt(n+0.5); 18 ll ans=n; 19 for(int i=2;i<=m;i++)if(n%i==0){ 20 ans=ans/i*(i-1); 21 while(n%i==0)n/=i; 22 if(n==1)break; 23 } 24 if(n>1)ans=ans/n*(n-1); 25 return ans; 26 } 27 int main(){ 28 freopen("aimiliyadehelp.in","r",stdin); 29 freopen("aimiliyadehelp.out","w",stdout); 30 cin>>n; 31 cout<<calcsum(n)-calcphi(n)<<endl; 32 return 0; 33 }
标签:bit nbsp typedef for 吐槽 load type name logs
原文地址:http://www.cnblogs.com/zcysky/p/6893284.html