結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mobius_bkstmobius_bkst
提出日時 2015-05-04 12:27:55
言語 Ruby
(3.3.0)
結果
AC  
実行時間 126 ms / 5,000 ms
コード長 214 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 11,520 KB
実行使用メモリ 20,664 KB
最終ジャッジ日時 2023-09-08 14:26:02
合計ジャッジ時間 3,666 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
15,112 KB
testcase_01 AC 121 ms
20,584 KB
testcase_02 AC 84 ms
15,296 KB
testcase_03 AC 79 ms
15,260 KB
testcase_04 AC 81 ms
15,176 KB
testcase_05 AC 123 ms
20,540 KB
testcase_06 AC 78 ms
15,112 KB
testcase_07 AC 79 ms
15,124 KB
testcase_08 AC 79 ms
15,108 KB
testcase_09 AC 78 ms
15,080 KB
testcase_10 AC 79 ms
15,312 KB
testcase_11 AC 78 ms
15,040 KB
testcase_12 AC 78 ms
15,168 KB
testcase_13 AC 79 ms
15,256 KB
testcase_14 AC 101 ms
18,256 KB
testcase_15 AC 88 ms
16,152 KB
testcase_16 AC 105 ms
19,128 KB
testcase_17 AC 87 ms
16,076 KB
testcase_18 AC 107 ms
19,124 KB
testcase_19 AC 102 ms
18,036 KB
testcase_20 AC 126 ms
20,664 KB
testcase_21 AC 82 ms
15,248 KB
testcase_22 AC 96 ms
16,900 KB
testcase_23 AC 122 ms
20,336 KB
testcase_24 AC 125 ms
20,556 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i
count = Array.new(7,0)
L = gets.chomp.split
N.times do |i|
  count[L[i].to_i] += 1
end
max = -1
output = -1
for i in 1..6
  if count[i] >= max
    output = i;
    max = count[i]
  end
end
puts output
0