Pro.ID10137 TitleRunaround Numbers Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10137 AC50 Submit124 Ratio40.32% 时间&空间限制描述Runaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:
Given a number M (that has anywhere from 1 through 9 digits), find and print the next runaround number higher than M, which will always fit into an unsigned long integer for the given test data. 输入Multiple test cases. For each case contains a single line with a single integer, M 输出Description Runaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration:
Given a number M (that has anywhere from 1 through 9 digits), find and print the next runaround number higher than M, which will always fit into an unsigned long integer for the given test data. Input Multiple test cases. For each case contains a single line with a single integer, M Output For each case output A single line containing the next runaround number higher than the input value, M. Sample Input 81361 Sample Output 81362 Source 样例输入81361 样例输出81362 作者 |