Function practice 1
Submit solution
C, C++, Python3
Points:
2
Time limit:
2.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
This practice problem will require you to programme basic functions.
Your task is to determine whether an integer is a palindrome. A palindrome is an integer that reads the same backward as forward, the following are some example palindromes:
1
121
5665
22
Input Specification
The first line will contain a single integer \(N\) (\(1 < N < 10000\)), indicating the number of test cases.
The following \(N\) lines will each contain a single integer \(P\) (\(1 < P < 100000000\)), for which you need to determine if it's a palindrome.
Output Specification
The output should contain \(N\) lines, each line a true
or false
, indicating
whether the \(i\)th input is a palindrome.
Sample Input
5
13
121
98780
5665
22
Sample Output
false
true
false
true
true
Comments