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

Function twenty_pence

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

Source from the content-addressed store, hash-verified

30
31
32def twenty_pence(x: int) -> int:
33 return 0 if x < 0 else twenty_pence(x - 20) + ten_pence(x)
34
35
36def fifty_pence(x: int) -> int:

Callers 1

fifty_penceFunction · 0.85

Calls 1

ten_penceFunction · 0.85

Tested by

no test coverage detected