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

13 lines
262 B
Python

def f(n):
sn = str(n)
r = sorted(
[int(sn[0]) + int(sn[1]), int(sn[1]) + int(sn[2]), int(sn[2]) + int(sn[3])]
)
return "".join([str(x) for x in r[-2:]])
for i in range(1000, 10000):
if f(i) == "1418":
print(i)
break