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 | 31 |
Tags
- 재귀
- BOJ
- 백준
- 브루트포스
- 프로그래머스
- programmers
- level2
- 딕셔너리
- level0
- 구현
- level3
- 가상메모리 관리
- 힙
- 운영체제
- 그리디
- 가상메모리
- 파이썬
- MYSQL
- BFS
- 다익스트라
- N과M
- python
- level1
- 수학
- dict
- 다이나믹 프로그래밍
- 코딩테스트
- dfs
- 스택
- DP
Archives
- Today
- Total
동캄의 코딩도장
백준 18310 [안테나] 파이썬 본문
https://www.acmicpc.net/problem/18310
#백준 18310
from math import *
import sys
n=int(sys.stdin.readline())
lst=list(map(int,input().split()))
ans=0
lst.sort()
if len(lst)%2==0:
ans=lst[(len(lst)//2)-1]
else:
ans=lst[(len(lst)//2)]
print(ans)
'코테 > BOJ' 카테고리의 다른 글
백준 1448 [삼각형 만들기] 파이썬 (0) | 2022.09.04 |
---|---|
백준 13417 [카드 문자열] 파이썬 (0) | 2022.09.03 |
백준 5545 [최고의 피자] 파이썬 (0) | 2022.09.03 |
백준 2872 [우리집엔 도서관이 있어] 파이썬 (0) | 2022.09.03 |
백준 12845 [모두의 마블] 파이썬 (2) | 2022.09.03 |