Power - Mod Power

Sort by

recency

|

312 Discussions

|

  • + 0 comments

    a = int(input()) b = int(input()) m = int(input()) print(pow(a, b)) print(pow(a, b, m))

  • + 0 comments

    All done in two lines!

    print(pow(int(input()), int(input())))
    print(pow(int(input()),int(input()),int(input())
    
  • + 0 comments

    Here's my oneline code:

    print(*(lambda a,b,m : (pow(a, b), pow(a, b, m)))(*[int(input()) for _ in range(3)]), sep='\n')
    
  • + 0 comments

    a = int(input()) b = int(input()) m = int(input()) print(pow(a,b)) print(pow(a,b,m))

  • + 0 comments

    print(_pow := pow(int(input()), int(input())), _pow % int(input()), sep="\n")