← All problemsSign in

Chef loves Diwali

Chef celebrates Diwali in a unique way .There are infinite Diwali lights in series numbered from 1. There are 40 unique buttons(which can turn on or off the Diwali lights) numbered from 1 to 40. Button with number i is connects lights with numbers that are multiple of i. i.e button 3 connects lights 3, 6,9, .... You can easily observe that some lights are connected to more than one buttons and som

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