Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.02 s | 3 KBi |
#2 |
Correcto
|
0.027 s | 3 KBi |
#3 |
Correcto
|
0.019 s | 3 KBi |
#4 |
Correcto
|
0.016 s | 3 KBi |
#5 |
Correcto
|
0.027 s | 3 KBi |
#6 |
Correcto
|
0.022 s | 3 KBi |
#7 |
Correcto
|
0.03 s | 3 KBi |
#8 |
Correcto
|
0.019 s | 3 KBi |
#9 |
Correcto
|
0.027 s | 3 KBi |
#10 |
Correcto
|
0.027 s | 3 KBi |
#11 |
Correcto
|
0.059 s | 3 KBi |
#12 |
Correcto
|
0.056 s | 3 KBi |
#13 |
Correcto
|
0.066 s | 3 KBi |
#14 |
Correcto
|
0.055 s | 3 KBi |
#15 |
Correcto
|
0.123 s | 3 KBi |
#16 |
Correcto
|
0.131 s | 3 KBi |
#17 |
Correcto
|
0.146 s | 3 KBi |
#18 |
Correcto
|
0.188 s | 3 KBi |
#19 |
Correcto
|
0.105 s | 3 KBi |
#20 |
Correcto
|
0.241 s | 3 KBi |
def swap(arr, i, j): arr[i], arr[j] = arr[j], arr[i] def bubble_sort(arr): n = len(arr) for i in range(n): for j in range(i, n): if arr[j] < arr[i]: swap(arr, i, j) n = int(input()) arr = [int(x) for x in input().split(" ")] bubble_sort(arr) for i in arr: print(i, end=" ")