21958_DigitsCoun

2022-5-16 18:20| 发布者: Hocassian| 查看: 23| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505993517600-Problem List-采集的数据-后羿采集器.html

Pro.ID

21958

Title

Digits Count

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21958

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/65536 K (Java/Others)
  • 描述

    Diana is going to write a list of all positive integers between A and B, inclusive, in base 10 and without any leading zeros. She wants to know how many times each digit is going to be used.

    输入

    Each test case is given in a single line that contains two integers A and B (1 ≤ AB ≤ 108).

    The last test case is followed by a line containing two zeros.

    输出

    Description

    Diana is going to write a list of all positive integers between A and B, inclusive, in base 10 and without any leading zeros. She wants to know how many times each digit is going to be used.

    Input

    Each test case is given in a single line that contains two integers A and B (1 ≤ AB ≤ 108).

    The last test case is followed by a line containing two zeros.

    Output

    For each test case output a single line with 10 integers representing the number of times each digit is used when writing all integers between A and B, inclusive, in base 10 and without leading zeros. Write the counter for each digit in increasing order from 0 to 9.

    Sample Input

    1 9
    12 321
    5987 6123
    12345678 12345679
    0 0

    Sample Output

    0 1 1 1 1 1 1 1 1 1
    61 169 163 83 61 61 61 61 61 61
    134 58 28 24 23 36 147 24 27 47
    0 2 2 2 2 2 2 2 1 1

    Source

    样例输入

    1 9
    12 321
    5987 6123
    12345678 12345679
    0 0

    样例输出

    0 1 1 1 1 1 1 1 1 1
    61 169 163 83 61 61 61 61 61 61
    134 58 28 24 23 36 147 24 27 47
    0 2 2 2 2 2 2 2 1 1

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部