I have some code to count permutations and combinations, and I\'m trying to make it work better for large numbers.
I\'ve found a better algorithm for permutations th
You could input two integers and import math library to find the factorial and then apply the nCr formula
import math n,r=[int(_)for _ in raw_input().split()] f=math.factorial print f(n)/f(r)/f(n-r)