1427: a^b个位数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:2 Solved:2

Description

计算a^b的个位数。


Input

a,b 1<=a,b<=100000(多组输入)

Output

计算a^b的个位数。

Sample Input Copy

1 1
2 4

Sample Output Copy

1
6