MCPcopy Create free account
hub / github.com/E869120/math-algorithm-book / GCD

Function GCD

codes/python/Code_3_06_4.py:1–4  ·  view source on GitHub ↗
(A, B)

Source from the content-addressed store, hash-verified

1def GCD(A, B):
2 if B == 0:
3 return A # ベースケース
4 return GCD(B, A % B)
5
6A, B = map(int, input().split())
7print(GCD(A, B))

Callers 1

Code_3_06_4.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected