結果

問題 No.182 新規性の虜
ユーザー harhogefooharhogefoo
提出日時 2016-10-12 08:06:47
言語 Ruby
(3.3.0)
結果
AC  
実行時間 158 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 530 ms
コンパイル使用メモリ 11,196 KB
実行使用メモリ 29,592 KB
最終ジャッジ日時 2023-08-27 13:08:43
合計ジャッジ時間 5,393 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,304 KB
testcase_01 AC 79 ms
15,152 KB
testcase_02 AC 80 ms
15,352 KB
testcase_03 AC 79 ms
15,156 KB
testcase_04 AC 79 ms
15,364 KB
testcase_05 AC 78 ms
15,084 KB
testcase_06 AC 79 ms
15,348 KB
testcase_07 AC 79 ms
15,300 KB
testcase_08 AC 120 ms
22,744 KB
testcase_09 AC 142 ms
28,152 KB
testcase_10 AC 135 ms
27,132 KB
testcase_11 AC 124 ms
23,560 KB
testcase_12 AC 101 ms
18,644 KB
testcase_13 AC 82 ms
15,080 KB
testcase_14 AC 78 ms
15,156 KB
testcase_15 AC 81 ms
15,036 KB
testcase_16 AC 81 ms
15,080 KB
testcase_17 AC 80 ms
15,356 KB
testcase_18 AC 120 ms
20,776 KB
testcase_19 AC 112 ms
19,596 KB
testcase_20 AC 101 ms
18,260 KB
testcase_21 AC 124 ms
21,408 KB
testcase_22 AC 105 ms
18,632 KB
testcase_23 AC 80 ms
15,180 KB
testcase_24 AC 158 ms
29,592 KB
testcase_25 AC 136 ms
21,484 KB
testcase_26 AC 88 ms
16,576 KB
testcase_27 AC 80 ms
15,076 KB
evil01.txt AC 157 ms
30,316 KB
evil02.txt AC 159 ms
30,292 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