6332021-11-06 08:59:47kismartongToronyépítés (2,2,3,3)python3Runtime error 20/4090ms45064 KiB
from sys import stdin, stdout

def main():
    n = int(stdin.readline())
    dp = [0, 0, 2, 2]
    for i in range(4, n+1):
        dp.append(2*dp[i-2] + 2*dp[i-3])
    stdout.writelines(str(dp[n] % 20210108))

main()
SubtaskSumTestVerdictTimeMemory
base20/40
1Accepted0/052ms18524 KiB
2Accepted0/034ms18804 KiB
3Accepted2/228ms18568 KiB
4Accepted2/229ms18588 KiB
5Accepted3/339ms18540 KiB
6Accepted3/339ms18548 KiB
7Runtime error0/379ms44900 KiB
8Runtime error0/390ms45064 KiB
9Accepted3/350ms18520 KiB
10Accepted3/339ms18472 KiB
11Runtime error0/378ms44952 KiB
12Runtime error0/361ms45004 KiB
13Runtime error0/468ms44940 KiB
14Runtime error0/475ms44904 KiB
15Accepted2/241ms18448 KiB
16Accepted2/229ms18496 KiB