結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー tamura2004tamura2004
提出日時 2019-10-29 15:54:20
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 11,460 KB
実行使用メモリ 87,984 KB
最終ジャッジ日時 2023-10-12 23:24:06
合計ジャッジ時間 32,969 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,293 ms
87,984 KB
testcase_01 WA -
testcase_02 AC 531 ms
39,416 KB
testcase_03 AC 969 ms
77,900 KB
testcase_04 AC 1,298 ms
86,852 KB
testcase_05 AC 1,262 ms
86,872 KB
testcase_06 AC 1,310 ms
86,968 KB
testcase_07 AC 1,315 ms
87,560 KB
testcase_08 AC 1,281 ms
87,820 KB
testcase_09 AC 1,266 ms
87,824 KB
testcase_10 AC 1,205 ms
84,320 KB
testcase_11 AC 1,260 ms
86,604 KB
testcase_12 AC 1,153 ms
85,428 KB
testcase_13 AC 1,206 ms
84,572 KB
testcase_14 AC 1,231 ms
87,188 KB
testcase_15 AC 1,154 ms
84,844 KB
testcase_16 AC 1,289 ms
86,972 KB
testcase_17 AC 1,284 ms
86,828 KB
testcase_18 AC 1,291 ms
86,912 KB
testcase_19 AC 1,282 ms
87,628 KB
testcase_20 AC 1,284 ms
87,628 KB
testcase_21 AC 1,268 ms
87,812 KB
testcase_22 AC 1,165 ms
84,140 KB
testcase_23 AC 1,233 ms
86,532 KB
testcase_24 WA -
testcase_25 AC 102 ms
16,984 KB
testcase_26 AC 88 ms
15,852 KB
testcase_27 AC 86 ms
15,840 KB
testcase_28 AC 275 ms
32,300 KB
testcase_29 AC 174 ms
23,260 KB
testcase_30 AC 105 ms
17,204 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
L = gets.split.map(&:to_i)
K = gets.to_i

DIG = 10**8

def query(n) # 1/10**9単位、棒の長さ
    L.map{|l| l * DIG / n }.inject(:+) < K
end

puts (1..10**18).bsearch{|n| query(n)}.to_f / DIG
0