Reverse Number Problem Statement
Ninja is exploring new challenges and desires to reverse a given number. Your task is to assist Ninja in reversing the number provided.
Note:
If a number has trailing zeros, they should be omitted in its reversed form. For instance, the reverse of 10400 will be 401 instead of 00401.
Input:
The first line contains an integer 'T' indicating the number of test cases.
Each test case consists of a single line containing an integer 'N', the specified number.
Output:
For each test case, print the reversed number.
Output each result on a new line.
Constraints:
1 <= T <= 5
1 <= N <= 1018
- Time Limit = 1 sec
Note:
No need to handle input or output display. Your task is to implement the function to find the reverse only.
Be the first one to answer
Add answer anonymously...
Top Accenture Software Developer interview questions & answers
Popular interview questions of Software Developer
Top HR questions asked in Accenture Software Developer
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app