Power of Two
Medium · rating 1250 · Bit Manipulation, Math
Read an integer n. Print YES if it is a power of two (1, 2, 4, 8, …), otherwise NO.
Constraints: 1 ≤ n ≤ 1018
Related problems
- Count Set Bits — Medium
- GCD of an Array — Medium
- Cash Register Change — Medium
- Collatz Steps — Medium
- Credit Card Validation — Medium
- IP Address to Integer — Medium