Power of Two
CodeChefOpen on judge ↗
Chefina has a set of numbers so she wants to give you a task to find whether the given number is a power of 2 or not Print YES if the number is a power of 2 else print NO ### Input - First line of the input contains a single integer $T$ denoting the number of testcases. - Each testcase contains a single integer $N$. ### Output For each testcase print YES if $N$ is a power of 2 else print NO. ##
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