MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / combinations

Function combinations

project_euler/problem_53/sol1.py:26–27  ·  view source on GitHub ↗
(n, r)

Source from the content-addressed store, hash-verified

24 xrange = range #Python 3
25
26def combinations(n, r):
27 return factorial(n)/(factorial(r)*factorial(n-r))
28
29total = 0
30

Callers 1

sol1.pyFile · 0.85

Calls 1

factorialFunction · 0.50

Tested by

no test coverage detected