結果

問題 No.231 めぐるはめぐる (1)
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-02-28 16:46:11
言語 Ruby
(3.3.0)
結果
AC  
実行時間 87 ms / 1,000 ms
コード長 238 bytes
コンパイル時間 398 ms
コンパイル使用メモリ 11,496 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-09-05 16:16:51
合計ジャッジ時間 2,915 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,340 KB
testcase_01 AC 85 ms
15,292 KB
testcase_02 AC 82 ms
15,048 KB
testcase_03 AC 87 ms
15,044 KB
testcase_04 AC 86 ms
15,160 KB
testcase_05 AC 87 ms
15,180 KB
testcase_06 AC 87 ms
15,292 KB
testcase_07 AC 84 ms
15,152 KB
testcase_08 AC 84 ms
15,304 KB
testcase_09 AC 81 ms
15,260 KB
testcase_10 AC 81 ms
15,352 KB
testcase_11 AC 82 ms
15,140 KB
testcase_12 AC 84 ms
15,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
glist, dlist = n.times.map{ gets.split.map(&:to_i) }.transpose

k = n.times.max_by{|i| glist[i] - 30000 * dlist[i]}
if 30000 * 100 <= (glist[k] - 30000 * dlist[k]) * 6
  puts "YES"
  6.times{ puts k + 1}
else
  puts "NO"
end
0