Power - Mod Power

Sort by

recency

|

310 Discussions

|

  • + 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")

  • + 0 comments
    a = int(input())
    b = int(input())
    m = int(input())
    print(pow(a, b))
    print(pow(a, b, m))
    
  • + 0 comments
    n1, n2, n3 = int(input()), int(input()), int(input())
    
    print(f"{pow(n1, n2)}\n{pow(n1, n2, n3)}")