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:
Output:
2 2Output:
4Input:
Output:
3 3Output:
7Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.