303471: CF672A. Summer Camp
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Summer Camp
题意翻译
有一个字符串,它把所有正整数写在一起,是这样的:"1234567891011121314......" 输入N,输出这个字符串的第N位(N<=1000)。题目描述
Every year, hundreds of people come to summer camps, they learn new algorithms and solve hard problems. This is your first year at summer camp, and you are asked to solve the following problem. All integers starting with $ 1 $ are written in one line. The prefix of these line is "123456789101112131415...". Your task is to print the $ n $ -th digit of this string (digits are numbered starting with $ 1 $ .输入输出格式
输入格式
The only line of the input contains a single integer $ n $ ( $ 1<=n<=1000 $ ) — the position of the digit you need to print.
输出格式
Print the $ n $ -th digit of the line.
输入输出样例
输入样例 #1
3
输出样例 #1
3
输入样例 #2
11
输出样例 #2
0