18 lines
366 B
Plaintext
18 lines
366 B
Plaintext
dim nuggets(100)
|
|
|
|
for six = 0 to 100/6
|
|
for nine = 0 to 100/9
|
|
for twenty = 0 to 100/20
|
|
n = six*6 + nine*9 + twenty*20
|
|
if n <= 100 then nuggets(n) = 1
|
|
next twenty
|
|
next nine
|
|
next six
|
|
|
|
for n = 100 to 1 step -1
|
|
if nuggets(n) <> 1 then
|
|
print "Maximum non-McNuggets number is: "; n
|
|
end
|
|
end if
|
|
next n
|