Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/Executable-library/Lua/executable-library-2.lua
Normal file
11
Task/Executable-library/Lua/executable-library-2.lua
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env luajit
|
||||
local lib=require"hailstone"
|
||||
local longest,longest_i=0,0
|
||||
for i=1,1e5 do
|
||||
local len=#lib.hailstone(i)
|
||||
if len>longest then
|
||||
longest_i=i
|
||||
longest=len
|
||||
end
|
||||
end
|
||||
print("Longest sequence at "..longest_i..", length "..longest)
|
||||
Loading…
Add table
Add a link
Reference in a new issue