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
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers26
Suggested Problems
-
Remove the two elements next to NaN value
715 Solvers
-
Sum the entries of each column of a matrix which satisfy a logical condition.
176 Solvers
-
10971 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
14518 Solvers
-
Who has power to do everything in this world?
491 Solvers
More from this Author6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I think the third test case is wrong. Anyone else has problem??