A coding contest held in the month of December according to the Advent Calendar. Just giving it a try.
Need to sum all the days where the given constraint holds: Which games would have been possible if the bag contained only 12 red cubes, 13 green cubes, and 14 blue cubes? (ans) contains that.
Used a dictionary for the constraint. (mydict) Set a variable to check if the constraint holds or not on a given day. (see)
Learnt file handling(properly) and new functions.
Constraint: In each game you played, what is the fewest number of cubes of each color that could have been in the bag to make the game possible? We just make a dictionary where each key(color) holds the maximum number of balls across all events in a game