advent/2020/1/solution.py

14 lines
303 B
Python
Raw Normal View History

2021-07-07 23:42:14 -05:00
#!/usr/bin/python
fd = open("input", "r")
lines = fd.readlines()
mustbreak = False
for i in lines:
for j in lines:
if int(i) + int(j) == 2020:
print("{} * {} == {}".format(int(i), int(j), int(i) * int(j)))
mustbreak = True
break
if mustbreak: break