226952026-01-15 16:44:53algoproJárdakövezés háromféle elemmelcpp17Wrong answer 0/302ms1076 KiB
// UUID: c9a0ffae-9952-4229-a3a2-06692529e533
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using pll=pair<ll, ll>;

int main() {
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	ll n; cin >> n;
	vector<ll> vec(n);
	vec[0]=2;
	vec[1]=11;
	for (ll i=2; i<n; i++) vec[i]=(vec[i-2]*7+vec[i]*2)%2023;
	cout << vec[n-1];
}
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/21ms344 KiB
6Wrong answer0/21ms316 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/21ms508 KiB
9Wrong answer0/21ms564 KiB
10Wrong answer0/22ms564 KiB
11Wrong answer0/22ms820 KiB
12Wrong answer0/32ms868 KiB
13Wrong answer0/31ms316 KiB
14Wrong answer0/31ms316 KiB
15Wrong answer0/32ms1076 KiB