Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # from math import gcd
- from fractions import gcd
- def my_gcd(a, b):
- if b == 0:
- return a
- return gcd(b, a % b)
- def non_recurs_gcd(a, b):
- while b != 0:
- a, b = b, a % b
- return a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement