title: Simplify ratios inside of container
body: <p>Suppose you are given a container of ratios and you want to simplify the ratios to the lowest integers.</p>
  
  <p>Input:</p>
  
  <pre><code>std::vector&lt;int&gt; v1 = { 10, 20 , 30, 40 };
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>1,2,3,4
  </code></pre>
  
  <p>How does one solve this for n-sized container? I am looking for general solution, that works for any number of elements and any integer values.</p>