-->
当前位置:首页 > 题库

PROGRAMMING:Inverse number addition

Luz5年前 (2021-05-10)题库425
Reverse number is to write an Arabic numeral in reverse order. Write the first number as the last, and so on. For example, 1245 has a reverse number of 5421. Note that all leading zeros of a number are omitted, so if there is a zero at the end of the number, the zero is omitted when writing the reverse number (for example, the reverse number of 1200 is 21). Also note that the reverse number does not end with zero.
Your task is to add two reverse numbers and output their reverse sum. Of course, the result is not unique, because a number can be the reverse of several numbers (for example, 21 can be 12120 or 1200 in the reverse direction). For this reason, the setting of no 0 in this problem is lost due to reverse (for example, setting the original number to be 12).
###Input format:
The input consists of N test cases. The first line of input only gives the positive integer n, and then gives the test case. Each test case consists of two positive integers separated by spaces, which are the numbers to be added in reverse.
###Output format:
For each test case, output a line containing only one integer, sum the two reverse numbers, and then reverse them. Omit leading 0 in output.
###Input example:
```in
three
24 1
4358 754
305 794
```
###Output example:
```out
thirty-four
one thousand nine hundred and ninety-eight
one
```







answer:If there is no answer, please comment