摘要:
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1002 A + B Problem II 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<=T<=20) which means the number of test case 阅读全文
posted @ 2011-04-12 17:39
淡墨æ末央
阅读(568)
评论(0)
推荐(0)
摘要:
大数加法void jial( ){ memset( sun,0,sizeof( sun ) ); int len1 = strlen( str1 ),len2 = strlen( str2 ); for( int i = 0; i < ( len1 > len2 ? len1 : len2 ); ++i )//转换成ASCII码 str1[i] -= '0',str2[i] -= '0'; for( int p = 0, q = len1 - 1; p < q; ++p , --q ) //逆序 { char c = str1[q]; str1 阅读全文
posted @ 2011-04-12 17:30
淡墨æ末央
阅读(431)
评论(0)
推荐(0)

浙公网安备 33010602011771号