Divide a number by two different numbers in combination

483 Views Asked by At

Similar to this question: How to divide a number by $2$ numbers?

I would like to know how to divide a number (let's say 23) by two different numbers (say, 1.6 and 2.4) to find what combination of the two different numbers makes up exactly 23 - or find out the remainder after reaching the closest number.

Unlike the linked question, I cannot guarantee that the number (23 here) is divisible by any combination of the two different numbers; on top of this I would like to find the most balanced combination of the two different numbers (such as 1.6*5 and 2.4*4 as opposed to 1.6*17 and 2.4*2, just pulling numbers out of thin air to explain the point here).

I'm sure this is a simple question, but I don't know where to start...