Smallest power of 6 whose decimal expansion contains n: Difference between revisions

Content added Content deleted
m (→‎{{header|Quackery}}: oopsadaisy, missed a line)
Line 1,357: Line 1,357:
10 /
10 /
dup 0 = until ]
dup 0 = until ]
drop ] is digitcount ( n --> n )
drop ] is digits ( n --> n )


[ 10 over digitcount
[ 10 over digits
** temp put
** temp put
false unrot
false unrot
Line 1,369: Line 1,369:
over 0 = until ]
over 0 = until ]
2drop
2drop
temp release ] is contains ( n n --> b )
temp release ] is contains ( n n --> b )


[ -1 swap
[ -1 swap
Line 1,376: Line 1,376:
over contains
over contains
until ]
until ]
drop ] is smallest ( n --> n )
drop ] is smallest ( n --> n )


22 times
22 times