随笔分类 -  大数

大数相乘
摘要:比赛中经常会遇到大数问题,自己写了一个大数相乘的模板,可能会有Bug,先凑合看吧;#include#includeconst int M = 100;void GetDigit(char s[],int a[]){ int i; memset(a,0,sizeof(int)*M); int len = strlen(s); for(i = 0; i = 0; i--) printf("%d",c[i]); printf("\n"); } return 0;} 阅读全文
posted @ 2013-09-29 18:50 straw_berry 阅读(191) 评论(0) 推荐(0)
Cut the Cake(大数相乘)
摘要:MMM got a big big big cake, and invited all her M friends to eat the cake together. Surprisingly one of her friends HZ took some (N) strawberries which MMM likes very much to decorate the cake (of course they also eat strawberries, not just for decoration). HZ is in charge of the decoration, and he 阅读全文
posted @ 2013-09-28 20:50 straw_berry 阅读(347) 评论(0) 推荐(0)