#P6445. [COCI 2010/2011 #1] SRETAN
[COCI 2010/2011 #1] SRETAN
Description
It is known that and are lucky digits, and other digits are not lucky digits. If an integer contains only lucky digits in its decimal representation, then this integer is lucky. You need to find the -th lucky positive integer.
Input Format
The input contains one line.
One line with one integer , with the meaning as described above.
Output Format
The output contains one line.
One line with one integer, which is the answer.
1
4
2
7
3
44
Hint
Explanation for Sample Input/Output 1
Because we are looking for positive integers, the first one must be the number .
Constraints
For of the testdata, .
Note
This problem is translated from COCI2010-2011 CONTEST #1 T3 SRETAN.
Translated by ChatGPT 5
京公网安备 11011102002149号