Check Power Of Two
Computer Mathematics
Medium
2 views
Problem Description
Given n, print YES if it is a power of 2.
Input Format
One integer n.
Official Solution
If n>0 and (n & (n-1))==0 then YES else NO.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!