I did it but I face run time error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I did it but I face run time error

Note: I have written the following program code and I get the correct output, but the site's judging system gives me a run time error. Please help me optimize the code and fix the Run time error problem: Imagine a football game. The program takes two lines from us as input: In the first element of the first line, the total number of goals scored, in the second element of the first line:overtime of the first half of the game and in the third element of the first line: overtime of the second half of the game will be written. Extra time of the first half of the game = a Extra time of the second half= b At the input of the second line, we write the minutes of the goals scored (number of elements in second line of the input must be equal to the first element of the input of the first line) The continue of the problem will be in my code as comment. Please help me https://code.sololearn.com/cKPfm7x0YAta/?ref=app

18th Sep 2021, 10:08 PM
Amirreza
Amirreza - avatar
3 Answers
+ 1
You used the same variable multiple times, clearing and using it again, maybe you missed sthg somewhere It's working just fine now I tried to do it myself, hope it helps : https://code.sololearn.com/cvffR6OOjfhH/?ref=app
19th Sep 2021, 12:14 PM
Sacar
Sacar - avatar
+ 1
Sacar Thanks ! Site accepted this answer
19th Sep 2021, 12:22 PM
Amirreza
Amirreza - avatar
- 3
Can you post the complete error message, please?
18th Sep 2021, 11:39 PM
Simon Sauter
Simon Sauter - avatar