Pro.ID22840 TitleDictionary Numbers Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22840 AC11 Submit40 Ratio27.50% 时间&空间限制描述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 作者 |