Binary search Python 2.7

I’m getting WA on SPOJ.
Here’s the problem:
Here’s the code:
(it includes optimization)

I need a test case that will help to find a mistake. I’ve tried several cases and can’t find mistakes.

See input number 2 on your link it is giving RE (list index out of range) check it out.

1 Like