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