[Python/2019] Restructure solutions
This commit is contained in:
parent
40e767096e
commit
fb42493fff
63 changed files with 1393 additions and 1739 deletions
17
Python/2019/01.py
Normal file
17
Python/2019/01.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue