McNuggets problem: Difference between revisions

Content added Content deleted
m (syntax highlighting fixup automation)
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
Line 2,231: Line 2,231:
<pre>Maximum non-McNuggets number is 43</pre>
<pre>Maximum non-McNuggets number is 43</pre>


=={{header|Vlang}}==
=={{header|V (Vlang)}}==
{{trans|Go}}
{{trans|Go}}
<syntaxhighlight lang="vlang">fn mcnugget(limit int) {
<syntaxhighlight lang="v (vlang)">fn mcnugget(limit int) {
mut sv := []bool{len: limit+1} // all false by default
mut sv := []bool{len: limit+1} // all false by default
for s := 0; s <= limit; s += 6 {
for s := 0; s <= limit; s += 6 {