omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / tasks / greatest-common-divisor / oracle.py
| 1 | # Independent reference for "Greatest common divisor" (Python 3, standard library only). |
| 2 | # expected.txt is this program's stdout; omc never produced it. |
| 3 | import math |
| 4 | for a, b in [(1071, 1029), (40902, 24140), (12, 18), (17, 5), (0, 5), (2**64 - 1, 6148914691236517205)]: |
| 5 | print(f"gcd({a}, {b}) = {math.gcd(a, b)}") |