Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/McNuggets-problem/Tailspin/mcnuggets-problem.tailspin
Normal file
10
Task/McNuggets-problem/Tailspin/mcnuggets-problem.tailspin
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
templates largestNonMcNuggetNumber
|
||||
@: { largest: 0, mcNuggetNumbers: [1..$+20 -> 0] };
|
||||
@.mcNuggetNumbers([6,9,20]): 1..3 -> 1;
|
||||
1..$ -> #
|
||||
$@.largest !
|
||||
when <?($@.mcNuggetNumbers($) <=0>)> do @.largest: $;
|
||||
otherwise @.mcNuggetNumbers([$ + 6, $ + 9, $ + 20]): 1..3 -> 1;
|
||||
end largestNonMcNuggetNumber
|
||||
|
||||
100 -> largestNonMcNuggetNumber -> !OUT::write
|
||||
Loading…
Add table
Add a link
Reference in a new issue