传统题 1000ms 128MiB

ykc`s easy exam

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Problem Description

        One day, YKC his most love the teacher, the teacher heard today to put the film, called the hunt for the barbarians, the name is really strange, like action movies, did not think it was a comedy, oh, no matter, can see a movie is good, but the teacher is naughty we don't want to so easily see this movie, so he thought of a good math (well, the original foreigner is such a love, he felt a certain Mathematics) someone can answer, the problem is that, to give you a fixed number: 1378. And then give you a n, so you ask the last digit of 1378^n is how much.. It sounds very simple, but it won't come out ah, how could feel so much number counted out, but there is a very clever girl out, know the answer after YKC feel the whole body is hollowed out, the original is so simple。。。

Input Format

The single line of input contains one integer n (0  ≤ n ≤  10^9).

Output Format

Print single integer — the last digit
1
8

Source

2016周赛 七

2016级河南工大新生周赛(七)

未参加
状态
已结束
规则
XCPC
题目
8
开始于
2016-12-14 3:30
结束于
2016-12-14 6:00
持续时间
2.5 小时
主持人
参赛人数
218