Second star!

Also please I'd like to die now thanks python
This commit is contained in:
Steph 2022-12-01 21:01:59 +01:00
parent 8702b1c28d
commit d76639aad1

View File

@ -0,0 +1,41 @@
#!/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