随笔分类 -  大数问题

摘要:描述我们都知道如何计算一个数的阶乘,可是,如果这个数很大呢,我们该如何去计算它并输出它?输入输入一个整数m(0 3 #include 4 #define M 20000 5 int shu[M]; 6 7 int main() 8 { 9 int m, i, n, b, t, e;10 while(scanf("%d", &m) != EOF){11 12 memset(shu, 0, sizeof(shu));13 shu[0] = 1;14 n = 0;/*n表示存放进位*/15 for(i = 1; i ... 阅读全文
posted @ 2013-08-19 22:34 心中的阿哲 阅读(140) 评论(0) 推荐(0)
摘要:Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1 2 #include 3 int main() 4 { 5 6 int x, sa[1001], sb[1001], k = 1, i, j, m, n, t, d; 7 char a[1001]... 阅读全文
posted @ 2013-07-29 17:11 心中的阿哲 阅读(208) 评论(0) 推荐(0)