雕刻时光

just do it……nothing impossible
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年5月3日

摘要: View Code #include<stdio.h>#include<math.h>__int64 gcd(int a,int b){ if(b==0)return a; else gcd(b,a%b);}int main(){ int c,n; while(scanf("%d%d",&c,&n),c&&n) { __int64 add=0; int i; for(i=1;i<=n;i++) { add+=(__int64)pow(c*1.0,gcd(n,i)*1.0); } if(n&1) //翻转的 阅读全文

posted @ 2011-05-03 22:35 huhuuu 阅读(295) 评论(0) 推荐(0) 编辑