212562026-01-12 17:32:48algoproJárdakövezés háromféle elemmelpypy3Wrong answer 0/3083ms32000 KiB
# UUID: e0f08e9c-9271-4ba4-ad2b-decc78868935
n=int(input())
l=[[0,0] for _ in range(n+1)]
l[1][0]=1
l[1][1]=2
l[2][0]=3
l[2][1]=11

for i in range(3,n+1):
    l[i][0]=l[i-1][1]+l[i-1][1]+l[i-2][1]
    l[i][1]=l[i][0]+l[i-1][1]+3*l[i-1][0]+l[i-2][1]*2
print(l[n][1])
#11*4+2
# 2 7 2
# #     #    #  #
# ## +    = ## +
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/041ms19332 KiB
2Wrong answer0/039ms19424 KiB
3Wrong answer0/243ms19444 KiB
4Wrong answer0/239ms19416 KiB
5Wrong answer0/239ms19472 KiB
6Wrong answer0/243ms19552 KiB
7Wrong answer0/243ms19436 KiB
8Wrong answer0/237ms19348 KiB
9Runtime error0/282ms32000 KiB
10Runtime error0/274ms32000 KiB
11Runtime error0/281ms32000 KiB
12Runtime error0/371ms32000 KiB
13Runtime error0/383ms32000 KiB
14Runtime error0/383ms32000 KiB
15Runtime error0/371ms32000 KiB