Puzzle - RPL and others
|
05-07-2021, 02:56 AM
Post: #30
|
|||
|
|||
RE: Puzzle - RPL and others
Previous post Python code, translated to Lua.
Since Lua does not have infinite precision integer built-in, I just loop the digits for MOD. As expected, speed improved quite a bit, about 5X. (LuaJIT 1.1.8) I have confirmed n=60 has no solution ... in an hour. Code: do lua> puzzle5(8) 3,2,5,4,1,6,7 5,2,3,4,7,6,1 5,6,7,4,3,2,1 lua> puzzle5(10) 3,8,1,6,5,4,7,2,9 lua> puzzle5(14) 9,12,3,10,5,4,7,6,11,8,1,2,13 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)