Problem with the test case used for RUN in the LIfe Problem of DSA

When i ran my program it says time limit exceeded and shows me an error. However when i submitted the same, it got accepted. Something is wrong and needs to be corrected.

P.S I wrote my code in Python 3.6

Hey, Don’t store the input in an array or you may say list once u counter 42 terminate the program.
while (true):
read a
if a=42
print a

Hope this helps.

That’s because when you click run, and don’t provide custom input, it runs on empty input, not the sample test cases.

1 Like

Okay . I will check it out.

I am new to Codechef. Could you explain me then as to how the RUN option works?
Should we provide custom input for the RUN option or the admin itself will provide?

You need to provide custom input.

Oh okay. Thank you!!