結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
|
提出日時 | 2019-04-30 16:28:45 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 153 ms / 5,000 ms |
コード長 | 125 bytes |
コンパイル時間 | 430 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 18,432 KB |
最終ジャッジ日時 | 2024-12-30 08:14:17 |
合計ジャッジ時間 | 5,230 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i ls = Hash.new(0) gets.split.map(&:to_i).each do |l| ls[l] += 1 end puts ls.sort.reverse.max_by { |k,v| v }[0]