Power of Two
InterviewTime limit2sMemory limit512 MB
Print 1 if the given natural number N is a power of two and 0 otherwise.
- Level
Easy1 of 10
- Topics
- Bit manipulation
- Solved
- No attempts yet
Problem
자연수 N이 주어졌을 때, 2의 제곱수면 1을 아니면 0을 출력하는 프로그램을 작성하시오.
Input
첫째 줄에 N(1 ≤ N ≤ 230)이 주어진다.
Output
N이 2의 제곱수면 1을 아니면 0을 출력하는 프로그램을 작성하시오.