結果

問題 No.2363 k-bonacci
ユーザー flippergoflippergo
提出日時 2024-11-26 19:23:15
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 412 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 82,040 KB
実行使用メモリ 73,824 KB
最終ジャッジ日時 2024-11-26 19:23:18
合計ジャッジ時間 3,637 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
73,632 KB
testcase_01 AC 43 ms
53,416 KB
testcase_02 AC 43 ms
53,628 KB
testcase_03 AC 43 ms
54,132 KB
testcase_04 AC 43 ms
54,848 KB
testcase_05 AC 46 ms
59,180 KB
testcase_06 AC 53 ms
64,480 KB
testcase_07 AC 54 ms
65,796 KB
testcase_08 AC 56 ms
65,100 KB
testcase_09 AC 54 ms
66,112 KB
testcase_10 AC 45 ms
58,252 KB
testcase_11 AC 48 ms
60,136 KB
testcase_12 AC 48 ms
60,072 KB
testcase_13 AC 80 ms
63,520 KB
testcase_14 AC 53 ms
64,624 KB
testcase_15 AC 53 ms
62,964 KB
testcase_16 AC 65 ms
73,824 KB
testcase_17 AC 65 ms
73,448 KB
testcase_18 AC 64 ms
73,036 KB
testcase_19 AC 43 ms
53,788 KB
testcase_20 AC 57 ms
66,168 KB
testcase_21 AC 46 ms
58,496 KB
testcase_22 WA -
testcase_23 AC 43 ms
55,524 KB
testcase_24 AC 43 ms
55,264 KB
testcase_25 AC 44 ms
54,440 KB
testcase_26 AC 43 ms
54,348 KB
testcase_27 AC 51 ms
61,732 KB
testcase_28 AC 42 ms
54,580 KB
testcase_29 AC 43 ms
55,052 KB
testcase_30 AC 52 ms
62,376 KB
testcase_31 AC 82 ms
62,260 KB
testcase_32 AC 52 ms
62,796 KB
testcase_33 AC 51 ms
62,716 KB
testcase_34 AC 43 ms
54,396 KB
testcase_35 AC 52 ms
63,560 KB
testcase_36 AC 43 ms
53,960 KB
testcase_37 AC 43 ms
54,508 KB
testcase_38 AC 53 ms
63,524 KB
testcase_39 AC 53 ms
63,472 KB
testcase_40 AC 53 ms
62,204 KB
testcase_41 AC 53 ms
63,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque
N = int(input())
if N==1:
    print(1)
else:
    flag = -1
    for k in range(2,200+1):
        A = [0]*k
        A[0] = 1
        A = deque(A)
        for i in range(1,200+1):
            a = sum(A)
            if a==N:
                flag = k
                break
            elif a>N:break
            A.pop()
            A.appendleft(a)
        if flag>0:break
    print(flag)
0