結果
問題 |
No.706 多眼生物の調査
|
ユーザー |
|
提出日時 | 2024-06-07 18:22:53 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 92 ms / 2,000 ms |
コード長 | 271 bytes |
コンパイル時間 | 826 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,544 KB |
最終ジャッジ日時 | 2024-12-26 02:33:57 |
合計ジャッジ時間 | 1,543 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
N = gets.to_i SIZE = 1000 eyes = Array.new(SIZE, 0) (1..N).each do s = gets.chomp.size - 2 eyes[s] += 1 end max_eye = 0 last_index = 0 (0..SIZE - 1).each do |index| eye = eyes[index] eye < max_eye and next max_eye = eye last_index = index end puts last_index