Все задачи на 5.10.17 13:00

This commit is contained in:
2017-10-05 13:08:02 +03:00
parent 93746b05d7
commit ca2ca71f63
120 changed files with 2343 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import sys
sys.stdin = open('count.in', 'r')
sys.stdout = open('count.out', 'w')
m, n = list(map(int, input().split()))
x = [[0 for i in range(31)] for j in range(31)]
s = 0
for i in range(31):
x[1][i] = 1
for i in range(2, m+1):
for j in range(n+1):
for k in range(j+1):
x[i][j] += x[i-1][k]
for i in range(n+1):
s += x[m][i]
print(s)