modular arithmetic - MATLAB Cody - MATLAB Central

Problem 2797. modular arithmetic

Difficulty:Rate

Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit integer.

Example:

a = 1000
b = 1000
c = 3
Answer = 1

Solution Stats

21.81% Correct | 78.19% Incorrect
Last Solution submitted on Feb 26, 2025

Problem Comments

Solution Comments

Show comments
Primes and Rough Numbers, Basic ideas
What is a rough number? What can they be used...
2
4

Problem Recent Solvers69

Suggested Problems

More from this Author44

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page