You are viewing a single comment's thread. Return to all comments →
a = int(input()) b = int(input()) m = int(input())
x = (a**b) print(x)
y = pow(a,b,m) print(y)
Power - Mod Power
You are viewing a single comment's thread. Return to all comments →
A simple solution
a = int(input()) b = int(input()) m = int(input())
x = (a**b) print(x)
y = pow(a,b,m) print(y)