随笔分类 -  大数(LargeNumber)

摘要:/*总结: 1.不要忘了溢出 2.单独处理最高位的加法更容易些。summary: 1.The overflow of addition of large numbers should be noticed. 2.It's easier to deal with the highest bit when adding,I think.*/#include <stdio.h>#include <string.h>#include <memory.h>int main(){ char srca[1000], srcb[1000]; int dsta[... 阅读全文
posted @ 2011-09-14 14:53 SunnyDay2015 阅读(372) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>using namespace std;const int baseLength = 6;const int MAX = 200;char a[baseLength]={0}; //base///不要思维定势地以为b也要用字符数组来保存///Don't think b as array,a integer type is enoughint b = 0; //indexint c[MAX] = {0}; ... 阅读全文
posted @ 2011-07-06 18:39 SunnyDay2015 阅读(544) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示