scripts/ege/13022023/5.py
2023-05-05 00:45:01 +03:00

16 lines
285 B
Python
Vendored

def f(n, m):
n = str(n)
m = str(m)
s = str(int(n[0]) + int(m[0]))
s += str(int(n[1]) + int(m[1]))
return int(s[-4:-1])
r = []
for x in range(100, 1000):
for y in range(100, 1000):
if f(x, y) == 2:
r.append(x)
print(max(r))