結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー siman
提出日時 2015-01-10 22:54:30
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 20,480 KB
最終ジャッジ日時 2024-06-13 03:38:40
合計ジャッジ時間 3,938 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

class A
  def initialize
    n = gets.chomp.to_i
    l = gets.chomp.split(' ').map(&:to_i)

    cache = Hash.new(false)

    p l.group_by{|i| cache[i] || cache[i] = l.count(i)}.first.last.uniq.sort.last
  end
end

A.new
0