mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-15 01:16:36 +03:00
13 lines
262 B
Python
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
|