ans for in range 13 append map int input split soch list map int input

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
f = [0]
k = 1
ans = 0
for i in range(1, 13):
k *= i
f.append(k)
n, k = map(int, input().split())
soch = list(map(int, input().split()))
for i in range(1, len(soch) + 1):
ans += (soch[i - 1] - 1) * (f[n - i] // f[n - k])
print(ans)