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

Function two_pence

project_euler/problem_031/sol1.py:20–21  ·  view source on GitHub ↗
(x: int)

Source from the content-addressed store, hash-verified

18
19
20def two_pence(x: int) -> int:
21 return 0 if x < 0 else two_pence(x - 2) + one_pence()
22
23
24def five_pence(x: int) -> int:

Callers 1

five_penceFunction · 0.85

Calls 1

one_penceFunction · 0.85

Tested by

no test coverage detected