108772024-04-17 13:39:4942Toronyépítés (80 pont)pypy3Runtime error 36/8061ms101516 KiB
from sys import stdin
input=stdin.readline

mod=20210108

def main():
    N=int(input())
    s=[1,3,10]
    for i in range(N):
        s.append((3*s[-1]+s[-2])%mod)
    print(s[N])
        
main()
SubtaskSumTestVerdictTimeMemory
base36/80
1Accepted0/041ms75832 KiB
2Accepted0/050ms86060 KiB
3Accepted4/441ms76812 KiB
4Accepted4/439ms76860 KiB
5Accepted5/546ms77552 KiB
6Accepted5/546ms77632 KiB
7Runtime error0/661ms101304 KiB
8Runtime error0/657ms101516 KiB
9Accepted7/739ms78204 KiB
10Accepted7/739ms78116 KiB
11Runtime error0/857ms100816 KiB
12Runtime error0/857ms100836 KiB
13Runtime error0/857ms101096 KiB
14Runtime error0/857ms100876 KiB
15Accepted2/239ms78768 KiB
16Accepted2/239ms78528 KiB