#P7257. [COCI 2009/2010 #3] FILIP

[COCI 2009/2010 #3] FILIP

Description

You are given two positive decimal integers a,ba, b. Output the larger number after reversing these two numbers.

The definition of “reverse” in this problem is explained in the “Hint” section.

Input Format

The first line contains two positive decimal integers a,ba, b.

Output Format

Output the larger number after reversing aa and bb.

734 893

437
221 231

132
839 237

938

Hint

Definition of “reverse” in this problem

Suppose the original number has ff digits: the highest digit is a1a_1, the second digit is a2a_2, \ldots, and the ff-th digit is afa_f.

Then the reversed number also has ff digits: the highest digit is afa_f, the second digit is af1a_{f - 1}, \ldots, and the ff-th digit is a1a_1.

Constraints

For 100%100\% of the testdata, 100a,b999100 \le a, b \le 999, and a,ba, b do not contain the digit 00.

Notes

Translated from COCI 2009-2010 #3 T1 FILIP. Full score is 30 points, 3 points per test case, with 10 test cases in total.

Translated by ChatGPT 5