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