1
This commit is contained in:
26
levieProekti/Olymp2020/man10,12,2020/maxdobutok.py
Normal file
26
levieProekti/Olymp2020/man10,12,2020/maxdobutok.py
Normal file
@@ -0,0 +1,26 @@
|
||||
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):
|
||||
Reference in New Issue
Block a user