結果

問題 No.231 めぐるはめぐる (1)
ユーザー kyo1kyo1
提出日時 2020-10-04 19:48:46
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 11,332 KB
実行使用メモリ 15,388 KB
最終ジャッジ日時 2023-09-27 00:08:38
合計ジャッジ時間 4,955 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 85 ms
15,132 KB
testcase_02 AC 83 ms
15,216 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 86 ms
15,256 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 82 ms
15,020 KB
testcase_11 AC 82 ms
15,132 KB
testcase_12 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
G, D = N.times.map { gets.split.map(&:to_i) }.transpose

m = N.times.map { |i| G[i] - 30000 * D[i] }.max
idx = 0
N.times do |i|
  if m == G[i] - 30000 * D[i]
    idx = i
  end
end

if m * 6 < 3000000
  puts "NO"
else
  puts "YES"
  6.times { puts idx }
end
0