Excalibur
CodeChefOpen on judge ↗
Anjali and Sachi are participating in Excalibur event. In the event qualifiers, each team is given a problem to find numbers between $L$ and $R$ (both inclusive) satisfying the following condition. In the binary conversion of each number, no two consecutive bits should be 1. Anjali and Sachi are in a rush to attend Webhunt. So, they asked Tarun to help them. However, Tarun is busy in Gamestation.
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.
Sign in to chat with the tutor and save your progress.
Sign in to start