Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/McNuggets-problem/Quackery/mcnuggets-problem.quackery
Normal file
26
Task/McNuggets-problem/Quackery/mcnuggets-problem.quackery
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
0 temp put
|
||||
100 6 / times
|
||||
[ i 6 *
|
||||
100 9 / times
|
||||
[ dup i 9 * +
|
||||
100 20 / times
|
||||
[ dup i 20 * +
|
||||
dup 101 < if
|
||||
[ dup bit
|
||||
temp take | temp put ]
|
||||
drop ]
|
||||
drop ]
|
||||
drop ]
|
||||
-1 temp take
|
||||
101 times
|
||||
[ dup i bit & 0 =
|
||||
if
|
||||
[ nip i swap
|
||||
conclude ] ]
|
||||
drop dup 0 < iff
|
||||
[ drop
|
||||
say "There are no non-McNugget numbers below 101" ]
|
||||
else
|
||||
[ say "The largest non-McNugget number below 101 is "
|
||||
echo ]
|
||||
char . emit
|
||||
Loading…
Add table
Add a link
Reference in a new issue