Skip to content

Commit f8d9787

Browse files
committed
update for part 2
1 parent 83c5af4 commit f8d9787

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

1.caloriecounting.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@
1313
total = 0
1414

1515
elif line == 'STOP':
16+
top3 = 0
1617
for _ in range(3):
1718
highest = heappop(lst)
18-
print(-highest[0])
19+
top3 += -highest[0]
20+
print(top3)
1921

2022
else:
2123
total += int(line)
2224

2325
except EOFError:
24-
break
25-
26-
27-
28-
26+
break

0 commit comments

Comments
 (0)