Data update
This commit is contained in:
parent
61b93a2cd1
commit
5af6d93694
858 changed files with 20572 additions and 2082 deletions
18
Task/McNuggets-problem/BASIC256/mcnuggets-problem.basic
Normal file
18
Task/McNuggets-problem/BASIC256/mcnuggets-problem.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
arraybase 1
|
||||
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] = true
|
||||
next twenty
|
||||
next nine
|
||||
next six
|
||||
|
||||
for n = 100 to 1 step -1
|
||||
if nuggets[n] = false then
|
||||
print "Maximum non-McNuggets number is: "; n
|
||||
exit for
|
||||
end if
|
||||
next n
|
||||
Loading…
Add table
Add a link
Reference in a new issue