Create 6 - Hailstone
This commit is contained in:
parent
60963afc29
commit
4bdca34c81
5
16/6 - Hailstone
Normal file
5
16/6 - Hailstone
Normal file
@ -0,0 +1,5 @@
|
||||
def hailstone(n):
|
||||
print(n)
|
||||
if n != 1:
|
||||
if n%2: hailstone(3*n+1)
|
||||
else: hailstone(n//2)
|
Loading…
Reference in New Issue
Block a user