LENTMO Corner Test Case

I am trying this problem for some days now but not able to solve it accurately. Just getting 10pts.
I cant understand which test case am I failing. please check my solution and see if you could help me as I am stuck for a long time.


check my submission
its concise and has simple 20lines code
also its self explanatory

Thanks for your reply, i was doing a silly mistake, now my code has been accepted
saw your code too, it was great.