How would I evaluate this?
19 ^ 99 mod 160
The usual method using Euler's Theorem doesn't seem to help.
Is there another strategy I should learn about?
How would I evaluate this?
19 ^ 99 mod 160
The usual method using Euler's Theorem doesn't seem to help.
Is there another strategy I should learn about?
ghci> 19^99 `mod` 160
139
(The other poster's idea of doing the multiplications mod 160 is also correct.)