← All problemsSign in

TED & HIS TASK

Ted Mosby recently learnt about binary system. As year 2022 just began, he tried to convert it to binary system. By doing so he noticed that there are 3 zeroes in its binary form. {2022}`10`={11111100110}`2` Robin thought to give ted an interesting task. She gave him an interval of years and asked him to find how many years in that interval have 3 zeroes in their binary representation. Can you

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