33 lines
613 B
Python
Executable File
33 lines
613 B
Python
Executable File
#!/bin/python
|
|
|
|
def check(numbers, num):
|
|
for i in numbers:
|
|
for j in numbers:
|
|
print(f"Checking {i} + {j} = {num}")
|
|
if i + j == num:
|
|
return True
|
|
|
|
return False
|
|
|
|
def rotate(numbers, num):
|
|
del numbers[0]
|
|
numbers.append(num)
|
|
return numbers
|
|
|
|
with open("input", 'r') as input:
|
|
numbers = []
|
|
for _ in range(26):
|
|
numbers.append(int(next(input).strip()))
|
|
|
|
for num in input:
|
|
num = int(num.strip())
|
|
if not check(numbers, num):
|
|
print(num)
|
|
break
|
|
|
|
numbers = rotate(numbers, num)
|
|
|
|
|
|
|
|
|