Smallest power of 6 whose decimal expansion contains n: Difference between revisions
Content added Content deleted
m (→{{header|Wren}}: Minor tidy) |
(Added Uiua solution) |
||
Line 1,693: | Line 1,693: | ||
21**3 : 216 |
21**3 : 216 |
||
</pre> |
</pre> |
||
=={{header|Uiua}}== |
|||
<syntaxhighlight lang="uiua"> |
|||
# Does number a contain subseq b? (a b) -> bool |
|||
Contains ← >1⧻◴⌕:∩°⋕ |
|||
# Repeatedly multiple by 6 until the result contains n. |
|||
FindN ← ⊙◌⍢(×6|¬ Contains) 1 |
|||
# Work out what the power was for each :-) |
|||
∵(⊟⁅÷∩(ₙ10)6 .FindN) ⇡22 |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
[10077696 216 216 36 46656 46656 36 7776 2176782336 1296 10077696 2821109907456 1296 13060694016 131621703842267140 101559956668416 216 60466176 470184984576 21936950640377856 170581728179578200000 216] |
|||
</pre> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
{{libheader|Wren-big}} |
{{libheader|Wren-big}} |