Power of 2
CodeChefOpen on judge ↗
Mohan is not good in mathematics and bit manipulation technique and tomorrow is the last date to submit the programming assignment in which he wants to calculate the nearest power of 2 of a given number (N). He finds difficulty in writing the program which calculate the nearest power of 2 of a given number N. You can help him by writing a program which calculate nearest power of 2. Input The fi
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