#K43892. Palindromic Numbers

    ID: 27410 Type: Default 1000ms 256MiB

Palindromic Numbers

Palindromic Numbers

Given a positive integer (N), find all palindromic numbers in the range ( [1, N] ) inclusive. A palindromic number is a number that reads the same backward as forward. For example, when (N = 15), the palindromic numbers are: 1, 2, 3, 4, 5, 6, 7, 8, 9, and 11. Your task is to output these numbers separated by a single space.

Example: Input: 15 Output: 1 2 3 4 5 6 7 8 9 11

inputFormat

The input consists of a single integer (N) ((1 \leq N \leq 10^5)) provided via standard input.

outputFormat

Output all palindromic numbers from 1 to (N) inclusive in increasing order, separated by a single space. The output should be written to standard output.## sample

15
1 2 3 4 5 6 7 8 9 11

</p>