Blame view

15.py 305 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python

import sys;

def factorial(num):
    result = 1;
    for x in range (num,1,-1):
        result *= x;
    return result;

def binomial(m,n):
    return factorial(m)/(factorial(n)*factorial(m-n));

dimension = int(sys.argv[1]);
print "Result is: " + str(binomial(dimension*2,dimension));