私の解答
n = int(input())
li = [int(x) for x in input().split()]
for ele in (sorted(li)):
print(ele)
私の解答は解答例3に近かったです。
解答例1
N = int(input())
A = [0] * N
values = input().split()
for i in range(N):
A[i] = int(values[i])
sorted_A = sorted(A)
for a in sorted_A:
print(a)
解答例2
N = int(input())
A = [0] * N
values = input().split()
for i in range(N):
A[i] = int(values[i])
A.sort()
for a in A:
print(a)
解答例3
N = int(input())
A = [int(x) for x in input().split()]
for a in sorted(A):
print(a)