python3의 내장 정렬 함수는 'stable sort'입니다. 즉, 날먹하기 좋습니다.

This commit is contained in:
2020-08-08 05:22:51 +09:00
parent 38e8440284
commit 1de78fce02
6 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
T = list(map(int, input().split()))
for i in range(2):
for j in range(2 - i):
if T[j] > T[j + 1]:
T[j], T[j + 1] = T[j + 1], T[j]
for i in T:
print(i, end=' ') # 버블