302367: CF456B. Fedya and Maths
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Fedya and Maths
题意翻译
题目描述 Fedya 在健身房里学习。她的数学作业是计算下面一个东西。 给定 $n(0\leqslant n\leqslant 10^{10^5})$,求 $(1^n+2^n+3^n+4^n)\bmod 5$。 输入: 仅一个数,表示n。 输出: 输出上述结果。题目描述
Fedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression: $ (1^{n}+2^{n}+3^{n}+4^{n}) mod 5 $ for given value of $ n $ . Fedya managed to complete the task. Can you? Note that given number $ n $ can be extremely large (e.g. it can exceed any integer type of your programming language).输入输出格式
输入格式
The single line contains a single integer $ n $ ( $ 0\le n\le10^{10^5} $ ). The number doesn't contain any leading zeroes.
输出格式
Print the value of the expression without leading zeros.
输入输出样例
输入样例 #1
4
输出样例 #1
4
输入样例 #2
124356983594583453458888889
输出样例 #2
0