結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mesh1nek0x0mesh1nek0x0
提出日時 2018-07-11 23:33:32
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 249 bytes
コンパイル時間 548 ms
コンパイル使用メモリ 11,848 KB
実行使用メモリ 22,628 KB
最終ジャッジ日時 2023-10-22 02:06:25
合計ジャッジ時間 3,889 ms
ジャッジサーバーID
(参考情報)
judge10 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,072 KB
testcase_01 WA -
testcase_02 AC 90 ms
16,072 KB
testcase_03 AC 85 ms
16,072 KB
testcase_04 AC 89 ms
16,072 KB
testcase_05 AC 129 ms
22,628 KB
testcase_06 AC 85 ms
16,072 KB
testcase_07 AC 84 ms
16,072 KB
testcase_08 AC 85 ms
16,072 KB
testcase_09 AC 85 ms
16,072 KB
testcase_10 AC 89 ms
16,072 KB
testcase_11 AC 85 ms
16,072 KB
testcase_12 AC 84 ms
16,072 KB
testcase_13 AC 84 ms
16,072 KB
testcase_14 AC 109 ms
19,672 KB
testcase_15 AC 97 ms
17,464 KB
testcase_16 AC 114 ms
20,772 KB
testcase_17 WA -
testcase_18 AC 114 ms
20,604 KB
testcase_19 AC 108 ms
19,340 KB
testcase_20 AC 137 ms
22,612 KB
testcase_21 AC 94 ms
16,072 KB
testcase_22 WA -
testcase_23 AC 128 ms
22,276 KB
testcase_24 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#!/bin/ruby
N = gets.chomp.to_i
L = gets.chomp.split(' ')

groups = L.group_by { |num| num }

max_lv = 0
max = 0
groups.each do |lv, value|
  if max <= value.count && max_lv < lv.to_i
    max_lv = lv.to_i
    max = value.count
  end
end

puts max_lv
0