結果

問題 No.954 Result
ユーザー momotaros300momotaros300
提出日時 2019-12-27 00:56:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 557 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2024-04-15 15:41:00
合計ジャッジ時間 2,508 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 35 ms
11,648 KB
testcase_04 AC 35 ms
11,520 KB
testcase_05 AC 34 ms
11,648 KB
testcase_06 AC 35 ms
11,648 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 37 ms
11,648 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 35 ms
11,648 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 34 ms
11,648 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 34 ms
11,520 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 34 ms
11,648 KB
testcase_34 WA -
testcase_35 WA -
権限があれば一括ダウンロードができます

ソースコード

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[1]=0; 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])
    if A[i]==F[k+i]: count += 1
    else: break

print(count)
0