結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー d_nishiyama85d_nishiyama85
提出日時 2016-06-05 14:55:46
言語 Ruby
(3.3.0)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 251 bytes
コンパイル時間 227 ms
コンパイル使用メモリ 11,288 KB
実行使用メモリ 22,012 KB
最終ジャッジ日時 2023-09-08 14:51:44
合計ジャッジ時間 3,959 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
15,480 KB
testcase_01 AC 132 ms
21,724 KB
testcase_02 AC 87 ms
15,284 KB
testcase_03 AC 87 ms
15,584 KB
testcase_04 AC 89 ms
15,488 KB
testcase_05 AC 131 ms
21,868 KB
testcase_06 AC 88 ms
15,336 KB
testcase_07 AC 88 ms
15,452 KB
testcase_08 AC 87 ms
15,292 KB
testcase_09 AC 89 ms
15,408 KB
testcase_10 AC 89 ms
15,568 KB
testcase_11 AC 89 ms
15,308 KB
testcase_12 AC 89 ms
15,372 KB
testcase_13 AC 87 ms
15,580 KB
testcase_14 AC 116 ms
19,112 KB
testcase_15 AC 97 ms
16,972 KB
testcase_16 AC 123 ms
20,372 KB
testcase_17 AC 96 ms
16,760 KB
testcase_18 AC 123 ms
20,448 KB
testcase_19 AC 115 ms
18,828 KB
testcase_20 AC 133 ms
21,948 KB
testcase_21 AC 87 ms
15,480 KB
testcase_22 AC 106 ms
17,588 KB
testcase_23 AC 130 ms
21,376 KB
testcase_24 AC 130 ms
22,012 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

require 'pp'

n = gets.to_i
max = gets.split(' ')
           .map{|e| e.to_i}
           .group_by{|e| e}
           .map{|k, e| [k, e.length]}
           .max{|a, b|
             a[1] == b[1] ? a[0] <=> b[0] : a[1] <=> b[1]
           }

puts max[0]
0