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