26 lines
405 B
Python
26 lines
405 B
Python
import aocd
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
puzzle_input = aocd.get_data(day=2, year=2022)
|
|
|
|
round_result = {
|
|
"A X":4,
|
|
"B X":1,
|
|
"C X":7,
|
|
"A Y":8,
|
|
"B Y":5,
|
|
"C Y":2,
|
|
"A Z":3,
|
|
"B Z":9,
|
|
"C Z":6,
|
|
}
|
|
|
|
strategy_score = 0
|
|
moves_list = puzzle_input.split('\n')
|
|
for move in moves_list:
|
|
strategy_score = strategy_score + round_result[move]
|
|
|
|
print(strategy_score)
|
|
|