title: How to find how many times numbers fit into a large number
body: <p>I cannot think of an efficient way to check the best way to put two numbers that equal a larger number. Let me explain it with an example</p>
  <pre><code>no1 = 4;
  no2 = 6;
  
  finalValue = 26;
  </code></pre>
  <p>the algorithm would then find that the best option to get the final number from the two others, so <code>5*4 + 6 = 26</code> or <code>6*3 + 2*4 = 26</code>. (Ideal case) Basically the idea is to go as little over the finalValue as possible. Could anyone please point me to the right direction please? :)</p>
  <p>The programming languages I am using are python, matlab or ideally excel :)</p>