1992021-02-06 13:40:50Molnár AttilaToronyépítés (1,1,3,3)python3Runtime error 26/5075ms40340 KiB
from sys import stdin, stdout
def main():
    n = int(stdin.readline())

    l=[]
    l.append(1)
    l.append(2)
    l.append(4)
    for i in range(3,n+1):
        l.append(2*l[i-1]+2*l[i-3])

    stdout.write(str(l[n]%20210108))

main()
SubtaskSumTestVerdictTimeMemory
base26/50
1Accepted0/041ms13312 KiB
2Accepted0/030ms13924 KiB
3Accepted3/332ms13248 KiB
4Accepted3/328ms13280 KiB
5Accepted4/428ms13268 KiB
6Accepted4/429ms13372 KiB
7Runtime error0/474ms40196 KiB
8Runtime error0/459ms40236 KiB
9Accepted4/428ms13268 KiB
10Accepted4/428ms13356 KiB
11Runtime error0/457ms40228 KiB
12Runtime error0/475ms40236 KiB
13Runtime error0/468ms40304 KiB
14Runtime error0/470ms40340 KiB
15Accepted2/228ms13380 KiB
16Accepted2/228ms13336 KiB