Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
meatball133 committed Oct 14, 2023
1 parent 9d042a0 commit 3bd13f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/collatz-conjecture/.meta/src/example.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bd13f7

Please sign in to comment.