mirror of
https://github.com/logos-blockchain/logos-blockchain-pocs.git
synced 2026-01-02 13:13:09 +00:00
6 lines
105 B
Python
6 lines
105 B
Python
POWERS_OF_2 = {2**i for i in range(1, 32)}
|
|
|
|
|
|
def is_power_of_two(n) -> bool:
|
|
return n in POWERS_OF_2
|