Reputation: 305
I have tried to run my python3 code in google code jam tests however it always gives me a runtime error when testing. I would like it to not give me a runtime error. I have tested on my ubuntu python3.5.3 and it works. I am not sure what causes the runtime error, Is there a way I could get the logs from google code jam or similar?
Here is the code.
if __name__ == "__main__":
testcases = input()
raw = []
while True:
inp = input()
if inp == "":
break
raw.append(inp)
print(raw)
Sorry if this is a newbie question. I am new to code jam and submitting my work online.
Upvotes: 0
Views: 225
Reputation: 42
This should do the same as what you are trying to do as far as i know. try and lemme know. If i know what you are trying to take as inputs, i would have been able to give a more specific answer :)
testcases = int(input())
for t in range(testcases):
raw = []
n = int(input())
for i in range(n):
inp = input()
raw.append(inp)
print(raw)
Upvotes: 1