From 287d32d64191c7a62d9dd9c83162eac0b5db38c8 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 24 Sep 2022 13:13:34 +0200 Subject: Format with Black --- gcd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcd.py b/gcd.py index d6774a0..3690ef5 100755 --- a/gcd.py +++ b/gcd.py @@ -3,16 +3,18 @@ import sys import functools + def gcd2(a, b): if b == 0: return a else: return gcd2(b, a % b) + def gcdn(ns): return functools.reduce(gcd2, ns) + ints = map(int, sys.argv[1:]) gcd = gcdn(ints) print(gcd) - -- cgit v1.2.3