Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/McNuggets-problem/Ring/mcnuggets-problem.ring
Normal file
19
Task/McNuggets-problem/Ring/mcnuggets-problem.ring
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Nuggets = list(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 and not (six = 0 and nine = 0 and twenty = 0)
|
||||
Nuggets[n] = true
|
||||
ok
|
||||
next
|
||||
next
|
||||
next
|
||||
|
||||
for n = 100 to 1 step -1
|
||||
if Nuggets[n] = false
|
||||
? "Maximum non-McNuggets number is: " + n
|
||||
exit
|
||||
ok
|
||||
next
|
||||
Loading…
Add table
Add a link
Reference in a new issue