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

Function is_digit_cancelling

project_euler/problem_033/sol1.py:23–26  ·  view source on GitHub ↗
(num: int, den: int)

Source from the content-addressed store, hash-verified

21
22
23def is_digit_cancelling(num: int, den: int) -> bool:
24 return (
25 num != den and num % 10 == den // 10 and (num // 10) / (den % 10) == num / den
26 )
27
28
29def fraction_list(digit_len: int) -> list[str]:

Callers 1

fraction_listFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected