• + 0 comments
    mod=1000000007
    def solve(a, b):
        # Write your code here
        a=int(a)
        b=0
        for i in b:
            b=(b*10+int(i))%(mod-1)
        return pow(a,b,mod)