2009-07-16 Pythonでユークリッドの互除法 Python いつの間にか一週間ぐらい空いてしまったので ユークリッドの互除法でも書きます。 def gcd(a, b): if b == 0: return a else: return gcd(b, a % b)