CF742A.Arpa’s hard exam and Mehrdad’s naive cheat
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
There exists an island called Arpa’s land, some beautiful girls live there, as ugly ones do.
Mehrdad wants to become minister of Arpa’s land. Arpa has prepared an exam. Exam has only one question, given n, print the last digit of 1378_n_.

Mehrdad has become quite confused and wants you to help him. Please help, although it's a naive cheat.
存在一座名为“阿尔帕之地”的岛屿,一些美丽的女孩生活在那里,丑陋的女孩也是如此。
梅赫拉德想成为阿尔帕之地的部长。阿尔帕为此准备了一场考试。这场考试只有一道题目:给定一个整数 n,输出 1378n 的最后一位数字。

梅赫拉德感到非常困惑,希望你能帮他。请伸出援手吧,尽管这不过是一次天真的作弊。
输入格式
The single line of input contains one integer n (0 ≤ n ≤ 109).
输入仅包含一个整数 $ n ( 0 \leq n \leq 10^9 $)。
输出格式
Print single integer — the last digit of 1378_n_.
输出一个整数——1378n 的最后一位数字。
输入输出样例
输入#1
1
输出#1
8
输入#2
2
输出#2
4
说明/提示
In the first example, last digit of 13781 = 1378 is 8.
In the second example, last digit of 13782 = 1378·1378 = 1898884 is 4.
在第一个例子中,13781=1378 的末位数字是 8。
在第二个例子中,13782=1378⋅1378=1898884 的末位数字是 4。
输入解题思路,AI测评打分。不知道怎么写?