/ OPS / 题库 /

how many 1s

how many 1s

#描述#
Given a decimal positive integer N. Write from 1 to N for all integers, and then count the number of '1' which appears.

#格式#
##输入格式##
input a single integer N (1 ≤ N ≤ 100000000)

##输出格式##
the number of '1'.

#样例1#
##样例输入1##

1
2
10
15

##样例输出1##

1
1
2
8

#限制#
1000ms
32768KB

#提示#

#来源#
modify from zjfu

信息

ID
1807
难度
10
分类
category1 点击显示
标签
递交数
10
已通过
0
通过率
0%
上传者