Productive Math Class

View as PDF

Submit solution

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

Authors:
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

17

Sample Output 1

3

Sample Input 2

2034525

Sample Output 2

5

Comments


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

    The Booster Cushions of the Pre-pre-windsor