UVa 10018 - Reverse and Add

10018 - Reverse and Add

 * http://acm.uva.es/p/v100/10018.html

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

Explanation
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
3 195 265 750

Output
4 9339 5 45254 3 6666