How can I make the following script more intelligent, like a human would do it?
(avoiding the redundant calculations of the full factorials)
def combinations_without_repetition(n, r):
return (factorial(n) / (factorial(r) * (factorial(n - r))))
combinations_without_repetition(10, 5)
(I get errors: Too large values.)