#K83177. Reverse Digits

    ID: 36140 Type: Default 1000ms 256MiB

Reverse Digits

Reverse Digits

Given a non-negative integer N, reverse its digits and remove any leading zeros from the reversed number.

For example, if N = 1200, then the digits reversed are "0021" which becomes 21 after removing the leading zeros. In mathematical terms, if
\(N = d_1d_2\ldots d_k\), then the reversed number is given by
\(d_k\ldots d_2d_1\), with any leading zeros removed.

inputFormat

The first line contains an integer T representing the number of test cases. Each of the following T lines contains a non-negative integer N.

outputFormat

For each test case, output a single line containing the reversed integer with any leading zeros removed.

## sample
3
1200
12345
100
21

54321 1

</p>