Largest Power of Two Within
Print the largest power of two that is ≤ N.
Input: one integer N.
Output: 2 to the power ⌊log₂ N⌋.
Constraints:
- 1 ≤ N ≤ 1018
Sample Tests
Input 1
20
Output 1
16
Input 2
64
Output 2
64
Discussion (opens after you solve — no spoilers before)
No comments yet.