Skip to content

Instantly share code, notes, and snippets.

@serg1us
Created March 30, 2021 19:29
Show Gist options
  • Save serg1us/f6e2c4331ba86d66c7f80cdf91506b2c to your computer and use it in GitHub Desktop.
Save serg1us/f6e2c4331ba86d66c7f80cdf91506b2c to your computer and use it in GitHub Desktop.
A = list(map(int, input().split()))
l = len(A)
if l % 2 == 0:
l = l // 2
a1 = sorted(A[:l])
a2 = sorted(A[l:], reverse=True)
A = a1 + a2
print(*A)
else:
print('Ошибка, попробуй поставить пробел')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment