0

While or for loop

I want that this Hello Repertoire Mode Times but there is a Exectution timed out https://sololearn.com/compiler-playground/cAfYa2H8d3Z3/?ref=app https://sololearn.com/compiler-playground/cAfYa2H8d3Z3/?ref=app

24th Feb 2025, 5:07 AM
Tom Eulenborn
Tom Eulenborn - avatar
1 Answer
+ 2
There is something missing in the loop. Note that the while condition never changes. It is always true, so the loop never ends and that causes the timeout error. Add a line inside the loop that updates the value of seats so that the condition eventually becomes false.
24th Feb 2025, 6:23 AM
Brian
Brian - avatar