結果
| 問題 |
No.954 Result
|
| コンテスト | |
| ユーザー |
popketle
|
| 提出日時 | 2019-12-19 19:48:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 30 ms / 2,000 ms |
| コード長 | 324 bytes |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-04 12:38:00 |
| 合計ジャッジ時間 | 2,079 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 7 |
| other | AC * 29 |
ソースコード
A=[int(input()) for _ in range(5)]
memo=[1,1]
while memo[-1]<=10**15:
memo.append(memo[-1]+memo[-2])
A,ans=A[::-1],0
for i in range(1,6):
if A[0] in memo:
tmp=A[:i]
idx=memo.index(tmp[0])
if tmp[0]==1:
if tmp==memo[idx+1:idx+1+i]: ans=max(ans,i)
if tmp==memo[idx:idx+i]: ans=max(ans,i)
print(ans)
popketle