Tuesday, 16 October 2018

elementary number theory - Calculate 25104bmod10 using mental arithmetic

I am practising interview for Jane Street's trader internship and I found the following question.




Question: Calculate 25104mod10 using mental arithmetic.





I know that 25mod102mod10.
So,
25104=(25)1020242102024=(25)20424(25)4028(25)828(25)326mod10.



However, I find the calculations above very taxing if I use mental arithmetic. I believe there should be a faster way to answer the question but I am not able to find one.

No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find limh0sin(ha)h without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...