結果

問題 No.555 世界史のレポート
ユーザー cielciel
提出日時 2017-08-13 08:28:53
言語 Crystal
(1.11.2)
結果
TLE  
実行時間 -
コード長 133 bytes
コンパイル時間 17,852 ms
コンパイル使用メモリ 256,784 KB
実行使用メモリ 14,696 KB
最終ジャッジ日時 2023-09-13 09:27:50
合計ジャッジ時間 40,780 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,384 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,500 KB
testcase_03 AC 4 ms
4,912 KB
testcase_04 AC 4 ms
4,976 KB
testcase_05 AC 5 ms
4,916 KB
testcase_06 AC 6 ms
4,920 KB
testcase_07 AC 6 ms
4,968 KB
testcase_08 AC 7 ms
5,044 KB
testcase_09 AC 8 ms
4,924 KB
testcase_10 AC 1,975 ms
8,104 KB
testcase_11 TLE -
testcase_12 AC 1,947 ms
8,160 KB
testcase_13 AC 1,575 ms
8,020 KB
testcase_14 TLE -
testcase_15 TLE -
testcase_16 AC 1,765 ms
8,396 KB
testcase_17 TLE -
testcase_18 TLE -
testcase_19 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(a,b,n,c,v)
return a<n ? [f(2*a,a,n,c,v)+c,f(a+b,b,n,c,v)].min+v : c
end
n,c,v=ARGF.gets_to_end.split.map(&.to_i)
p f(1,1,n,c,v)
0