RosettaCodeData/Task/McNuggets-problem/Zkl/mcnuggets-problem.zkl

5 lines
185 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
nuggets:=[0..101].pump(List()); // (0,1,2,3..101), mutable
foreach s,n,t in ([0..100/6],[0..100/9],[0..100/20])
{ nuggets[(6*s + 9*n + 20*t).min(101)]=0 }
println((0).max(nuggets));