Tap here to switch tabs
Problem
Ask
Submissions

Problem: Find The K-th Lucky Number

med
30 min
Explore how to identify the k-th lucky number that contains only digits 4 and 7 by applying bitwise manipulation techniques. Understand the problem constraints and develop an efficient Python solution to handle large inputs.

Statement

A number is called lucky if it comprises only the digits 44 and 77. Your task is to return the k-th lucky number as a string for a given integer k

Constraints:

  • 1<=1 <= k <=109<= 10^9

Tap here to switch tabs
Problem
Ask
Submissions

Problem: Find The K-th Lucky Number

med
30 min
Explore how to identify the k-th lucky number that contains only digits 4 and 7 by applying bitwise manipulation techniques. Understand the problem constraints and develop an efficient Python solution to handle large inputs.

Statement

A number is called lucky if it comprises only the digits 44 and 77. Your task is to return the k-th lucky number as a string for a given integer k

Constraints:

  • 1<=1 <= k <=109<= 10^9