2020/Day 1/Two/solution.py

13 lines
366 B
Python
Raw Permalink Normal View History

2020-12-04 10:05:00 +01:00
#!/bin/python
with open("input", 'r') as input:
lines = [x.strip() for x in input.readlines()]
for x in lines:
x = int(x)
for y in lines:
y = int(y)
for z in lines:
z = int(z)
if x + y + z == 2020:
print(f"Found solution: x: {x}, y: {y}, z: {z}, result: {x*y*z}")