3499: 数1的个数
Memory Limit:256 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
[md]
给定一个十进制正整数n(1≤n≤10000),写下从1到n的所有整数,然后数一下其中出现的数字“1”的个数。
例如当n=2时,写下1,2。这样只出现了1个“1”;当n=12时,写下1,2,3,4,5,6,7,8,9,10,11,12。这样出现了5个“1”。
[/md]
Sample Input Copy
12
Sample Output Copy
5