ноя 23 16:47:55 debian-PC systemd[1]: flaskapp.service: Service RestartSec=100ms expired, schedul
ноя 23 16:47:55 debian-PC systemd[1]: flaskapp.service: Scheduled restart job, restart counter is
ноя 23 16:47:55 debian-PC systemd[1]: Stopped "todo".
ноя 23 16:47:55 debian-PC systemd[1]: flaskapp.service: Start request repeated too quickly.
ноя 23 16:47:55 debian-PC systemd[1]: flaskapp.service: Failed with result 'exit-code'.
ноя 23 16:47:55 debian-PC systemd[1]: Failed to start "todo".
def next_bigger(n):
n_lst = list(map(lambda x: int(x), str(n)))
for i in range(len(n_lst) - 1, 0, -1):
if n_lst[i] > n_lst[i - 1]:
left_side = n_lst[:i]
right_side = n_lst[i:]
right_side.sort()
for i2 in range(len(right_side)):
if right_side[i2] > left_side[-1]:
temp = left_side[-1]
left_side[-1] = right_side[i2]
right_side[i2] = temp
return int("".join(str(x) for x in left_side + right_side))
return -1