Problem Link : Obtain Two Zeroes

The editorial have very nice solution But what if we have to print X for every operation and also minimum number of operation is intended. Then According to me Binary Search based solution worked here.

And One more thing as this Problem is tagged as Binary Search problem so it made me more curious.

Please help me to write Binary search based solution.