Lucky string
CodeChefOpen on judge ↗
Problem description. Lets call a string which is composed of only 5 and 8 a Lucky String. For example, 58, 555, 55855 are all Lucky Strings of length 2, 3 and 5 respectively, while 33, 474 are not Lucky Strings. Now, consider a sorted list of all the Lucky Strings that can be formed where the sorting is done by the following rule: A string a comes before string b if either length(a) Input Inp
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start