結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー letrangerjpletrangerjp
提出日時 2017-06-18 13:44:43
言語 Ruby
(3.3.0)
結果
AC  
実行時間 2,045 ms / 5,000 ms
コード長 93 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 88,116 KB
最終ジャッジ日時 2024-04-26 00:04:28
合計ジャッジ時間 49,072 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,045 ms
83,548 KB
testcase_01 AC 85 ms
12,160 KB
testcase_02 AC 818 ms
53,176 KB
testcase_03 AC 1,459 ms
53,388 KB
testcase_04 AC 1,989 ms
84,400 KB
testcase_05 AC 1,997 ms
84,540 KB
testcase_06 AC 2,038 ms
84,456 KB
testcase_07 AC 2,007 ms
85,796 KB
testcase_08 AC 2,007 ms
85,788 KB
testcase_09 AC 2,001 ms
85,700 KB
testcase_10 AC 1,820 ms
85,084 KB
testcase_11 AC 1,931 ms
86,844 KB
testcase_12 AC 1,757 ms
86,648 KB
testcase_13 AC 1,854 ms
85,568 KB
testcase_14 AC 1,913 ms
88,116 KB
testcase_15 AC 1,730 ms
86,624 KB
testcase_16 AC 2,011 ms
84,404 KB
testcase_17 AC 2,004 ms
84,532 KB
testcase_18 AC 2,003 ms
84,316 KB
testcase_19 AC 2,024 ms
85,660 KB
testcase_20 AC 2,029 ms
85,672 KB
testcase_21 AC 2,043 ms
85,684 KB
testcase_22 AC 1,825 ms
85,080 KB
testcase_23 AC 1,956 ms
86,776 KB
testcase_24 AC 84 ms
12,288 KB
testcase_25 AC 123 ms
14,336 KB
testcase_26 AC 100 ms
12,800 KB
testcase_27 AC 92 ms
12,416 KB
testcase_28 AC 394 ms
30,696 KB
testcase_29 AC 237 ms
21,508 KB
testcase_30 AC 124 ms
14,464 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:2: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Syntax OK

ソースコード

diff #

eval"N,*L,K="+$<.read.split*?,
p -(0..M=L.sum/K+1.0).bsearch{|i|L.map{|l|l.div M-i}.sum>=K}+M
0