結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー sca1l
提出日時 2018-12-27 08:10:11
言語 Ruby
(3.4.1)
結果
AC  
実行時間 141 ms / 5,000 ms
コード長 158 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 18,688 KB
最終ジャッジ日時 2024-10-01 14:51:06
合計ジャッジ時間 3,825 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
h = Hash.new 0
gets.split.map{|t|
  h[t.to_i]+=1
}

max = 0
ans = 0
6.times{|i|
  if max <= h[i+1]
    max = h[i+1]
    ans = i+1
  end
}

p ans
0