0
How to prevent long programs from failing?
I have a python code that simulates the card game War. It iterates through a set number of games and returns stats on the length of the games. It works good for <5 games but for more than that it returns "no output". Is this a memory or runtime error? If so how do you avoid it? https://code.sololearn.com/cyTk7i6qvqR0/?ref=app
1 Respuesta
+ 1
Sololearn has a strict limit on how long a program is allowed to run (5 seconds if I remember correctly). Your program would run longer the more wars it has to simulate