Pagini recente » Cod sursa (job #2432492) | Cod sursa (job #2503569) | Cod sursa (job #1122805) | Cod sursa (job #442966) | Cod sursa (job #2732829)
def const():
return 1999999973
def pow(base,exp):
ans = 1
while exp:
if exp & 1:
ans = ( ans * base ) % const()
base = (base * base ) % const()
exp >>= 1
return ans % const()
def solve():
fin = open("lgput.in", "r")
fout = open("lgout.out", "w")
data = fin.readline().strip().split(" ")
data = [int(x) for x in data]
base = data[0]
exp = data[1]
fout.write(str(pow(base, exp)))
solve()