April 21st, 2009
Fast GCD (greatest common denominator) in python. Significantly faster than using recursion.
def gcd(x,y): while x: x, y = y % x, x return y |
Fast GCD (greatest common denominator) in python. Significantly faster than using recursion.
def gcd(x,y): while x: x, y = y % x, x return y |