lair of the dustbunny
Saturday, November 15, 2008
99 problems - python - 33
Determine whether two positive integer numbers are coprime. Two numbers are coprime if their greatest common divisor equals 1.
Using gcd as defined in the previous problem:
def coprime(m,n):
return gcd(m,n) == 1
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment