結果
| 問題 |
No.231 めぐるはめぐる (1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-04 18:25:22 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 244 bytes |
| コンパイル時間 | 215 ms |
| コンパイル使用メモリ | 7,552 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-09-24 14:08:27 |
| 合計ジャッジ時間 | 3,826 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 11 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i
list = STDIN.map{|s|s.split.map(&:to_i)}.map{|a|a[0] - a[1] * 30000}
if list.max * 6 >= 3000000
print 'YES'
ans = list.index(list.max) + 1
6.times{
print "\n"
print ans
}
else
print 'NO'
end