結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー rkyrky
提出日時 2017-11-05 13:39:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 261 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 11,428 KB
実行使用メモリ 22,448 KB
最終ジャッジ日時 2023-09-08 15:18:06
合計ジャッジ時間 3,713 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
15,068 KB
testcase_01 AC 135 ms
22,396 KB
testcase_02 AC 80 ms
15,076 KB
testcase_03 AC 81 ms
15,096 KB
testcase_04 AC 83 ms
15,068 KB
testcase_05 AC 126 ms
22,392 KB
testcase_06 AC 82 ms
15,268 KB
testcase_07 AC 81 ms
15,200 KB
testcase_08 AC 80 ms
15,120 KB
testcase_09 AC 81 ms
15,008 KB
testcase_10 AC 82 ms
15,300 KB
testcase_11 AC 81 ms
15,116 KB
testcase_12 AC 80 ms
15,252 KB
testcase_13 AC 83 ms
15,148 KB
testcase_14 AC 111 ms
19,268 KB
testcase_15 AC 92 ms
16,628 KB
testcase_16 AC 117 ms
20,720 KB
testcase_17 AC 90 ms
16,544 KB
testcase_18 AC 116 ms
20,508 KB
testcase_19 AC 108 ms
18,716 KB
testcase_20 AC 137 ms
22,448 KB
testcase_21 AC 83 ms
15,048 KB
testcase_22 AC 98 ms
17,468 KB
testcase_23 AC 131 ms
21,748 KB
testcase_24 AC 137 ms
22,328 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - test_case
Syntax OK

ソースコード

diff #

test_case = gets.chomp.to_i
list = gets.chomp.split.map(&:to_i)
list_uniq = list.uniq()
list_count = Array.new
answer = Array.new

list_uniq.each{|i| list_count << list.count(i)}
list_uniq.each{|i| answer << i if list.count(i) == list_count.max}
puts answer.max
0