42 lines
819 B
Python
42 lines
819 B
Python
|
#!/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
|