Problem
Input format
The program reads from standard input a single non-negative integer `n`. - `0 <= n <= 1000000` - it is recommended to implement a separate function that checks whether a number is a palindrome
Output format
The program prints to standard output a single non-negative integer: the smallest palindrome `p` satisfying `p >= n`, followed by a newline.
Example
123
131
Stuck?
Use the Get Hint button in the action bar to reveal a guided hint.
💬 Discussion
Loading...No comments yet. Be the first to start the discussion!
Sample cases (from the problem)
Sample Case 1
123
131
Solve it your way first
Community solutions unlock after you submit a passing solution. Don't peek.
Ready to solve this challenge?
Create a free account to write code, submit solutions, and track your progress.