MCPcopy Create free account
hub / github.com/ActiveState/code / gcd

Function gcd

recipes/Python/578421_Greatest_CommDivisor_using/recipe-578421.py:1–8  ·  view source on GitHub ↗
(a,b)

Source from the content-addressed store, hash-verified

1def gcd(a,b):
2 t = b
3 b = a % b
4
5 if b == 0:
6 return t
7 else:
8 return gcd(t,b)
9
10def main(argv):
11 if (len(sys.argv) != 3):

Callers 2

mainFunction · 0.70
keygenFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected