Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 372 Bytes

1.md

File metadata and controls

23 lines (19 loc) · 372 Bytes

Day 1

Part 1 Part 2 Total
Time 2:09 1:39 3:48
data = []

with open("day1input.txt") as f:
    total = 0
    for line in f.readlines():
        if line == "\n":
            data.append(total)
            total = 0
        else:
            total += int(line)

# Part 1
print(max(data))

# Part 2
print(sum(sorted(data)[-3:]))