191522025-11-26 18:15:52algoproToronyépítés (80 pont)pypy3Accepted 80/8070ms29216 KiB
# UUID: b9525e11-5ff4-4f0f-8834-6ea5b43c8712
N=int(input())
dp= [0]*(N+2)
dp[0]=1
dp[1]=3
for i in range(2, N+1):
    dp[i]= (3*dp[i-1]+dp[i-2])%20210108
print(dp[N])  
SubtaskSumTestVerdictTimeMemory
base80/80
1Accepted0/043ms19228 KiB
2Accepted0/046ms21448 KiB
3Accepted4/439ms19400 KiB
4Accepted4/443ms19376 KiB
5Accepted5/539ms19432 KiB
6Accepted5/543ms19404 KiB
7Accepted6/661ms29160 KiB
8Accepted6/656ms22356 KiB
9Accepted7/739ms19436 KiB
10Accepted7/737ms19368 KiB
11Accepted8/856ms23152 KiB
12Accepted8/870ms29216 KiB
13Accepted8/861ms28392 KiB
14Accepted8/850ms24040 KiB
15Accepted2/245ms19436 KiB
16Accepted2/245ms19316 KiB