From da90ea0a159c31cceb56b00bea730dd8d29a24d6 Mon Sep 17 00:00:00 2001 From: Ryuhei Mori Date: Sun, 21 Jun 2020 15:59:49 +0900 Subject: [PATCH] revised --- src/gcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gcd.c b/src/gcd.c index 2792dbc..9eca57c 100644 --- a/src/gcd.c +++ b/src/gcd.c @@ -1,8 +1,10 @@ #include -const int n = 10000; +const int n = 1000; unsigned int Euclidean_gcd_rec(unsigned int x, unsigned int y){ + if(x == 0) return y; + return Euclidean_gcd_rec(y % x, x); } /*