+ 1
Why is this saying time limit exceeded?
while loop that doesnt want to cooperate? https://code.sololearn.com/cheTnkRlsobv/?ref=app
2 ответов
+ 7
The problem is with the ; you have written after while.
remove it and you'll be fine.
while(yob < 2017); {
to
while(yob < 2017) {
+ 3
Because the code gets a certain amount of time to execute, and when that time is exceeded before the code finishes it says 'Time Limit Exceeded'. Your while loop takes too long to excecute, so it needs to be shorter.