JOIN
Get Time

   Problem Statement  

 Problem Statement for IntegerPalindrome

Problem Statement

    

A positive integer is called a palindrome if it reads the same forward and backward. Integers containing leading zeros are not valid. For example, 12321 is a palindrome, but 123210 is not. You are given an int K. Return the K-th palindrome, where the 0th palindrome is 1, the 1st palindrome is 2, etc.

 

Definition

    
Class:IntegerPalindrome
Method:findByIndex
Parameters:int
Returns:long
Method signature:long findByIndex(int K)
(be sure your method is public)
    
 

Constraints

-K will be between 0 and 1000000000 (109), inclusive
 

Examples

0)
    
8
Returns: 9
1)
    
9
Returns: 11
2)
    
19
Returns: 111
3)
    
235
Returns: 13731
4)
    
23746
Returns: 137484731

This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.

This problem was used for:
       Single Round Match 302 Round 1 - Division I, Level Two