Productive Math Class

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 64M

Problem type

Today in period 8/9 math, Jerry decided to distract Mr. Ing by writing down every single natural number in the entire known universe in ascending order (it was a very long class). He’s also forgotten to put some commas, and he needs your help in determining the Nth digit in his sequence (1 \le N \le 10^9). Could you be a dear and help Jerry out?

Input Specifications

A single integer N (1 \le N \le 10^9).

Output Specifications

The Nth digit in the sequence of all natural numbers.

Sample Input 1


Sample Output 1


Sample Input 2


Sample Output 2



  • 1
    Plasmatic  commented on Oct. 18, 2018, 8:39 p.m.

    The Booster Cushions of the Pre-pre-windsor