Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
7
Task/McNuggets-problem/PicoLisp/mcnuggets-problem-1.l
Normal file
7
Task/McNuggets-problem/PicoLisp/mcnuggets-problem-1.l
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
(de nuggets1 (M)
|
||||
(let Lst (range 0 M)
|
||||
(for A (range 0 M 6)
|
||||
(for B (range A M 9)
|
||||
(for C (range B M 20)
|
||||
(set (nth Lst (inc C))) ) ) )
|
||||
(apply max Lst) ) )
|
||||
11
Task/McNuggets-problem/PicoLisp/mcnuggets-problem-2.l
Normal file
11
Task/McNuggets-problem/PicoLisp/mcnuggets-problem-2.l
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(de nugg (M)
|
||||
(co 'nugget
|
||||
(for A (range 0 M 6)
|
||||
(for B (range A M 9)
|
||||
(for C (range B M 20)
|
||||
(yield (inc C)) ) ) ) ) )
|
||||
(de nuggets2 (M)
|
||||
(let Lst (range 0 M)
|
||||
(while (nugg 100)
|
||||
(set (nth Lst @)) )
|
||||
(apply max Lst) ) )
|
||||
6
Task/McNuggets-problem/PicoLisp/mcnuggets-problem-3.l
Normal file
6
Task/McNuggets-problem/PicoLisp/mcnuggets-problem-3.l
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
(test
|
||||
T
|
||||
(=
|
||||
43
|
||||
(nuggets1 100)
|
||||
(nuggets2 100) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue