Reverse The Number FLOW007 - codechef solutions

Reverse The Number  FLOW007 - codechef solutions
Reverse The Number  FLOW007 - codechef solutions

Problem :-

Given an Integer N, write a program to reverse it.

Input

The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer N.

Output

For each test case, display the reverse of the given number N, in a new line.

Constraints

  • 1 ≤ T ≤ 1000
  • 1 ≤ N ≤ 1000000


Example 

Input :

4
12345
31203
2123
2300 

Output :

54321
30213
3212
32 


Solution :-

1
2
3
4
5
6
7
8
9
# cook your dish here
num = int(input())

for i in range(num):
    a = input()
    str = ""
    for i in a:
        str = i+str
    print(int(str))



Disclaimer :-
the above hole problem statement is given by codechef.com but the solution is generated by the codeworld19 authority if any of the query regarding this post or website fill the following contact form thank you.


Next Post Previous Post
No Comment
Add Comment
comment url