Under construction

Still being built. Things may change

Power of Two

Interview

Time limit2sMemory limit512 MB

Summary
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을 출력하는 프로그램을 작성하시오.

Examples4

  1. Example 1

    Input
    1
    
    Expected output
    1
    
  2. Example 2

    Input
    2
    
    Expected output
    1
    
  3. Example 3

    Input
    3
    
    Expected output
    0
    
  4. Example 4

    Input
    4
    
    Expected output
    1