# Getting WA in CKWLK

I am getting WA in CKWLK in my solution .
The link is here : https://www.codechef.com/viewsolution/27544642
My code is working fine for all the given test case.Pls someone tell me what is wrong in my code ?

@sam132 i dont know what’s wrong in your approach but i used almost same approach in python and it worked

The simple approach is to check whether number is in power of 2 or not, after removing all the zeros from right side.

While removing zeros count them as well.
`while(N%10==0)`
`{`
`noz++;`
`N/=10;`
`}`

Now check following conditions.
If number is not in power of 2, simply “NO” is the answer.

See below code:
one thing to note that if number is in power of two, then find out what is the power, whatever is the power we must have atleast that number of zeros at the end.

However we can have more numbers of them since 10 can also be multiplied.

``````    if(!ispow2(N))
cout<<"No";
else{

int times = log2(N);

if(times > noz)
cout<<"No";
else cout<<"Yes";
}``````

For checking whether it is in power of 2 or not.

`return ceil(log2(N)) == floor(log2(N))`

Mistake in line 53.

The condition in if should be a10 >= a2

Your current code fails for following case:
5
20
400
8000
160000
3200000