結果

問題 No.954 Result
ユーザー masumasumath1masumasumath1
提出日時 2020-01-03 18:28:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 444 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,788 KB
実行使用メモリ 8,312 KB
最終ジャッジ日時 2023-09-17 18:05:17
合計ジャッジ時間 2,015 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,044 KB
testcase_01 AC 18 ms
8,136 KB
testcase_02 AC 18 ms
8,196 KB
testcase_03 AC 17 ms
8,196 KB
testcase_04 AC 17 ms
8,272 KB
testcase_05 AC 17 ms
8,308 KB
testcase_06 WA -
testcase_07 AC 16 ms
8,172 KB
testcase_08 AC 17 ms
8,116 KB
testcase_09 AC 16 ms
8,160 KB
testcase_10 AC 16 ms
8,276 KB
testcase_11 AC 16 ms
8,100 KB
testcase_12 AC 16 ms
8,284 KB
testcase_13 AC 17 ms
8,100 KB
testcase_14 AC 16 ms
8,304 KB
testcase_15 AC 16 ms
8,216 KB
testcase_16 AC 16 ms
8,280 KB
testcase_17 AC 16 ms
8,272 KB
testcase_18 AC 17 ms
8,048 KB
testcase_19 AC 16 ms
8,280 KB
testcase_20 AC 16 ms
8,312 KB
testcase_21 AC 16 ms
8,096 KB
testcase_22 AC 16 ms
8,116 KB
testcase_23 AC 16 ms
8,276 KB
testcase_24 AC 16 ms
8,140 KB
testcase_25 AC 16 ms
8,280 KB
testcase_26 AC 16 ms
8,104 KB
testcase_27 AC 17 ms
8,164 KB
testcase_28 AC 16 ms
8,140 KB
testcase_29 AC 16 ms
8,260 KB
testcase_30 AC 16 ms
8,104 KB
testcase_31 AC 16 ms
8,308 KB
testcase_32 AC 17 ms
8,112 KB
testcase_33 AC 16 ms
8,156 KB
testcase_34 AC 16 ms
8,104 KB
testcase_35 AC 17 ms
8,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def func(n):
    if n in [1,2]:
        return 1
    if memo[n] == 0:
        memo[n] = func(n-1)+func(n-2)
    return memo[n]

A = [int(input()) for _ in range(5)]
memo = [0 for _ in range(10**4)]
i = 1
cnt = 0
ans = 0
while 1:
    if func(i) == A[4]:
        for j in range(5):
            if func(i+j) == A[4-j]:
                cnt += 1
        ans = max(ans,cnt)
        cnt = 0
    if func(i) > max(A):
        break
    i += 1
print(ans)
0