Palindrome numbers
Practice
3.5 (25 votes)
Binary search
Math basic
Algorithms
Basic math
Math
Problem
9% Success 3449 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
A palindromic number is a number that remains the same when its digits are reversed. Your task is to get the \(k^{th}\) palindrome number greater than or equal to \(X\).
Input format
- First line: Integer \(T\) denoting the number of test cases
- Each of the following \(T\) lines:
- First line: Two space-separated integers \(X\) and \(K\)
Output format
Print \(T\) lines, each line contains the answer for the \(i^{th}\) case.
Constraints
\(1 \leq X,\ K \leq 10^9\)
Submissions
Please login to view your submissions
Similar Problems
Points:20
11 votes
Tags:
MathematicsOpenApprovedEasyMathamatics
Points:20
11 votes
Tags:
Basic ProgrammingOpenApprovedEasyMathamatics
Points:20
15 votes
Tags:
MathematicsEasyMathematicsMathematicsMathamatics
Editorial