PAT (Advanced Level) 刷题记录 1049 Counting Ones (30分)
1049 Counting Ones (30分)
The task is simple: given any positive integer N, you are supposed to count the total number of 1’s in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1’s in 1, 10, 11, and 12.
Input Spec
原创
2020-05-18 21:03:28 ·
161 阅读 ·
0 评论