Power - Mod Power

Sort by

recency

|

323 Discussions

|

  • + 1 comment

    a, b, m=map(int, [input() for _ in range(3)]) print(pow(a,b)) print(pow(a,b,m))

  • + 0 comments

    Here is HackerRank Power - Mod Power in Python solution - https://programmingoneonone.com/hackerrank-power-mod-power-solution-in-python.html

  • + 1 comment
    a=int(input())
    b=int(input())
    m=int(input())
    print(pow(a,b))
    print(pow(a,b,m))
    
  • + 0 comments

    a=int(input()) b=int(input()) m=int(input()) print(f"{pow(a,b)}\n{pow(a,b,m)}")

  • [deleted]
    + 0 comments

    just 4 lines

    x=int(input())
    y=int(input())
    m=int(input())
    print(pow(x,y),pow(x,y,m),sep="\n")