Explore BrainMass

Modular Arithmetic

5^1367 mod 50174

How would I solve this? Would I need to use square and multiply?

Solution Preview

The answer is 47997

To solve this problem, we can use a small piece of java code. The basic idea is to use square and multiply. The code can be recursive and very simple. The Java code ...

Solution Summary

Java code is used to solve a modular arithmetic problem.