설명
Digits \(4\) and \(7\) are lucky, while all others are unlucky. An integer is lucky if it contains only lucky digits in decimal notation. We would like to know the \(K\)-th lucky positive integer.
제약
입력 형식
The first and only line of input contains a positive integer \(K\) (\(1 \le K \le 10^9\)).
출력 형식
The first and only line of output must contain the \(K\)-th lucky positive integer.
서브태스크
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Test 1 | 10점 | None |
Test 2 | 10점 | None |
Test 3 | 10점 | None |
Test 4 | 10점 | None |
Test 5 | 10점 | None |
Test 6 | 10점 | None |
Test 7 | 10점 | None |
Test 8 | 10점 | None |
Test 9 | 10점 | None |
Test 10 | 10점 | None |
예제 1
입력
1출력
4예제 2
입력
2출력
7예제 3
입력
3출력
44문제 정보
태그