We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Math
- Power - Mod Power
- Discussions
Power - Mod Power
Power - Mod Power
Sort by
recency
|
331 Discussions
|
Please Login in order to post a comment
a=int(input()) b=int(input()) m=int(input()) print(pow(a,b)) print(pow(a,b,m))
a=int(input()) b=int(input()) m=int(input()) print(pow(a,b)) print(pow(a,b,m))
Enter your code here. Read input from STDIN. Print output to STDOUT"'
''' a = 3 b = 4 m = 0 result1 = pow(a,b) result2=pow(a,m) print(result1) print(result2) ''' a = int (input()) b = int (input()) m = int (input()) q = pow(a,b) r = pow(a,b,m) print(q) print(r)
Here is the Python3 code for the Problem.... it is simple and understandable
a=int(input()) b=int(input()) m=int(input()) new=pow(a,b) print(new) new1=pow(a,b,m) print(new1)
a = int (input()) b = int (input()) m = int (input())
q = pow(a,b) r = pow(a,b,m)
print(q) print(r)
For easy learning