杭电计算机笔试题
第一题是:一个长整型的数,从低位起取出奇数位组成一个新的数输出。
第二题是杭电acm1002题。
a + b problem ii
problem description
i have a very simple problem for you. given two integers a and b, your job is to calculate the sum of a + b.
input
the first line of the input contains an integer t(1<=t<=20) which means the number of test cases. then t lines follow, each line consists of two positive integers, a and b. notice that the integers are very large, that means you should not process them by using 32-bit integer. you may assume the length of each integer will not exceed 1000.
output
for each test case, you should output two lines. the first line is "case #:", # means the number of the test case. the second line is the an equation "a + b = sum", sum means the result of a + b. note there are some spaces int the equation. output a blank line between two test cases.
sample input
2
1 2
112233445566778899 998877665544332211
sample output
case 1:
1 + 2 = 3
case 2:
112233445566778899 + 998877665544332211 = 1111111111111111110
【杭电计算机笔试题】相关文章: