[Python/2019] Restructure solutions

This commit is contained in:
Felix Bargfeldt 2023-10-29 19:47:15 +01:00
parent 40e767096e
commit fb42493fff
Signed by: Defelo
GPG key ID: 2A05272471204DD3
63 changed files with 1393 additions and 1739 deletions

17
Python/2019/01.py Normal file
View file

@ -0,0 +1,17 @@
from lib import *
input = read_input(2019, 1)
out = 0
for line in input.splitlines():
out += int(line) // 3 - 2
print(out)
out = 0
for line in input.splitlines():
fuel = int(line) // 3 - 2
while fuel > 0:
out += fuel
fuel = fuel // 3 - 2
print(out)