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 25mod10≡2mod10.
So,
25104=(25)102024≡2102024=(25)20424≡(25)4028≡(25)828≡(25)32≡6mod10.
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