結果

問題 No.706 多眼生物の調査
ユーザー simansiman
提出日時 2020-09-28 17:51:27
言語 Ruby
(3.3.0)
結果
AC  
実行時間 86 ms / 2,000 ms
コード長 176 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 11,264 KB
実行使用メモリ 15,952 KB
最終ジャッジ日時 2023-09-15 01:52:54
合計ジャッジ時間 1,703 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
15,048 KB
testcase_01 AC 81 ms
15,144 KB
testcase_02 AC 80 ms
15,240 KB
testcase_03 AC 80 ms
15,332 KB
testcase_04 AC 81 ms
15,280 KB
testcase_05 AC 82 ms
15,620 KB
testcase_06 AC 85 ms
15,952 KB
testcase_07 AC 80 ms
15,324 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
S = N.times.map { gets.chomp }
counter = Hash.new(0)

S.each do |s|
  cnt = s.count('^')
  counter[cnt] += 1
end

puts counter.max_by { |v, cnt| [cnt, v] }.first
0