0101少儿编程
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
IDE下载
Login
Register
6066: 【入门3】计数问题
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:17
Solved:7
Submit
Submit Record
Statistics
ShowOff!
Description
试计算在区间
1
1
到
�
n
的所有整数中,数字
�
x
(
0
≤
�
≤
9
0
≤
x
≤
9
)共出现了多少次?例如,在
1
1
到
11
1
1
中,即在
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
1
0
,
1
1
中,数字
1
1
出现了
4
4
次。
Input
2
个整数
�
,
�
n
,
x
,之间用一个空格隔开
Output
1
个整数,表示
�
x
出现的次数
Sample Input
Copy
11 1
Sample Output
Copy
4
HINT
数据范围:
100
%
对于
1
0
0
%
的数据,
1
≤
n
≤
1
0
6
,
0
≤
�
≤
9
0
≤
x
≤
9
。
1
≤
�
≤
1
0
6
Source/Category
循环结构
洛谷
Submit
Submit Record
Statistics
ShowOff!