#K1536. Reverse Each Number in a String
Reverse Each Number in a String
Reverse Each Number in a String
You are given a single line containing non-negative integers separated by spaces. Your task is to reverse the digits of each integer individually while preserving their order. For example, reversing 980 results in 089.
Note: Leading and trailing whitespaces should be ignored. If the input is empty, output an empty string.
Examples:
- Input:
123 456 789
→ Output:321 654 987
- Input:
980 71 324
→ Output:089 17 423
inputFormat
The input consists of a single line containing a series of non-negative integers separated by spaces. Leading and trailing spaces should be ignored.
outputFormat
Output a single line where each integer from the input is reversed. The integers must appear in the same order as in the input, separated by a single space.
## sample123 456 789
321 654 987