2018 Java Chapter 6 (Week 06)

From: 2018-09-01 00:00:00 To: 2018-11-13 00:00:00 Now: 2024-05-01 07:00:20 Status: Public

A - Palindrome 수

Time Limit: 1s Memory Limit: 128MB

Submissions: 837 Solved: 533
Description

정수를 입력으로 받아 palindrome 숫자인지 체크하는 프로그램을 작성하세요. 왼쪽에서 오른쪽으로 읽는 것과 오른쪽에서 왼쪽으로 읽는 것이 동일할 경우 palindrome 숫자라고 합니다.

Write a test program that prompts the user to enter an integer and reports whether the integer is a palindrome. A number is palindrome if it reads the same from right to left and from left to right.

Input

* Line 1 : 테스트케이스 T (1~1,000)

* Line 2 ~ T+1 : 정수 (1~1,000,000)

 

Output

* Line 1 ~ T : palindrome 숫자일 경우 Y, 아닐경우 N을 출력

 

Sample Input
4
1
1221
12321
132
Sample Output
Y
Y
Y
N
Source

JAVA2015 PE6.3