UVa 10018

From Algorithmist
Jump to navigation Jump to search

10018 - Reverse and Add[edit]

Summary[edit]

Straightforward problem. The result will fit in unsigned int, so be careful depending on your programming language and everything should be okay.

Explanation[edit]

You can use shift and mod to get the digits and reverse them, and then just compare. The constraints on the problem ensures that you do not need something like BigNum.

Input[edit]

3
195
265
750

Output[edit]

4 9339 
5 45254 
3 6666

Solutions[edit]