結果

問題 No.320 眠れない夜に
ユーザー TawaraTawara
提出日時 2015-12-13 09:16:27
言語 Python2
(2.7.18)
結果
AC  
実行時間 16 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 6,620 KB
実行使用メモリ 6,884 KB
最終ジャッジ日時 2023-10-13 14:49:07
合計ジャッジ時間 1,849 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
6,752 KB
testcase_01 AC 15 ms
6,884 KB
testcase_02 AC 15 ms
6,752 KB
testcase_03 AC 16 ms
6,860 KB
testcase_04 AC 15 ms
6,760 KB
testcase_05 AC 14 ms
6,368 KB
testcase_06 AC 14 ms
6,660 KB
testcase_07 AC 14 ms
6,720 KB
testcase_08 AC 14 ms
6,360 KB
testcase_09 AC 14 ms
6,660 KB
testcase_10 AC 14 ms
6,564 KB
testcase_11 AC 14 ms
6,808 KB
testcase_12 AC 15 ms
6,704 KB
testcase_13 AC 14 ms
6,404 KB
testcase_14 AC 14 ms
6,756 KB
testcase_15 AC 12 ms
6,104 KB
testcase_16 AC 14 ms
6,536 KB
testcase_17 AC 12 ms
6,424 KB
testcase_18 AC 11 ms
6,216 KB
testcase_19 AC 11 ms
6,216 KB
testcase_20 AC 13 ms
6,452 KB
testcase_21 AC 13 ms
6,308 KB
testcase_22 AC 11 ms
6,272 KB
testcase_23 AC 12 ms
6,164 KB
testcase_24 AC 11 ms
6,032 KB
testcase_25 AC 12 ms
6,144 KB
testcase_26 AC 13 ms
6,260 KB
testcase_27 AC 12 ms
6,092 KB
testcase_28 AC 11 ms
6,208 KB
testcase_29 AC 12 ms
6,088 KB
testcase_30 AC 12 ms
6,072 KB
testcase_31 AC 12 ms
6,276 KB
testcase_32 AC 11 ms
6,012 KB
testcase_33 AC 14 ms
6,856 KB
testcase_34 AC 12 ms
6,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,raw_input().split());F=[0]*N;i=F[0]=F[1]=1;N-=2
exec("F[i+1]=F[i]+F[i-1];i+=1;"*N);D=F[-1]-M;C=0;i=N
exec("i-=1\nif D>=F[i]:D-=F[i];C+=1\n"*N);print[-1,C][D==0]
0