Exemplo n.º 1
0
int main()
{
	BigInt n; n.Read();
	n = n % 4;
	int m = n.c[n.len];
	int ans = 0;
	for(int i = 1; i <= 4; i++)
	{
		int tmp = 1;
		for(int j = 1; j <= m; j++)
			tmp = tmp % 5 * i % 5;
		ans = (ans + tmp) % 5;
	}
	printf("%d\n", ans);
	return 0;
}
Exemplo n.º 2
0
void work()
{
    n.Read();
    calc(n);
    p.Print();
}