Закинул ещё мусора с Интеллекта, наверное это последнее

This commit is contained in:
2017-10-07 18:43:57 +03:00
parent 07b1c4e0e1
commit 90f20f9fd0
17 changed files with 732 additions and 33 deletions

9
uts/uts_17_aut_py/4/B.py Normal file
View File

@@ -0,0 +1,9 @@
n, k = list(map(int, input().split()))
find = tuple(map(int, input().split()))
from itertools import combinations_with_replacement
cnt = 0
for i in combinations_with_replacement(range(1, n+1), k):
if i == find:
print(cnt)
break
cnt += 1