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.Problem Constraints
Note: The number length can be more than 64, which means the number can be greater than 2 ^ 64 (out of long long range)
1 <= |A| <= 104Input Format
The first argument is a string A.Output Format
Return 1 if the number is a power of 2 else return 0Example Input
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.