#000138

z-warmup

Little Z know shat you might have been doing some other competitions, so he wants to give you one easy problem, just so that you warm-up your fingers


for given two integers a and b, (0 <= a, b <= 2000000000), you have to find the last digit of a^b, that is the b-th power of a


InputFrom the first line of the standard input read the two integers a and b

OutputTo the standard output write one integer representing the last digit of a^b

Input:
2 2
Output:
4

Input:
3 3
Output:
7

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.