VMSS Pre-Pre-Windsor P5 - 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 (1N109). Could you be a dear and help Jerry out?

Input Specification

A single integer N (1N109).

Output Specification

The Nth digit in the sequence of all natural numbers.

Sample Input 1

Copy
17

Sample Output 1

Copy
3

Sample Input 2

Copy
2034525

Sample Output 2

Copy
5

Comments