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.64% Correct | 78.36% Incorrect
Last Solution submitted on May 06, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Group

Matrix Patterns II Image
Matrix Patterns II
  • 15 Problems
  • 69 Finishers

Problem Recent Solvers71

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