💡문제접근
💡코드(메모리 : 33376KB, 시간 : 48ms)
import math
import sys
input = sys.stdin.readline
M = int(input())
lst = list(map(int, input().strip().split()))
K = int(input())
total = math.comb(sum(lst), K)
temp = 0
for i in lst:
temp += math.comb(i, K)
print(temp / total)
💡소요시간 : 14m