조합을 이용한 문제풀이
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)