Solve hanging lantern problem: Difference between revisions
Added Uiua solution
(Added Uiua solution) |
|||
(One intermediate revision by one other user not shown) | |||
Line 1,418:
There are 73566121315513295589120000 ways to take these 8 columns down.
</pre>
=={{header|Uiua}}==
{{works with|Uiua|0.10.0}}
<syntaxhighlight lang="Uiua">
Fac ← /×+1⇡
Lant ← ÷⊃(/(×⊙Fac)|Fac/+)
Lant [1 2 3]
Lant [1 3 3]
Lant [1 3 3 5 7]
</syntaxhighlight>
{{out}}
<pre>
60
140
5587021440
</pre>
Line 1,424 ⟶ 1,441:
{{trans|Python}}
The result for n == 5 is slow to emerge.
<syntaxhighlight lang="
lantern = Fn.new { |n, a|
var count = 0
Line 1,459 ⟶ 1,476:
{{libheader|Wren-big}}
Alternatively, using library methods.
<syntaxhighlight lang="
import "./big" for BigInt
|