Data update
This commit is contained in:
parent
aec8ed51b6
commit
29a5eea0d4
128 changed files with 1298 additions and 0 deletions
15
Task/McNuggets-problem/ABC/mcnuggets-problem.abc
Normal file
15
Task/McNuggets-problem/ABC/mcnuggets-problem.abc
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
PUT {1..100} IN non.nuggets
|
||||
|
||||
PUT 0 IN a
|
||||
WHILE a <= 100:
|
||||
PUT a IN b
|
||||
WHILE b <= 100:
|
||||
PUT b IN c
|
||||
WHILE c <= 100:
|
||||
IF c in non.nuggets:
|
||||
REMOVE c FROM non.nuggets
|
||||
PUT c+20 IN c
|
||||
PUT b+9 IN b
|
||||
PUT a+6 IN a
|
||||
|
||||
WRITE "Maximum non-McNuggets number:", max non.nuggets/
|
||||
Loading…
Add table
Add a link
Reference in a new issue