adventofcode/2020/1/report.py

30 lines
527 B
Python
Raw Permalink Normal View History

2022-12-01 21:01:59 +01:00
#!/usr/bin/python3
# Hmm yes, pythonian
# This makes me want to say bad things
filename = "input"
with open(filename, "r") as f:
lines = f.read()
lines = lines.split()
for numa in lines:
numa = int(numa)
for numb in lines:
numb = int(numb)
if numa + numb != 2020:
continue
product = numa * numb
print(numa, numb, product)
break
else:
continue
break