题目描述
Problem Statement
Given positive integers A, B, C, find the digit at the ones place in the decimal notation of A^{B^C}.
Input
Input is given from Standard Input in the following format:
A B C
Output
Print the digit at the one's place in the decimal notation of A^{B^C}.
Constraints
- $1\leq A,B,C \leq 10^9$
- A,B,C are integers.
Sample Input 1
4 3 2
Sample Output 1
4
The ones digit in the decimal notation of 4^{3^2}=4^9=262144 is 4.
Sample Input 2
1 2 3
Sample Output 2
1
Sample Input 3
3141592 6535897 9323846
Sample Output 3
2
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
4 3 2
样例输出
4