結果

問題 No.67 よくある棒を切る問題 (1)
ユーザー maimai
提出日時 2017-12-18 20:32:28
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,820 ms / 5,000 ms
コード長 123 bytes
コンパイル時間 727 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 87,168 KB
最終ジャッジ日時 2024-04-26 00:22:52
合計ジャッジ時間 43,126 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,757 ms
87,168 KB
testcase_01 AC 85 ms
12,160 KB
testcase_02 AC 700 ms
36,864 KB
testcase_03 AC 1,280 ms
74,368 KB
testcase_04 AC 1,730 ms
86,400 KB
testcase_05 AC 1,718 ms
86,272 KB
testcase_06 AC 1,728 ms
86,400 KB
testcase_07 AC 1,748 ms
87,040 KB
testcase_08 AC 1,787 ms
86,784 KB
testcase_09 AC 1,820 ms
87,040 KB
testcase_10 AC 1,596 ms
83,072 KB
testcase_11 AC 1,655 ms
86,912 KB
testcase_12 AC 1,530 ms
82,944 KB
testcase_13 AC 1,604 ms
83,584 KB
testcase_14 AC 1,647 ms
86,272 KB
testcase_15 AC 1,473 ms
82,560 KB
testcase_16 AC 1,721 ms
86,400 KB
testcase_17 AC 1,756 ms
86,272 KB
testcase_18 AC 1,738 ms
86,272 KB
testcase_19 AC 1,715 ms
86,912 KB
testcase_20 AC 1,703 ms
86,912 KB
testcase_21 AC 1,705 ms
86,912 KB
testcase_22 AC 1,572 ms
83,072 KB
testcase_23 AC 1,664 ms
86,912 KB
testcase_24 AC 83 ms
12,288 KB
testcase_25 AC 115 ms
13,952 KB
testcase_26 AC 93 ms
12,544 KB
testcase_27 AC 96 ms
12,544 KB
testcase_28 AC 349 ms
28,544 KB
testcase_29 AC 216 ms
20,352 KB
testcase_30 AC 124 ms
13,824 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
aa = gets.split.map(&:to_i)
k = gets.to_i

p (1e-10..1e10).bsearch{|x| k > aa.map{|e|(e/x).to_i}.reduce(:+) }
0