Power of Four
Submissions: 5032   Accuracy:

31.73%

  Difficulty: Basic   Marks: 1

Given a number N, check if N is power of 4 or not.

Input:

You have to complete the method which takes 1 argument: the number N  .You should not read any input from stdin/console. There are multiple test cases. For each test case, this method will be called individually.

Output:
Your function should return 1 if N is power of 4, else return 0.

Constraints:
1<=T<=50
1<=N<=100000000

Example:

Input:
2
64
75

Output:
1
0

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Amit Khandelwal
Author: vaibhav2992


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.