191512025-11-26 18:14:04algoproToronyépítés (80 pont)pypy3Wrong answer 26/80143ms32000 KiB
# UUID: 9b45b270-fa2e-482b-8605-ab88aeeca4f0
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
base26/80
1Accepted0/043ms19436 KiB
2Wrong answer0/050ms21712 KiB
3Accepted4/443ms19396 KiB
4Accepted4/439ms19416 KiB
5Wrong answer0/543ms19428 KiB
6Wrong answer0/539ms19372 KiB
7Runtime error0/650ms32000 KiB
8Time limit exceeded0/6143ms32000 KiB
9Accepted7/745ms19300 KiB
10Accepted7/739ms19436 KiB
11Time limit exceeded0/8135ms32000 KiB
12Runtime error0/850ms32000 KiB
13Runtime error0/859ms32000 KiB
14Time limit exceeded0/8133ms32000 KiB
15Accepted2/239ms19444 KiB
16Accepted2/246ms19428 KiB