Greatest common divisor using Euclid's algorithm.
(a, b)
| 5 | from abc import ABCMeta |
| 6 | |
| 7 | def gcd(a, b): |
| 8 | """Greatest common divisor using Euclid's algorithm.""" |
| 9 | while a: |
| 10 | a, b = b%a, a |
| 11 | return b |
| 12 | |
| 13 | def isint(x): |
| 14 | """Test whether an object is an instance of int.""" |