Why Wrong With My Code? Getting NZEC

Problem: AMR15A Problem - CodeChef

My Solution:CodeChef: Practical coding for everyone

Why Am I Getting Runtime (NZEC) Error?
My Code Executes Without Any Problem Locally.

CODE:

#loop tc, T to be omitted
T = int(input())
for tc in range(T):
    N = int(input())
    L = len(list(map(int, filter(lambda x: int(x) % 2 == 0, input().split(" ")))))
    print("READY FOR BATTLE" if L > N - L else "NOT READY")
      

I’m thinking you didn’t actually try the given examples - exactly as given. Just delete everything out of the “Custom Input” for the IDE and paste one in. It fails NZEC.

Here’s one such, for your convenience:

5
1 2 3 4 5

No other input. That’s it.

2 Likes

Thank You For The Quick Reply. The Actual Problem Was That, T (No. of testcases) Wasn’t Povided So I had To Omit That for Loop.