6282021-11-04 22:37:56kovacs.peter.18fToronyépítés (1,1,3,3)cpp11Wrong answer 13/502ms1240 KiB
#include <stdio.h>

unsigned int N;
unsigned long long a, b, c;

int main() {
	scanf("%d", &N);
	switch (N % 24) {
	case 0: c = 1; break;
	case 1: b = 1; c = 2; break;
	case 2: a = 1; b = 2; c = 4; break;
	}
	N /= 3;
	while (N--) {
		a = 2 * (c + a);
		b = 2 * (a + b);
		c = 2 * (b + c);
		if (c >= 10105054000000000) {
			c %= 20210108;
			if (b >= 10105054000000000) {
				b %= 20210108;
				if (a >= 10105054000000000)
					a %= 20210108;
			}
		}
	}
	printf("%llu", c % 20210108);
}
SubtaskSumTestVerdictTimeMemory
base13/50
1Wrong answer0/02ms1232 KiB
2Wrong answer0/01ms1168 KiB
3Wrong answer0/31ms1172 KiB
4Accepted3/31ms1236 KiB
5Wrong answer0/41ms1176 KiB
6Accepted4/41ms1236 KiB
7Wrong answer0/42ms1236 KiB
8Accepted4/41ms1240 KiB
9Wrong answer0/41ms1172 KiB
10Wrong answer0/41ms1236 KiB
11Wrong answer0/42ms1236 KiB
12Wrong answer0/42ms1240 KiB
13Wrong answer0/42ms1240 KiB
14Wrong answer0/41ms1240 KiB
15Wrong answer0/21ms1240 KiB
16Accepted2/21ms1240 KiB