Hello,

I can't recall how to deal with large exponents in modular arithmetic.

Specifically, the question is to determine the value of 8^402 mod 5.

It is equivalent to (2^402 mod 5)^3 (since 2^3=8) from what I recall, but not sure how that helps...

Thanks!