410536: GYM104037 A Power
Memory Limit:0 MB
Time Limit:0 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Powertime limit per test1.0 smemory limit per test512 MBinputpow.inoutputpow.out
You're given integers $$$a$$$ and $$$b$$$,calculate $$$a^b$$$。
But if $$$a^b$$$ exceeds $$$10^9$$$, print '-1'. Otherwise, print the correct value.
InputRead from file "pow.in"
Single line contains integers $$$a, b$$$.
OutputOutput to file "pow.out"
Single line,if $$$a^b$$$ doesn't exceeds $$$10^9$$$, print $$$a^b$$$, otherwise print '-1'.
ExamplesInput10 9Output
1000000000Input
23333 66666Output
-1Note
$$$$$$1 \le a, b \le 10^9$$$$$$