Description
Give two positive integer A and B,calucate A+B.
Notice that A,B is no more than 500 digits.
Input
The test case contain several lines.Each line contains two positive integer A and B.
Output
For each input line,output a line contain A+B
Sample Input
2 3
1231231231823192 123123123123123
1000000000000000 1
Sample Output
5
1354354354946315
1000000000000001
------------------------------------------------------------------------------------------------
Source Code :
Problems:
1、忘了把字符串要进行转置。
2、在写转 置函数的时候,没有写正确
在for 循环中,少了&& i < ( l- 1 - i ) , 导致会出现问题。实际上,在要进行交换的时候,应该是要交换的前一个的索引要比后一个小才进行,所以要加上这个条件。
3、少了对于a[i] = '/0' ;的处理。
应该加上如下代码:
否则,在
a = 1 ;
b = 9999 ;
会出现问题。
编程水平下降了,唉!