Pro.ID21176 TitleRun, Run, Runaround Numbers Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21176 AC0 Submit0 Ratio- 时间&空间限制描述An N-digit runaround number is characterized as follows:
输入In this problem you will be provided with one or more input lines, each with a single integer R having between 2 and 7 digits followed immediately by the end of line. For each such number, determine the smallest runaround number that is equal to or greater than R. There will always be such a number for each of the input numbers. The last line of the input will contain only the digit 0 in column 1. 输出Description An N-digit runaround number is characterized as follows:
Input In this problem you will be provided with one or more input lines, each with a single integer R having between 2 and 7 digits followed immediately by the end of line. For each such number, determine the smallest runaround number that is equal to or greater than R. There will always be such a number for each of the input numbers. The last line of the input will contain only the digit 0 in column 1. Output Display the resulting number in the format illustrated below. Sample Input 12
123
1234
81111
82222
83333
911111
7654321
0 Sample Output Case 1: 13
Case 2: 147
Case 3: 1263
Case 4: 81236
Case 5: 83491
Case 6: 83491
Case 7: 913425
Case 8: 8124956 Source 样例输入12
123
1234
81111
82222
83333
911111
7654321
0 样例输出Case 1: 13
Case 2: 147
Case 3: 1263
Case 4: 81236
Case 5: 83491
Case 6: 83491
Case 7: 913425
Case 8: 8124956 作者 |