summaryrefslogtreecommitdiff
path: root/progs/a711.py
blob: 860a3060737e3e74b42ca449bfe981764780c6e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
def bin_coff(n, r): 
	val = 1
	if (r > (n - r)): 
		r = (n - r) 
	for i in range(0, r): 
		val *= (n - i) 
		val //= (i + 1) 
	return val 
def find_ways(M): 
	n = M // 2
	a = bin_coff(2 * n, n) 
	b = a // (n + 1) 
	return (b)