← All problemsSign in

Little Elephant and Filling

CodeChefRating 2697Open on judge ↗

A Little Elephant from the Zoo of Lviv likes lucky strings, i.e., the strings that consist only of the lucky digits 4 and 7. The Little Elephant has the string S such that each character in S is either the lucky digit (4 or 7) or the question mark ?. He can replace each question mark with one of the lucky digits in order to obtain the lucky string. He wants to know the number of different ways he

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start