From e46daa284581f0c78068cf3cec3fee326fcfa7a4 Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Mon, 14 Nov 2016 21:25:35 +0100 Subject: [PATCH] Fixed gcd algorithm. --- tasksetgen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasksetgen.py b/tasksetgen.py index 1b8c702..75330bc 100755 --- a/tasksetgen.py +++ b/tasksetgen.py @@ -46,6 +46,8 @@ def query_yes_no(question, default=None): return False def gcd(a, b): + if b == 0: + return a return gcd(b, a % b) def lcm(a, b): -- libgit2 0.26.0