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

Open Power of Two in Code Arena →