Task
Time limit:
1000 ms,
Memory limit:
256 Mb
Given a natural number N. Get the number obtained by rearranging the digits of the original number in the reverse order. Display the new number and the difference between the original number and the converted
Input: one natural number is entered
Output: In the first line print the number obtained by rearranging the digits of the original number in the reverse order (without insignificant zeros)
In the second line print one number - the difference between the original number and the new number
Example
№ |
Input |
Output |
1 |
2010 |
102
1908 |
Prohibited statements:list;[;find;index;reverse;string