You are viewing a single comment's thread. Return to all comments →
I'm getting a wrong answer on test case 1. I looked at the test case and when I copy and paste the test case in myself -- it works just fine. All other test cases run just fine without any errors.
I believe there is something wrong with the test.
Check range =)
L and R are inclusive (really, that was pretty clear... but for loops write themselves and prefer < to <=)
waste of time
@ pr0grammer1, it seems you are able to solve this problem :) Let us know if you have any other query.
Me too, I don't understand this!
can you post your code? My code works well on this test.
guys just check your code once again...it's working for me...check if the "2nd for" loop is considering the last element of array...