Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Next
- Default parameter
- Hooks
- JavaScript
- React #Hooks
- firebase
- React Kakao map
- HTML
- css #html
- react
- Template literals
- spread operation
- Python #Baekjoon
- Python #CodeUp
- es11
- 카카오맵 api
- BOJ
- Redux
- 카카오맵
- 프로그래머스
- es6
- Python
- optional chanining
- HTML #CSS
- CSS
- nextjs
- Nullish Coalescing Operator
Archives
- Today
- Total
거북이개발자
[백준 11650] 좌표 정렬하기 본문
0. 제목
- 백준 11650 좌표 정렬하기
1. 문제
2. 풀이
- 좌표를 튜플에 입력한다.
- sorted함수를 이용시 인덱스 순서대로 정렬을 해준다.
3. 코드
n=int(input())
arr=[]
for i in range(n):
a=tuple(map(int, input().split()))
arr.append(a)
arr=sorted(arr)
for k in arr:
print(k[0], k[1])
4. 깨달은 점
- sort() 와 sorted()의 차이
'Algorithm(Python) > BaekJoon' 카테고리의 다른 글
[백준 2747]피보나치 수 (0) | 2021.01.20 |
---|---|
[백준 10989] 수 정렬하기3 (0) | 2021.01.20 |
[백준 1427] 소트인사이드 (0) | 2021.01.18 |
[백준 1920] 수 찾기 (0) | 2021.01.16 |
[백준 10390]SHA-256 (0) | 2021.01.16 |
Comments