Problem Description
Find if the given number is a power of 2 or not. More specifically, find if the given number can be expressed as 2^k where k >= 1.
Note: The number length can be more than 64, which means the number can be greater than 2 ^ 64 (out of long long range)
Problem Constraints
1 <= |A| <= 104
Input Format
The first argument is a string A.
Output Format
Return 1 if the number is a power of 2 else return 0
Example Input
128
Example Output
1
Example Explanation
128 can be expressed as 2 ^ 7.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified.
Still have a question? Checkout Sample Codes for more details.