MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / combinations

Function combinations

project_euler/problem_053/sol1.py:23–24  ·  view source on GitHub ↗
(n, r)

Source from the content-addressed store, hash-verified

21
22
23def combinations(n, r):
24 return factorial(n) / (factorial(r) * factorial(n - r))
25
26
27def solution():

Callers 2

solutionFunction · 0.70
solutionFunction · 0.50

Calls 1

factorialFunction · 0.90

Tested by

no test coverage detected