Hard
Next Power of Two
Read n ≥ 1. Print the smallest power of two that is at least n, using
1 << (n - 1).bit_length(), and print whether n itself is a power of two using n & (n - 1) == 0.Input
One integer.
Output
Two lines.
Sample 1
Input
5
Output
8 False
Sample 2
Input
1
Output
1 True
Output appears here