시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 142 | 107 | 93 | 77.500% |
Gug finds the classic FizzBuzz problem to be too boring, and has decided to add a twist to it. Print a list of consecutive integers, one on each line, starting with S on the first line and ending with E on the last line. As Gug likes palindromes, print the string Palindrome!
in place of an integer if it is palindromic, i.e. it can be read the same way forwards and backwards.
Your program must read from standard input. The input is a line with 2 integers, S and E, in a single line.
Your program must print to standard output. Output E − S + 1 lines, with each line containing either an integer or the string Palindrome!
if the integer is palindromic.
8 13
Palindrome! Palindrome! 10 Palindrome! 12 13
3 3
Palindrome!
999999997 1000000000
999999997 999999998 Palindrome! 1000000000