Power of Four Problem

Power of Four Problem — ExecCode School DSA Practice

Solve the Power of Four problem on ExecCode. Free online school DSA practice in Math. Write and run code in Java, C++, Python — no signup required to run.

Problem description

You are given a whole number. Your task is to check whether it is a power of four. Print true or false as shown in the examples.

Examples

Input 16; Output True. Input 5; Output False

Constraints

1 <= n <= 10^4

Practice Power of Four free on ExecCode. Browse DSA problems, topic map, and placement guides.