컴공생의 다이어리
[파이썬, Python] 백준 11650번 : 좌표 정렬하기 본문
728x90
백준 11650번 : 좌표 정렬하기

내 코드
import sys
n = int(input())
x_y = []
for _ in range(n):
x_y.append(list(map(int,sys.stdin.readline().strip().split())))
x_y.sort(key = lambda x : (x[0],x[1]))
for x, y in x_y:
print(x, y)728x90
반응형
'Development > Algorithm & Coding Test' 카테고리의 다른 글
| [파이썬, Python] 백준 11399번 : ATM (0) | 2021.08.22 |
|---|---|
| [파이썬, Python] 백준 5635번 : 생일 (0) | 2021.08.21 |
| [파이썬, Python] 백준 1181번 : 단어 정렬 (0) | 2021.08.08 |
| [파이썬, Python] 백준 1011번 : Fly me to the Alpha Centauri (0) | 2021.06.27 |
| [파이썬, Python] 백준 10757번 : 큰 수 A+B (0) | 2021.06.15 |
Comments