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

Function solution

project_euler/problem_113/sol1.py:63–71  ·  view source on GitHub ↗

Calculate the number of non-bouncy numbers less than a googol. >>> solution(6) 12951 >>> solution(10) 277032

(num_digits: int = 100)

Source from the content-addressed store, hash-verified

61
62
63def solution(num_digits: int = 100) -> int:
64 """
65 Calculate the number of non-bouncy numbers less than a googol.
66 >>> solution(6)
67 12951
68 >>> solution(10)
69 277032
70 """
71 return non_bouncy_upto(num_digits)
72
73
74if __name__ == "__main__":

Callers 1

sol1.pyFile · 0.70

Calls 1

non_bouncy_uptoFunction · 0.85

Tested by

no test coverage detected