HackerRank Python - Power - Mod Power

You are given three integers: a, b, and m, respectively. Print two lines.
The first line should print the result of pow(a,b). The second line should print the result of pow(a,b,m).

  1. # Enter your code here. Read input from STDIN. Print output to STDOUT
  2. a, b, m = [int(input()) for _ in range(3)]
  3. print(pow(a, b), pow(a, b, m), sep='\n')


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube