Describe
The number of non-negative integers of two not exceeding 200 bits is obtained.
The input has two lines, each of which is a non-negative integer that does not exceed 200 bits, and may have extra leading 0. The output line, that is, the result after the addition. The result can not have redundant leading 0, that is, if the result is 342, then you cannot output to 0342. Sample input
2222222222222222222233333333333333333333
Sample output
55555555555555555555
1#include <stdio.h>2#include <string.h>3 inta[1001]={0}, b[1001]={0};4 inti, KA, KB, k,c,temp,len;5 Chars[2002],ch;6 voidPlus ()7 {8 for(i =0; I < K; i++)9 {TenA[i] = A[i] + b[i] +C; One if(a[i]>=Ten) A{a[i]= a[i]%Ten; C=1;} - ElseC=0; - } the if(c>0) {a[k]=c; k++;} - } - intMain () - { +scanf"%s", s); -k=0; len=strlen (s); + while(k<len) A { ata[k]=s[k]-'0'; -k++; - } -Ka=K; -scanf"%s", s); -k=0; len=strlen (s); in while(k<len) - { tob[k]=s[k]-'0'; +k++; - } thekb=K; * if(Ka >= kb) k =Ka; $ ElsePanax NotoginsengK =kb; - for(i =0; I < ka/2; i++) the { +temp=A[i]; Aa[i]=a[ka-i-1]; thea[ka-1-I.] =temp; + } - for(i =0; I < kb/2; i++) $ { $temp=B[i]; -b[i]=b[kb-i-1]; -b[kb-1-I.] =temp; the } -C=0;Wuyi Plus (); the for(i = k-1; I >=0; i--) -printf"%d", A[i]); Wu return 0; -}//only nine of the total.
1-6-10: Large integer Addition