Big Powers
Statement
Given two integers [[a]] and [[b]] find the first three digits of [[a]] raised to the power of [[b]].
For example:
if [[a]] = 7 and [[b]] = 5 then [[a]]^[[b]] = 7^5 = 16807 the output will be 168
<<Note:>> if the result is less than three digits just print those digits.
Input description
<<Line 1:>> Two integers [[a]] [[b]]
Output description
An integer that represents the first three digits of [[a]]^[[b]]
Constraints
0 < [[a]] < 1000
0 < [[b]] < 1000000
Game modes
Shortest
Test cases
Example Test
Input
7 5
Output
168
Validator 1 Validator
Input
5 7
Output
781
Very Small Test
Input
3 2
Output
9
Validator 2 Validator
Input
3 4
Output
81
Small Test
Input
72 5
Output
193
Validator 3 Validator
Input
99 3
Output
970
Medium Test
Input
72 53
Output
274
Validator 4 Validator
Input
921 77
Output
177
Big Test
Input
120 325
Output
541
Validator 5 Validator
Input
100 500
Output
100
Very Big Test
Input
109 965321
Output
384
Validator 6 Validator
Input
364 564321
Output
196
Solution language
Solution
Stub generator input