P. 【例36.2】 计数问题

    Type: RemoteJudge 1000ms 128MiB

【例36.2】 计数问题

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

试计算在区间11nn的所有整数中,数字x(0x9)x(0≤x≤9) 共出现了多少次?例如,在111111中,即在11,22,33,44,55,66,77,88,99,1010,1111中,数字11 出现了 44 次。

输入格式

22 个整数 nn , xx ,之间用一个空格隔开。对于 100100% 的数据,1≤n≤1,000,000, 0x90≤x≤9

输出格式

11个整数,表示 xx 出现的次数。

样例

11 1
4

2025年夏令营新人班【查】4

Not Claimed
Status
Done
Problem
77
Open Since
2025-7-8 0:00
Deadline
2025-8-30 23:59
Extension
24 hour(s)