結果

問題 No.954 Result
ユーザー momotaros300momotaros300
提出日時 2019-12-27 00:59:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 559 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 9,420 KB
最終ジャッジ日時 2023-09-17 18:04:29
合計ジャッジ時間 2,258 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
9,212 KB
testcase_01 AC 21 ms
9,248 KB
testcase_02 AC 21 ms
9,216 KB
testcase_03 AC 21 ms
9,280 KB
testcase_04 AC 21 ms
9,228 KB
testcase_05 AC 21 ms
9,368 KB
testcase_06 AC 21 ms
9,284 KB
testcase_07 AC 20 ms
9,368 KB
testcase_08 AC 21 ms
9,400 KB
testcase_09 AC 21 ms
9,280 KB
testcase_10 AC 21 ms
9,212 KB
testcase_11 AC 21 ms
9,228 KB
testcase_12 AC 21 ms
9,228 KB
testcase_13 AC 21 ms
9,308 KB
testcase_14 AC 21 ms
9,212 KB
testcase_15 AC 21 ms
9,288 KB
testcase_16 AC 21 ms
9,284 KB
testcase_17 AC 21 ms
9,224 KB
testcase_18 AC 21 ms
9,224 KB
testcase_19 AC 21 ms
9,288 KB
testcase_20 AC 20 ms
9,364 KB
testcase_21 AC 21 ms
9,300 KB
testcase_22 AC 21 ms
9,252 KB
testcase_23 AC 21 ms
9,420 KB
testcase_24 AC 21 ms
9,356 KB
testcase_25 AC 21 ms
9,420 KB
testcase_26 AC 22 ms
9,212 KB
testcase_27 AC 21 ms
9,252 KB
testcase_28 AC 21 ms
9,364 KB
testcase_29 AC 21 ms
9,228 KB
testcase_30 AC 21 ms
9,212 KB
testcase_31 AC 21 ms
9,248 KB
testcase_32 AC 22 ms
9,400 KB
testcase_33 AC 21 ms
9,224 KB
testcase_34 AC 21 ms
9,232 KB
testcase_35 AC 22 ms
9,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
minans = inf ;ans = 0 ;count = 0 ;pro = 1

F=[inf]*10**5; F[0]=1; F[1]=1
for i in range(2,10**5):
    F[i]=F[i-1]+F[i-2]
    if F[i]>=10**15:
        break
A=[int(input()) for i in range(5)]
A=A[::-1]
k=bisect.bisect_left(F,A[0])
if A[0]==1:
    if A[1]==1: k=0
    else: k=1

for i in range(5):
    # print(A[i],F[k+i],k)
    if A[i]==F[k+i]: count += 1
    else: break

print(count)
0