← All problemsSign in

Halry vs Harry

**Lucky numbers** are numbers that only consists of lucky digits, i.e. 4 or 7. For example: 4, 7, 447, 47474 are lucky and 437, 147 are not. Halry likes Lucky number whereas Harry doesn't. Harry likes nearly lucky numbers. Suppose you have an integer $M$. If the number of lucky digits in $M$ is a lucky number and sum of the digits of the number $M$ is also lucky then, the number is said to be **

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