当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2956:Repeatless Numbers

题目描述

A repeatless number is a positive integer containing no repeated digits. For instance, the first 25 repeatless numbers are

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, …

Given an integer n, your goal is to compute the nth repeatless number.

输入解释

The input test file will contain multiple test cases, each consisting of a single line containing the integer n, where 1 ≤ n ≤ 1000000. The end-of-file is marked by a test case with n = 0 and should not be processed.

输出解释

For each input case, the program should print the nth repeatless number on a single line.

输入样例
25
10000
0
输出样例
27
26057

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Stanford Local 2004

源链接: POJ-2956

最后修改于 2020-10-29T06:48:31+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536