結果

問題 No.182 新規性の虜
ユーザー rkyrky
提出日時 2017-11-03 18:27:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 11,428 KB
実行使用メモリ 29,656 KB
最終ジャッジ日時 2023-08-27 16:49:01
合計ジャッジ時間 4,282 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,032 KB
testcase_01 AC 78 ms
15,004 KB
testcase_02 AC 81 ms
15,248 KB
testcase_03 AC 77 ms
15,124 KB
testcase_04 AC 78 ms
15,292 KB
testcase_05 AC 75 ms
15,120 KB
testcase_06 AC 77 ms
15,120 KB
testcase_07 AC 76 ms
15,300 KB
testcase_08 AC 115 ms
22,592 KB
testcase_09 AC 136 ms
28,112 KB
testcase_10 AC 131 ms
27,140 KB
testcase_11 AC 121 ms
23,288 KB
testcase_12 AC 97 ms
18,804 KB
testcase_13 AC 77 ms
15,268 KB
testcase_14 AC 77 ms
15,276 KB
testcase_15 AC 76 ms
15,332 KB
testcase_16 AC 77 ms
15,252 KB
testcase_17 AC 76 ms
15,240 KB
testcase_18 AC 115 ms
20,748 KB
testcase_19 AC 108 ms
19,476 KB
testcase_20 AC 99 ms
18,188 KB
testcase_21 AC 120 ms
21,572 KB
testcase_22 AC 100 ms
18,792 KB
testcase_23 AC 77 ms
15,024 KB
testcase_24 AC 149 ms
29,656 KB
testcase_25 AC 127 ms
21,596 KB
testcase_26 AC 84 ms
16,748 KB
testcase_27 AC 77 ms
15,144 KB
evil01.txt AC 156 ms
30,272 KB
evil02.txt AC 155 ms
30,220 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.chomp.split(" ").map(&:to_i)
h = Hash.new(0)

a.each do |i|
  h[i] += 1
end
s = h.select {|k, v| v == 1}
puts s.length
0