题解 | #查找第K小数#
查找第K小数
https://www.nowcoder.com/practice/204dfa6fcbc8478f993d23f693189ffd
n = int(input()) num = list(map(int, input().split(" "))) x = int(input()) - 1 ct = 0 num.sort() if n > 1: for i in range(n - 1): if num[i] < num[i + 1]: ct += 1 ans = num[i + 1] if ct == x: break else: ans = num[0] print(ans)