A number is called lucky if it comprises only the digits 444 and 777. Your task is to return the k-th lucky number as a string for a given integer k.
k
Constraints:
1<=1 <=1<= k <=109<= 10^9<=109
Let’s take a moment to make sure you’ve correctly understood the problem. The quiz below helps you check if you’re solving the correct problem:
Find The K-th Lucky Number
What digits are considered lucky?
3 and 8
2 and 5
4 and 7
6 and 9
We have a game for you to play. Rearrange the logical building blocks to develop a clearer understanding on how to solve this problem.
Implement your solution in the following coding playground.