ac100%
思路:

面为 1 ~ i - 1 的所有组合 , 即 (i-1) ^ n种 ,相应的 1 ~ i的所有组合 有 (i)^n种,所以最大面出现的组合数为i^n - (1-i)^n,

n = int(input())
Xi_lst = list(map(int, input().split()))
pre = 0
ans = 0
max_num = max(Xi_lst)
for i in range(1,max_num+1):
    now = 1
    for j in Xi_lst:
        if j > i:
            now *= (i/j)
    ans += (now-pre) *i
    pre = now
print('%.2f'%ans)

参考:

  1. http://codeforces.com/problemset/problem/453/A

  2. https://www.cnblogs.com/chaiwenjun000/p/5321135.html