title: Long integer - python 3 vs python 2
body: <p>I need help to understand why this piece of code works correctly in python 2 but it doesn't work for python 3.</p>
  
  <pre><code>res = 76460188758730153884232119087179527041998988911761118644170793575
  while res &gt; 31:
      print(res%31)
      res = (res - res%31)/ 31
  </code></pre>
  
  <p>In python 2 the result of res%31 is: 23, 17, 2, 28, 17, 17</p>
  
  <p>In python 3 the result of res%31 is: 23, 4.0, 17.0, 6.0, 21.0, 22.0, 18.0, 14.0</p>
  
  <p>I'm having problems with long numbers in python3, but I can't solve them.</p>
  
  <p>Thanks in advance,</p>