New problem idea Chicken McNuggets

Back to General discussions forum

bananappp     2020-03-04 03:51:44

Hello fellow programmers!

I have a new programming program idea. I once encountered a mathematical theorem named the ChickenMcnugget theorem and it seemed interesting. It states that for relatively prime positive integers A and B, the maximum number that cannot be expressed as Ax+By such that x and y are positive integers is AB-A-B. More information can be found at https://artofproblemsolving.com/wiki/index.php/ChickenMcNuggetTheorem. Note: There are underscores o both sides of the McNugget

In the old days, you could only buy McNuggets from McDonalds in packs of 9 or 20. People began wondering the greatest amount of McNuggest that couldn't be bought in packs of 9 and 20. Out of that inquiry came the theorem

Anyways, to the point. Basically, the problem I suggest is that the input will be in the form A B C N, in which A,B, and C are the number of Chicken McNuggets per pack. N will be the amount of Chicken McNuggests the person wishes to buy.

The output should be whether it is possible to buy N nuggets in packs of A,B, and C (Basically Y or N form).

Rodion (admin)     2020-03-04 16:53:29
User avatar

Hi Friend!

That is curious! I think it is loosely related to Two Printers but as we want precise solution this may be quite different thing.

I suspect first of all I need to try and figure out solution myself :)

Let's put this in the issues list, so it is not lost accidentally: #67.

Thanks for suggestion, I'll go thinking...

Please login and solve 5 problems to be able to post at forum