Suppose I need quantity Q grams of honey, and I can buy packs of honey in either 340g or 454g pack sizes. These packs cost 1.79 and 2.19 respectively (cost per kilo is therefore 5.26 and 4.82 respectively)
I buy m packs of 340g and n packs of 454g
Question: express m & n in terms of Q in order to minimise cost for any given Q.
I believe this is a solution: https://www.experts-exchange.com/questions/29063883/Optimum-pack-size-purchases-follow-up-to-minimum-cost-solution.html
But this maybe overbaking it (the least common multiple of 340 and 454 is 77180)
Wandering if I'm missing a shortcut somewhere.