19 lines
429 B
Python
19 lines
429 B
Python
import aoclib
|
|
|
|
if 'TEST' not in globals():
|
|
TEST = False
|
|
|
|
my_input = aoclib.getInputLineAsArray(day=1, return_type=int, test=TEST)
|
|
|
|
globalBreak = False
|
|
while len(my_input) > 0:
|
|
try_value = my_input.pop()
|
|
for value in my_input:
|
|
if try_value + value == 2020:
|
|
aoclib.printSolution(1, 1, try_value * value, test=TEST)
|
|
globalBreak = True
|
|
break
|
|
|
|
if globalBreak:
|
|
break
|