結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー | fine |
提出日時 | 2016-03-04 18:26:27 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 87 ms / 1,000 ms |
コード長 | 222 bytes |
コンパイル時間 | 41 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-08 00:11:54 |
合計ジャッジ時間 | 1,871 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 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 puts 'YES' ans = list.index(list.max) + 1 6.times{ puts ans } else puts 'NO' end