#K13806. Power of Four Exponent Finder
Power of Four Exponent Finder
Power of Four Exponent Finder
Given an integer (N), determine whether it is a power of four. If (N) is a power of four, find the non-negative integer (k) such that (4^k = N). Otherwise, output (-1).
The task is to read an integer from the standard input (stdin) and output the result to the standard output (stdout).
For example, if (N = 16), then (4^2 = 16) so the answer is 2. If (N = 15), since 15 is not a power of four, the answer should be (-1).
inputFormat
A single line containing an integer (N).
outputFormat
Output a single integer, which is the exponent (k) if (N) is a power of four (i.e. (4^k = N)); otherwise, output (-1).## sample
1
0