#K91297. Taco Palindrome Check
Taco Palindrome Check
Taco Palindrome Check
This problem tasks you with determining whether a given integer is a palindrome. An integer is said to be a palindrome if it remains the same when its digits are reversed. Formally, for an integer \(N\) having digits \(d_1d_2\ldots d_k\), it is a palindrome if \(d_i = d_{k-i+1}\) for all \(1 \leq i \leq k\).
You are given \(T\) test cases. For each test case, read an integer and check if it is a palindrome. Print YES
if it is, and NO
otherwise, each on a new line.
inputFormat
The first line contains an integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains a single integer \(N\).
outputFormat
For each test case, output a single line containing YES
if the given number is a palindrome, and NO
otherwise.
4
121
12321
123
1221
YES
YES
NO
YES
</p>