摘要: find your present (2)Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/1024 K (Java/Others) Total Submission(s): 13802 Accepted Submission(s): 5194 Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, 阅读全文
posted @ 2013-12-20 22:48 陈泽泽 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 int func(int n,int k) 3 { 4 int a,b=0; 5 a=n; 6 while(a!=0) 7 { 8 b+=a%k; 9 a=a/k;10 }11 return b;12 }13 int main()14 {15 int a,b,n;16 while(scanf("%d",&n)!=EOF&&n)17 {18 int x1,x2,x3,x4;19 x1=func(n,10);20 ... 阅读全文
posted @ 2013-12-20 22:10 陈泽泽 阅读(236) 评论(0) 推荐(0) 编辑