4032021-11-03 08:32:37kovacs.peter.18fToronyépítés (1,1,3,3)cpp11Wrong answer 0/5010ms9636 KiB
#include <iostream>

using namespace std;

int main() {
    cin.sync_with_stdio(false);
    cin.tie(nullptr);

    int N;
    cin >> N;
    int *ans = new int[N + 1];
    for (int i = 3; i <= N; i++) {
        ans[i] = 2 * (ans[i - 1] + ans[i - 3]) % 20210108;
    }
    cout << ans[N] << '\n';
}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/02ms1756 KiB
2Wrong answer0/01ms1812 KiB
3Wrong answer0/31ms1884 KiB
4Wrong answer0/31ms1884 KiB
5Wrong answer0/41ms1888 KiB
6Wrong answer0/41ms1892 KiB
7Wrong answer0/410ms9636 KiB
8Wrong answer0/43ms2768 KiB
9Wrong answer0/41ms1904 KiB
10Wrong answer0/41ms1908 KiB
11Wrong answer0/43ms3464 KiB
12Wrong answer0/410ms9544 KiB
13Wrong answer0/410ms8796 KiB
14Wrong answer0/44ms4544 KiB
15Wrong answer0/21ms1920 KiB
16Wrong answer0/22ms1912 KiB