Advent-of-Code/2019/day 1/P2/requirements.py

9 lines
199 B
Python
Raw Permalink Normal View History

2019-12-01 14:49:42 +01:00
modules = open("input.txt").read().split("\n")[:-1]
requirement = 0
for i in modules:
2019-12-01 15:06:01 +01:00
fule=(int(i)//3)-2
while fule > 0:
requirement+=fule
fule=(fule//3)-2
2019-12-01 14:49:42 +01:00
print(requirement)