212652026-01-12 17:35:39algoproJárdakövezés háromféle elemmelpypy3Wrong answer 0/3068ms27596 KiB
# UUID: 7185738c-6b6e-4edf-9410-303f742aaea2
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][0]+l[i-1][1]+l[i-2][1])%2023
    l[i][1]=(l[i][0]+l[i-1][1]+3*l[i-1][0]+l[i-2][1]*2)%2023
print(l[n][1])
#11*4+2
# 2 7 2
# #     #    #  #
# ## +    = ## +
SubtaskSumTestVerdictTimeMemory
base0/30
1Accepted0/039ms19448 KiB
2Wrong answer0/039ms19608 KiB
3Wrong answer0/243ms19376 KiB
4Wrong answer0/241ms19340 KiB
5Wrong answer0/243ms19468 KiB
6Wrong answer0/243ms19548 KiB
7Wrong answer0/239ms19380 KiB
8Wrong answer0/237ms19464 KiB
9Wrong answer0/257ms22088 KiB
10Wrong answer0/252ms22244 KiB
11Wrong answer0/261ms27360 KiB
12Wrong answer0/368ms27556 KiB
13Wrong answer0/350ms21996 KiB
14Wrong answer0/348ms21856 KiB
15Wrong answer0/368ms27596 KiB