๋ฌธ์
https://www.acmicpc.net/problem/11004
ํ์ด
# ๋ฐฑ์ค 11004๋ฒ ๋ฌธ์ - K๋ฒ์งธ ์
import sys
input = sys.stdin.readline
n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
print(a[k-1])
์๊ฐ๋ณต์ก๋๊ฐ ํฌ๊ธฐ ๋๋ฌธ์ ๋ณํฉ์ ๋ ฌ๋ก ํ์ด์ผ ํ๋ค๊ณ ํ๋๋ฐ ๋๋ ์ผ์ด์ค๋ฅผ ํต๊ณผํ์๋ค.
๋ณํฉ์ ๋ ฌ์ ๋ค์ ๋ฒ์ ๋ค๋ฃจ๋๋ก ํด์ผ๊ฒ ๋ค.
'๐๏ธ Algorithm > ๐ฉ ๋ฐฑ์ค' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
๐ฉ [๋ฐฑ์ค] [Python] [Silver5] 7785๋ฒ_ํ์ฌ์ ์๋ ์ฌ๋ (0) | 2023.04.11 |
---|---|
๐ฉ [๋ฐฑ์ค] [Python] [Silver4] 11652๋ฒ_์นด๋ (0) | 2023.04.10 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 15683๋ฒ_๊ฐ์ (0) | 2023.04.05 |
๐ฉ [๋ฐฑ์ค] [Python] [Silver3] 1213๋ฒ_ํฐ๋ฆฐ๋๋กฌ ๋ง๋ค๊ธฐ (0) | 2023.04.04 |
๐ฉ [๋ฐฑ์ค] [Python] [Gold4] 1976๋ฒ_์ฌํ ๊ฐ์ (1) | 2023.04.03 |