MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / solution

Function solution

project_euler/problem_191/sol1.py:89–100  ·  view source on GitHub ↗

Returns the number of possible prize strings for a particular number of days, using a simple recursive function with caching to speed it up. >>> solution() 1918080160 >>> solution(4) 43

(days: int = 30)

Source from the content-addressed store, hash-verified

87
88
89def solution(days: int = 30) -> int:
90 """
91 Returns the number of possible prize strings for a particular number
92 of days, using a simple recursive function with caching to speed it up.
93
94 >>> solution()
95 1918080160
96 >>> solution(4)
97 43
98 """
99
100 return _calculate(days, absent=0, late=0)
101
102
103if __name__ == "__main__":

Callers 1

sol1.pyFile · 0.70

Calls 1

_calculateFunction · 0.85

Tested by

no test coverage detected