You are viewing a single comment's thread. Return to all comments →
a = int(input()) b = int(input()) m = int(input()) print(pow(a, b)) print(pow(a, b, m))
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Power - Mod Power
You are viewing a single comment's thread. Return to all comments →
For Python3
I guess this is as simple as it can get. If anyone didn't understand, feel free to comment and I will try to explain