Power - Mod Power - HackerRank Python Math Solution

Author: Al-mamun Sarkar Date: 2020-03-26 09:03:18

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