Here is my solution : CodeChef: Practical coding for everyone
can anybody tell me why am I getting runtime error?
Here is my solution : CodeChef: Practical coding for everyone
can anybody tell me why am I getting runtime error?
Oh my god! I tried this problem after you posted it and you won’t believe this! It failed just ONE test case, so irritating! CodeChef: Practical coding for everyone
Btw, I am not really sure why your solutions is getting NZEC. It looks fine to me, the only potential issue could be at line 3, you should do it like this:
count, depth, stack, tempCount, index, cIndex = [0] * 6
Actually, why are you submitting your solution in pypy 3? I think this code would work with Python 3 selected and all the brackets in the if statements removed…
I changed that line, it’s still showing runtime error. And I was submitting in pypy3 because I read somewhere that pypy3 is faster than python 3
got the solution, the problem was in my split statement