~/algor $ cat contests/round-8/G
G. Swap the outer digits
Problem G
ICPC rules
1000 ms
64 MB
A four-digit positive integer is given. Find the number obtained by swapping its first and last digits: gives . Leading zeros of the result are not written: for example, gives .
Input
One four-digit positive integer .
Output
One integer — the number with swapped outer digits.
Note
Examples
Input #1
1234
Output #1
4231
Input #2
1230
Output #2
231