Wikipedia
The McNuggets version of the coin problem was introduced by Henri Picciotto,
who included it in his algebra textbook co-authored with Anita Wah. Picciotto
thought of the application in the 1980s while dining with his son at
McDonald's, working the problem out on a napkin. A McNugget number is
the total number of McDonald's Chicken McNuggets in any number of boxes.
In the United Kingdom, the original boxes (prior to the introduction of
the Happy Meal-sized nugget boxes) were of 6, 9, and 20 nuggets.

Task

Calculate (from 0 up to a limit of 100) the largest non-McNuggets
number (a number n which cannot be expressed with 6x + 9y + 20z = n
where x, y and z are natural numbers).




100H:
BDOS: PROCEDURE (FN, ARG); DECLARE FN BYTE, ARG ADDRESS; GO TO 5; END BDOS;
EXIT: PROCEDURE; CALL BDOS(0,0); END EXIT;
PRINT: PROCEDURE (S); DECLARE S ADDRESS; CALL BDOS(9, S); END PRINT;
 
PRINT$NUMBER: PROCEDURE (N);
    DECLARE S (6) BYTE INITIAL ('...',13,10,'$');
    DECLARE P ADDRESS, (N, C BASED P) BYTE;
    P = .S(3);
DIGIT:
    P = P-1;
    C = N MOD 10 + '0';
    N = N/10;
    IF N>0 THEN GO TO DIGIT;
    CALL PRINT(P);
END PRINT$NUMBER;
 
DECLARE (A, B, C) BYTE;
DECLARE NUGGET (101) BYTE;
 
DO A=0 TO 100; NUGGET(A) = 0; END;
DO A=0 TO 100 BY 6;
    DO B=A TO 100 BY 9;
        DO C=B TO 100 BY 20;
            NUGGET(C) = -1;
        END;
    END;
END;
 
A = 100;
DO WHILE NUGGET(A); A = A-1; END;
CALL PRINT$NUMBER(A);
CALL EXIT;
EOF