SRETAN
시간 제한: 1000ms메모리 제한: 128MB출처: COCI 2010-2011BOJ 2877
문제
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 ≤ K ≤ 109).
출력
The first and only line of output must contain the K-th lucky positive integer.
예제
예제 1
입력
1
출력
4
예제 2
입력
2
출력
7
예제 3
입력
3
출력
44
코드를 제출하려면 로그인하세요.