title: Modulus of a very large number
body: <p>The user will input 2 integers, x and y, using standard input. You need to calculate the remainder of x modulo y (x % y).</p>
  
  <p>Now, here is the problem:</p>
  
  <p>0 &lt;= x &lt;= 10^100000, (this is "less than or equal" not an arrow).
  0 &lt; y &lt;= 100000</p>
  
  <p>We are looking for optimal solution (Time Complexity). </p>
  
  <p>I didn't find the answer on Stackoverflow, so after finding the solution I thought that I should pose this question here for future reference and to see if there are better ways.</p>