← All problemsSign in

Chef and Watch

Chef has a Watch which is gifted by his friend.It is a digital watch. So the numbers in watch are Seven Segment display. Now you have a given a number $N$. You have to find the maximum number $K$ that can be generated using the segments used in that number i.e if you have given the $123$ then in seven segment display number of segments for $1$ is $2$, similarly for $2$ it is $5$ and $3$ it is $5$

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