Cody

Problem 2396. last n digit of a power function

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

28.4% Correct | 71.6% Incorrect
Last Solution submitted on Mar 13, 2020

Problem Comments

Solution Comments