134332025-01-08 07:15:51fzs1969Járda-L (40)python3Wrong answer 4/4017ms3276 KiB
N = int(input())
f = [0] * 30
f[0] = 1
f[1] = 1
f[2] = 2

for i in range(3,29):
    f[i] = 2*f[i-3] + f[i-2] + f[i-1]

print(f[N])
SubtaskSumTestVerdictTimeMemory
base4/40
1Accepted0/014ms2856 KiB
2Wrong answer0/016ms3064 KiB
3Accepted2/216ms2864 KiB
4Accepted2/216ms2868 KiB
5Wrong answer0/216ms2868 KiB
6Wrong answer0/216ms2888 KiB
7Wrong answer0/214ms3276 KiB
8Wrong answer0/317ms2936 KiB
9Wrong answer0/316ms3132 KiB
10Wrong answer0/316ms2868 KiB
11Wrong answer0/316ms3076 KiB
12Wrong answer0/316ms3120 KiB
13Wrong answer0/316ms2876 KiB
14Wrong answer0/314ms2876 KiB
15Wrong answer0/314ms2868 KiB
16Wrong answer0/317ms3072 KiB
17Wrong answer0/314ms2928 KiB