generated from public/aoc_template
18 lines
241 B
Python
18 lines
241 B
Python
my_input = list(map(int, open("inputs/input_1", "r").readlines()))
|
|
|
|
p1 = sum(my_input)
|
|
p2 = sum(sorted(my_input)[:-20])
|
|
|
|
|
|
p3 = 0
|
|
rev = False
|
|
for x in my_input:
|
|
if rev: x = -x
|
|
p3 += x
|
|
rev = not rev
|
|
|
|
|
|
print(p1)
|
|
print(p2)
|
|
print(p3)
|