87592024-01-29 11:09:32GervidToronyépítés (1,1,3,3)cpp17Wrong answer 13/504ms4168 KiB
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <limits.h>
#include <map>
#include <stack>
#include <algorithm>

using namespace std;

int main()
{
	int n, i;
	cin >> n;

	int a = 2, b = 4, c = 10, temp;

	for (i = 0; i < n-3; i++)
	{
		temp = b;
		b = c;
		c = c * 2 + a * 2;
		a = temp;
	}

	cout << c;
}
SubtaskSumTestVerdictTimeMemory
base13/50
1Accepted0/03ms2024 KiB
2Wrong answer0/03ms2376 KiB
3Accepted3/33ms2348 KiB
4Wrong answer0/33ms2480 KiB
5Wrong answer0/43ms2724 KiB
6Wrong answer0/43ms3212 KiB
7Wrong answer0/44ms3200 KiB
8Wrong answer0/43ms3316 KiB
9Accepted4/43ms3532 KiB
10Accepted4/43ms3824 KiB
11Wrong answer0/43ms3904 KiB
12Wrong answer0/44ms3708 KiB
13Wrong answer0/44ms3864 KiB
14Wrong answer0/43ms3884 KiB
15Accepted2/23ms3972 KiB
16Wrong answer0/23ms4168 KiB