Algorithm/BOJ
[백준/2751] 수 정렬하기 2 (with 파이썬)
Potato potage
2022. 11. 10. 14:11
반응형
✔ 문제
✔ 풀이
n = int(input())
nums = []
for _ in range(n):
nums.append(int(input()))
nums.sort()
for i in nums:
print(i)
✔ 후기
파이썬은... sort()가.. 있다...!
그래도 sort()말고 정렬하는 방법은 아는 게 훨씬 낫다.
반응형