
Championship Table

Joana found an old booklet in the trophy room of the football club she supports, containing the results of all the championships the team has participated in. Each entry in the booklet gives five details of a championship: number of Games, Points, Wins (3 point/win), Draws (1 point/draw) and Losses. Some (one or two) of the numbers are illegible (-1), but they can be calculated using the legible numbers. Help Joana complete the information in the booklet.
Input: Tuple of five integers (int) G, P, W, D, L.
Output: Tuple of five integers.
Examples:
assert results((10, 20, 6, 2, -1)) == (10, 20, 6, 2, 2) assert results((-1, 64, 18, 10, 10)) == (38, 64, 18, 10, 10) assert results((-1, 47, 14, -1, 9)) == (28, 47, 14, 5, 9)