22840_DictionaryNumbers

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

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

Pro.ID

22840

Title

Dictionary Numbers

Title链接

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

AC

11

Submit

40

Ratio

27.50%

时间&空间限制

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

    The number 79 becomes "seven nine" when translated digit by digit into a string of words. Likewise 80 becomes "eight zero"

    When sorted as numbers, 79 comes before 80. But as a translated string, the number "eight zero" comes before "seven nine" in dictionary order.

    Write a program that reads two whole numbers M and N (1 ≤ M < N ≤ 999) and finds the first and last numbers in dictionary order of the numbers in the range M..N inclusive

    输入

    A single line with two integers: M and N

    输出

    Description

    The number 79 becomes "seven nine" when translated digit by digit into a string of words. Likewise 80 becomes "eight zero"

    When sorted as numbers, 79 comes before 80. But as a translated string, the number "eight zero" comes before "seven nine" in dictionary order.

    Write a program that reads two whole numbers M and N (1 ≤ M < N ≤ 999) and finds the first and last numbers in dictionary order of the numbers in the range M..N inclusive

    Input

    A single line with two integers: M and N

    Output

    A single line with two space-separated integers that are the first and last numbers when the numbers are sorted in dictionary sequence.

    Sample Input

    7 20

    Sample Output

    8 20

    Source

    样例输入

    7 20

    样例输出

    8 20

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部