How to resolve the algorithm McNuggets problem step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm McNuggets problem step by step in the Phix programming language

Table of Contents

Problem Statement

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).

Let's start with the solution: