12 lines
259 B
Text
12 lines
259 B
Text
!import!hailstone
|
|
|
|
local :counts {}
|
|
set-default counts 0
|
|
for i range 1 99999:
|
|
set-to counts swap ++ counts! dup len hailstone i
|
|
|
|
local :maxlen 0
|
|
for k in keys counts:
|
|
if < maxlen counts! k:
|
|
set :maxlen counts! k
|
|
!print( "Maximum length: " to-str maxlen )
|