18 lines
210 B
Python
18 lines
210 B
Python
|
from gmpy2 import *
|
||
|
|
||
|
a = input()
|
||
|
b = input()
|
||
|
a,b = mpz(a),mpz(b)
|
||
|
|
||
|
wynik = 1
|
||
|
baza = a
|
||
|
|
||
|
|
||
|
for i in range(0,b.bit_length()):
|
||
|
if b.bit_test(i):
|
||
|
wynik = wynik * baza
|
||
|
baza = baza * baza
|
||
|
|
||
|
|
||
|
print(wynik)
|