Problem1257--最左边的数字

1257: 最左边的数字

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

给你一个数字n,你要做的是输出n^n的最左边那位数字

Input

输入一个数字n,(1<=n<=1,000,000,000)

Output

输出n^n的最左边那位数字

Sample Input Copy

3

Sample Output Copy

2

HINT

In the first case, 3 * 3 * 3 = 27, so the leftmost digit is 2. 
In the second case, 4 * 4 * 4 * 4 = 256, so the leftmost digit is 2.

Source/Category