This code is not passing last test case

Hello @anshulgurawalia your code is passing all the test cases:
try submitting it here:
https://hack.codingblocks.com/app/practice/1/476/problem

you are correct but in the hackerblocks problem has no constarints available but in the course problem we have constraints the the second diff .is input sample also have number less than 0
take a look

@anshulgurawalia its just the mistake:
but the questions are same i think.
because the problem is exactly same and there is no problem on hackerblocks other then this.
if you still have doubt then check this:
code: https://ide.codingblocks.com/s/340969
i am not able to try to submit code on the question which you are saying as i dont have access to your course.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.