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