It looked initially like a linear algebra puzzle which should be solvable with matrices, except that the score is a product of the terms with a floor function. So I was stuck on an elegant solution as my matrix fu only goes so far.
generated 10 million random matrices for the ingredient proportions, did matrix multiplication of the ingredients to get a score matrix which I could then apply the pmax function to row wise and then calculate the final cumulative product for each row. Then select the max of those. Repeat several times till I got a candidate best.
Sample the space around the best candidate to check it was a maximum. That gave a heuristic answer for part a which was correct.
Simple matrix multiplication to get the calories for each recipe, then select the max score where calories==500 (my target). That heuristic also worked.
Why don't I like it? Because it doesn't guarantee to give the right answer. I may just be lucky (but the more I try the luckier I get
)