From 3bd13f76ac41c0d9514549f1615d135f512c031c Mon Sep 17 00:00:00 2001 From: Carl Date: Sat, 14 Oct 2023 23:02:32 +0200 Subject: [PATCH] Fix --- exercises/practice/collatz-conjecture/.meta/src/example.cr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/practice/collatz-conjecture/.meta/src/example.cr b/exercises/practice/collatz-conjecture/.meta/src/example.cr index 6084941a..297b4287 100644 --- a/exercises/practice/collatz-conjecture/.meta/src/example.cr +++ b/exercises/practice/collatz-conjecture/.meta/src/example.cr @@ -7,13 +7,13 @@ module CollatzConjecture n = input steps = 0 until n == 1 - if n.divisible_by?(2) + if n % 2 == 0 n /= 2 else n = 3 * n + 1 end - steps += steps + steps += 1 end steps