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