day 02: remove unnecessary import, clean up variable names
This commit is contained in:
parent
cb8cc8034e
commit
ed3dd5c5b2
1 changed files with 4 additions and 6 deletions
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
# https://adventofcode.com/2023/day/2
|
||||
|
||||
import re
|
||||
|
||||
|
||||
def get_lines(filename: str) -> list:
|
||||
with open(filename, "r") as file:
|
||||
|
|
@ -63,10 +61,10 @@ def main():
|
|||
lines = get_lines("input.txt")
|
||||
cube_pools = {"red": 12, "green": 13, "blue": 14}
|
||||
games = get_games(lines)
|
||||
sovg = get_sum_of_valid_games(games, cube_pools)
|
||||
print(f"Part 1: The sum of valid games is: {sovg}")
|
||||
power = get_power_of_games(games)
|
||||
print(f"Part 2: The power of valid games is: {power}")
|
||||
sum_of_valid_games = get_sum_of_valid_games(games, cube_pools)
|
||||
print(f"Part 1: The sum of valid games is: {sum_of_valid_games}")
|
||||
power_of_valid_games = get_power_of_games(games)
|
||||
print(f"Part 2: The power of valid games is: {power_of_valid_games}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue