Power - Mod Power
February 08, 2024
Task You are given three integers: , , and . Print two lines. On the first line, print the result of pow(a,b). On the second line, print the result of pow(a,b,m).
Sample Input
3
4
5
Sample Output
81
1
# Enter your code here. Read input from STDIN. Print output to STDOUT
a = int(input())
b = int(input())
c = int(input())
d = pow(a,b)
e = pow(a,b,c)
print(d)
print(e)
Last updated