#4864. 321-like Searcher
321-like Searcher
321-like Searcher
题目描述
A positive integer is called a 321-like Number when it satisfies the following condition. This definition is the same as the one in Problem A.
The digits of are strictly decreasing from top to bottom. In other words, if has digits, it satisfies the following for every integer such that 1 \le i < d: (the -th digit from the top of ) > (the -th digit from the top of ).
Note that all one-digit positive integers are 321-like Numbers. For example, , , and are 321-like Numbers, but , , and are not. Find the -th smallest 321-like Number.
输入格式
The input is given from Standard Input in the following format:
输出格式
Print the -th smallest 321-like Number as an integer.
15
32
321
9610
777
983210
提示
All input values are integers.
At least 321-like Numbers exist.The 321-like Numbers are from smallest to largest.
The -th smallest of them is .
标签: AtCoder|abc321C
来源
AtCoder|abc321C