Power - Mod Power - HackerRank Python Math Solution

Power - Mod Power - HackerRank Python Math Solution

Instructor-svgAl-Mamun Sarkar
Mar 26 , 2020

Power - Mod Power - HackerRank Python Math Solution. The following shows how to solve the HackerRank Power - Mod Power Python Math problem.

Code:

a = int( input() )
b = int( input() )
m = int( input() )

print( pow(a, b) )
print( pow(a, b, m) )

 

Test Input:

3
4
5

Test Output:

81
1
  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram