P19783 [GeeksforGeeks] Power of four
普及-
题目描述

Given a number N, check if N is power of 4 or not.
Example 1:
Input:
N = 64
Output: 1
Explanation:
4^{3}= 64
Example 2:
Input:
N = 75
Output : 0
Explanation :
75 is not a power of 4.
Your task:
You don't have to read input or print anything. Your task is to complete the function isPowerOfFour() which takes an integer N and returns 1 if the number is a power of four else returns 0.

Expected Time Complexity: O(N)
Expected Auxiliary Space : O(1)
Constraints:
1<=N<=10^{5}

输入格式

见题面

输出格式

见题面

样例输入
N = 64
样例输出
1