aoc-2019/day1/1/day1.py

7 lines
167 B
Python
Raw Normal View History

2019-12-04 19:18:15 +00:00
from functools import reduce
from operator import add
with open('input', 'r') as f:
result = reduce(add, [(int(line)//3)-2 for line in f])
print(f"{result}")