So, it is the link to the problem cakewalk in maths section, Cakewalk - Problems | CodeChef
here it is the link to my solution, Solution: 93156420 | CodeChef
could anyone tell me why is it rejected?
So, it is the link to the problem cakewalk in maths section, Cakewalk - Problems | CodeChef
here it is the link to my solution, Solution: 93156420 | CodeChef
could anyone tell me why is it rejected?
There are 2 things wrong with your code :
Now you may think n = 12000 should also output “YES” because cnt = 3 and floor(log2(12) ) = 3
( and so did I) but for some reason while comparing it considers the ceil value so it gives the correct answer but any more zeros and it outputs the wrong answer.
Thanks alot.