RosettaCodeData/Task/McNuggets-problem/ABC/mcnuggets-problem.abc

16 lines
330 B
Plaintext

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/