823. Find the Kth Lucky Number
We know that 4 and 7 are lucky digits. Also, a number is called lucky if it contains only lucky digits.
You are given an integer k, return the kth lucky number represented as a string.
Example 1:
Input : k = 3
Output : "44"
Explanation :
The first lucky number is 4, the second one is 7and the third lucky number is 44.
Example 2:
Input : k = 1000
Output : "777747447"
Explanation :
It can be shown that the 1000th lucky number is 777747447.
Now Your Turn!
Pick the correct output for the given inputInput : k = 15
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 1 <= k <= 109