adventofcode/2020/1/report_but_its_part_two.py
Steph d76639aad1 Second star!
Also please I'd like to die now thanks python
2022-12-01 21:01:59 +01:00

42 lines
819 B
Python
Executable File

#!/usr/bin/python3
# Hmm yes, pythonian
# Oh please god no how do I make this right????
# THERE IS SO MUCH INDENTATION FUCK
#
# I'm not going to take the time to fix this when
# it's written in python lmao
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)
for numc in lines:
numc = int(numc)
if numa + numb + numc != 2020:
continue
product = numa * numb * numc
print(numa, numb, numc, product)
break
else:
continue
break
else:
continue
break