adventofcode/2019/day01A.py
2022-12-02 18:19:22 -05:00

13 lines
282 B
Python

import math
inputs = []
fuelneeded = 0
with open ('day01input.txt', 'r') as infile:
inputs = [current_input.rstrip() for current_input in infile.readlines()]
for item in inputs:
module_fuel = math.floor(int(item) / 3) - 2
fuelneeded += module_fuel
print(fuelneeded)