110752024-07-06 12:45:43KarolinaBimmbamm (30)cpp17Wrong answer 0/303ms540 KiB
#include <iostream>
#include<vector>
using namespace std;

int main()
{
	iostream::sync_with_stdio(0);
	cin.tie(0);

	int n, x;
	cin >> n;

	vector<int> vec(n + 1);
	vec[1] = 3;
	vec[2] = 10;

	for (int i = 3; i <= n; i++)
	{
		vec[i] = (vec[i - 2] + 3 * vec[i - 1]) % 20210108;
	}

	cout << vec[n];

	


}
SubtaskSumTestVerdictTimeMemory
base0/30
1Wrong answer0/03ms392 KiB
2Wrong answer0/03ms444 KiB
3Wrong answer0/33ms532 KiB
4Wrong answer0/33ms484 KiB
5Wrong answer0/33ms356 KiB
6Wrong answer0/33ms504 KiB
7Wrong answer0/32ms504 KiB
8Wrong answer0/33ms356 KiB
9Wrong answer0/33ms356 KiB
10Wrong answer0/33ms504 KiB
11Wrong answer0/33ms504 KiB
12Wrong answer0/33ms540 KiB