Files
pythonmc/levieProekti/Olymp2020/man10,12,2020/maxdobutok.py
BarsTiger 68fb5410ee 1
2021-10-15 12:46:53 +03:00

27 lines
437 B
Python

n, nmax = input().split()
chisla = input().split()
n = int(n)
nmax = int(nmax)
for i in range(len(chisla)):
chisla[i] = int(chisla[i])
maxdobutok = 0
def fact(n):
factorial = 1
while n > 1:
factorial *= n
n -= 1
return factorial
# def umozatel(dobutok, n):
sochetaniy = fact(n)//fact(n - nmax)//fact(nmax)
# for eaeao in range(sochetaniy):
# for i in range(n):
# for j in range(nmax):