https://www.spoj.pl/problems/ADDREV/
問題文を翻訳。

42. Adding Reversed Numbers/裏向き数字の足し算

The Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure some tragedies into comedies. Obviously, this work is very hard because the basic sense of the play must be kept intact, although all the things change to their opposites. For example the numbers: if any number appears in the tragedy, it must be converted to its reversed form before being accepted into the comedy play.
マリディネシアの伝統喜劇作家たちは悲劇より喜劇が好きなのですが、伝統的なギリシャ演劇は悲劇なのがふつうです。
そこで彼らは、いくつかの悲劇を喜劇に書きなおしてみることにしました。もちろん、エッセンスを損なわずにまるきり反対の物語を書き直すのは大変な作業です。たとえば、悲劇に出てくる数字は、喜劇では裏向き数字にされなくてはいけません。

Reversed number is a number written in arabic numerals but the order of digits is reversed. The first digit becomes last and vice versa. For example, if the main hero had 1245 strawberries in the tragedy, he has 5421 of them now. Note that all the leading zeros are omitted. That means if the number ends with a zero, the zero is lost by reversing (e.g. 1200 gives 21). Also note that the reversed number never has any trailing zeros.
裏向き数字とは、10進表記アラビア数字の並びを逆にしたものです。最初の桁が最後の桁に、最初から2桁目が最後から2桁目に、という具合です。例を挙げてみましょう。ヒーローが1245個の木イチゴを持っているなら、書きなおされた脚本では5421個になるのです。裏向き数字では、ゼロは無視されることに気をつけてください。つまり、0で終わる数字を裏向きにすると、その0は失われてしまいます。(1200を裏向きにすると、21になります)同様に、裏向きにされた数字は、下の桁に0を含まないことになります。

ACM needs to calculate with reversed numbers. Your task is to add two reversed numbers and output their reversed sum. Of course, the result is not unique because any particular number is a reversed form of several numbers (e.g. 21 could be 12, 120 or 1200 before reversing). Thus we must assume that no zeros were lost by reversing (e.g. assume that the original number was 12).
伝統喜劇作家たちは裏向き数字を計算する必要があります。あなたの課題は、ふたつの裏向き数字を足し算して、その結果を裏向きにして出力することです。もちろん、これでは結果を1つに絞ることができません。というのも、裏向き数字にされた時点で、元の数字からいくつの0が取り除かれたのかはわからないからです。(裏向き数字の21は、もとは12だったのかもしれませんし、120だったのかも、1200だったのかもしれません)というわけで、ここでは裏向きにされたときに失われた0はないとして計算することにしましょう。(もとの数字は12だったとして考える、ということです)

Input

The input consists of N cases (equal to about 10000). The first line of the input contains only positive integer N. Then follow the cases. Each case consists of exactly one line with two positive integers separated by space. These are the reversed numbers you are to add.
N個のテストケースが入力されます(だいたい10000個です)。最初の1行は正の整数で、その後に続くテストケースの数を示しています。それぞれのテストケースはかならず1行に収まっていて、2つの正の整数がスペースで区切られています。その整数が、あなたが足し算する裏向き数字です。

Output

For each case, print exactly one line containing only one integer - the reversed sum of two reversed numbers. Omit any leading zeros in the output.
各テストケースにつき、1つの整数のみを含む1行を出力してください。計算途中で頭に0が付いた場合は、ちゃんと取り除いてくださいね。

Example

Sample input:

3
24 1
4358 754
305 794

Sample output:

34
1998
1

ちょっと考えてみるけど、これは意外と簡単なのかも?
(木に触るべき?)