Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/McNuggets-problem/BCPL/mcnuggets-problem.bcpl
Normal file
18
Task/McNuggets-problem/BCPL/mcnuggets-problem.bcpl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
get "libhdr"
|
||||
manifest $( limit = 100 $)
|
||||
|
||||
let start() be
|
||||
$( let flags = vec limit
|
||||
for i = 0 to limit do flags!i := false
|
||||
|
||||
for a = 0 to limit by 6
|
||||
for b = a to limit by 9
|
||||
for c = b to limit by 20
|
||||
do flags!c := true
|
||||
|
||||
for i = limit to 0 by -1
|
||||
unless flags!i
|
||||
$( writef("Maximum non-McNuggets number: %N.*N", i)
|
||||
finish
|
||||
$)
|
||||
$)
|
||||
Loading…
Add table
Add a link
Reference in a new issue