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.

Input

The only line of the input contains a single integer n (1 ≤ n ≤ 1000) — the position of the digit you need to print.

Output

Print the n-th digit of the line.

Examples
input
3
output
3
input
11
output
0
不会模拟,只能打表
#include<stdio.h>
char s[]={""};
int main()
{
int n;
scanf("%d",&n);
printf("%c\n",s[n-]);
}

最新文章

  1. SpringMVC整合Hibernate实现增删改查之按条件查询
  2. VS2010部署Asp.net程序到本地IIS 7
  3. ubuntu14.04完全卸载mysql
  4. JS判断是否是IE浏览器
  5. Java内存模型--JMM简介
  6. Java 设计模式学习总结(下)
  7. ###学习《C++ Primer》- 5
  8. 10 个用于收集硬件信息的 Linux 命令
  9. ARM处理器架构的Thumb指令集中关于IT指令的使用
  10. 理解WebKit和Chromium: Android 4.4 上的Chromium WebView
  11. 自定义GridLookUpEdit编辑器
  12. WebDriver下载地址
  13. 一款我常用到的手机app
  14. POJ-3273(二分)
  15. JavaScript 事件处理详解
  16. container-diff 谷歌开源镜像分析工具使用
  17. HYSBZ - 2818莫比乌斯反演
  18. jq on方法绑定多个事件
  19. Nexus 5 Change FireFox OS to android
  20. uva10256

热门文章

  1. 自己动手编译hadoop-2.5.2源码
  2. linux 下查mac
  3. openfire 服务器名称:后面的黄色叹号
  4. 13.代理模式(Proxy Pattern)
  5. 对Object类中方法的深入理解
  6. 【翻译二十】-java线程池
  7. Visual Studio Code 1.0发布:100+语言,300+pull请求,1000+扩展
  8. C语言中结构体的位域(bit-fields)
  9. WPF线程(Step1)&mdash;&mdash;Dispatcher
  10. Accelerating Matlab