Power - Mod Power

  • + 0 comments
    def power(a,b,m):
        x = pow(a,b)
        y = pow(a,b,m)
        return f'{x}\n{y}'
    
    if __name__ == '__main__':
        a = int(input())
        b = int(input())
        m = int(input())
        result = power(a,b,m)
        print(result)