Calculate the power of a given a base, exponent. Return the last n digit number.

Example 1:
base = 3; expo = 8; n = 3;
3^8 = 6561
return the last 3 digit number 561.
Example 2:
base = 3; expo = 10; n = 3;
3^10 = 59049
return the last 3 digit number 49.
  • base, exponent and n are natural numbers

Solution Stats

106 Solutions

26 Solvers

Last Solution submitted on May 28, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers26

Suggested Problems

More from this Author6

Community Treasure Hunt

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

Start Hunting!