forked from adventofcode/logan_2022
Day 1 complete
This commit is contained in:
parent
9ff8028933
commit
1081dde9f3
1 changed files with 8 additions and 0 deletions
|
@ -13,3 +13,11 @@ if __name__ == "__main__":
|
||||||
|
|
||||||
largest = max(elves, key=elves.get)
|
largest = max(elves, key=elves.get)
|
||||||
print(f'Index: {largest}\nValue: {elves[largest]}')
|
print(f'Index: {largest}\nValue: {elves[largest]}')
|
||||||
|
|
||||||
|
top3 = 0
|
||||||
|
for i in range(3):
|
||||||
|
largest = max(elves, key=elves.get)
|
||||||
|
top3 += elves[largest]
|
||||||
|
elves[largest] = 0
|
||||||
|
|
||||||
|
print(f'Top 3: {top3}')
|
||||||
|
|
Loading…
Reference in a new issue