We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 293b27d commit 0f64a6fCopy full SHA for 0f64a6f
2023/day02.py
@@ -33,10 +33,7 @@ def possible_games(games: str) -> int:
33
34
35
def fewest_number_of_cubes_of_each_color(cubes: List[Dict[str, int]]) -> Dict[str, int]:
36
- minimal = {}
37
- for color in COLORS:
38
- minimal[color] = max(cube.get(color, 0) for cube in cubes)
39
- return minimal
+ return {color: max(cube.get(color, 0) for cube in cubes) for color in COLORS}
40
41
42
def power(cubes: List[Dict[str, int]]) -> int:
0 commit comments