Monk in the Jungle

The Great Monk Maruf is planning to visit the jungle of Amazon. He loves to prepare himself rigorous…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

n=0
p=0
z=0
for i in range(int(input())):
    k=int(input())
    if k<0:
        n+=1
    elif k>0:
        p+=1
    else:
        z=1
print(min(p,n))

It shows Runtime Error in 3rd test case. Can anybody help?