본문 바로가기
백준

[python] 11651. 좌표 정렬하기 2

by DylanMsK 2019. 9. 28.

문제 출처

11651. 좌표 정렬하기 2

 

풀이


N = int(input())
locations = [tuple(map(int, input().split())) for _ in range(N)]
locations.sort(key=lambda x: (x[1], x[0]))
for i in locations:
    print(i[0], i[1])
    

'백준' 카테고리의 다른 글

[python] 2217. 로프  (0) 2019.09.29
[python] 10814. 나이순 정렬  (0) 2019.09.28
[python] 11651. 좌표 정렬하기  (0) 2019.09.28
[python] 1018. 체스판 다시 칠하기  (0) 2019.09.27
[python] 7568. 덩치  (0) 2019.09.27