APC 2014 - Interesting powers of two

Can anyone tell how to solve this question from APC 2014 interesting powers of two

What have you thought/tried? My first instinct on a problem called “Interesting Powers of Two” is that the numbers we’re dealing with must have some special property. Reading the problem and seeing that we could have to check ranges as large as 10^150, I know that this must be the case.

So I’d start by brute forcing the solution for A=0 and B=100000 and go from there.

It’s a pretty neat problem, so I don’t want to spoil it for you, but if you still can’t get it, I know a little more than just where to start. :wink:

thanks for replying and i would try the brute force method and try to derive something from it.