摘要: View Code 1 //杭电1297Children’s Queue 2 //关于大整数加法 3 #include<stdio.h> 4 #include<string.h> 5 6 char* add(char* s1,char* s2)//用指针定义变量 7 { 8 int len1,len2,i,j,k,p; 9 int a[1009],b[1009];10 int max;11 char s3[1009];12 len1=strlen(s1);13 len2=strlen(s2);14 max=len1;15 if... 阅读全文
posted @ 2012-07-11 11:36 zlyblog 阅读(274) 评论(0) 推荐(0)
摘要: View Code 1 //1284钱币兑换问题 2 //用1分 2分 3分 3 #include<stdio.h> 4 int main() 5 { 6 int n,j; 7 __int64 sum; 8 while(scanf("%d",&n)!=-1) 9 { sum=0;10 for(j=0;j<=n/3;j++)11 sum+=(n-j*3)/2+1;12 printf("%I64d\n",sum);13 }14 return 0;15 } 阅读全文
posted @ 2012-07-11 11:08 zlyblog 阅读(186) 评论(0) 推荐(0)