parent
40ce3e8e19
commit
8dd1d6c006
1 changed files with 12 additions and 1 deletions
@ -1,25 +1,36 @@ |
||||
lines = [i for i in open("input.txt", 'r').read().splitlines()] |
||||
|
||||
sum = 0 |
||||
sum2 = 0 |
||||
|
||||
for l in lines: |
||||
match(l): |
||||
case "A X": |
||||
sum += 4 |
||||
sum2 += 3 |
||||
case "A Y": |
||||
sum += 8 |
||||
sum2 += 4 |
||||
case "A Z": |
||||
sum += 3 |
||||
sum2 += 8 |
||||
case "B X": |
||||
sum += 1 |
||||
sum2 += 1 |
||||
case "B Y": |
||||
sum += 5 |
||||
sum2 += 5 |
||||
case "B Z": |
||||
sum += 9 |
||||
sum2 += 9 |
||||
case "C X": |
||||
sum += 7 |
||||
sum2 += 2 |
||||
case "C Y": |
||||
sum += 2 |
||||
sum2 += 6 |
||||
case "C Z": |
||||
sum += 6 |
||||
print(sum) |
||||
sum2 += 7 |
||||
print(sum) |
||||
print(sum2) |
Loading…
Reference in new issue