← All problemsSign in

lucky and distinct

An Lucky number is a number $K$ such that the first digit of $K$ represent the count of how many zeroes are there in $K$ , the second digit represent the count of how many one's are there in $K$ and so on . You are given a program which accept string $K$ which is a number and checks whether the number is an Lucky number or not if it is an Lucky number then it prints the count of distinct number

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