2002021-02-06 13:42:27Molnár AttilaToronyépítés (1,1,3,3)python3Runtime error 38/50206ms39888 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])%20210108)

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

main()
SubtaskSumTestVerdictTimeMemory
base38/50
1Accepted0/043ms13172 KiB
2Accepted0/028ms13324 KiB
3Accepted3/328ms13340 KiB
4Accepted3/328ms13252 KiB
5Accepted4/428ms13272 KiB
6Accepted4/428ms13256 KiB
7Runtime error0/4195ms39812 KiB
8Accepted4/475ms22776 KiB
9Accepted4/429ms13320 KiB
10Accepted4/432ms13320 KiB
11Accepted4/4104ms29144 KiB
12Runtime error0/4172ms39864 KiB
13Time limit exceeded0/4206ms39784 KiB
14Accepted4/4170ms39888 KiB
15Accepted2/227ms13312 KiB
16Accepted2/228ms13340 KiB