結果

問題 No.182 新規性の虜
ユーザー suppy193suppy193
提出日時 2015-05-27 13:22:15
言語 Ruby
(3.3.0)
結果
AC  
実行時間 155 ms / 5,000 ms
コード長 158 bytes
コンパイル時間 479 ms
コンパイル使用メモリ 11,496 KB
実行使用メモリ 32,920 KB
最終ジャッジ日時 2023-08-27 07:19:00
合計ジャッジ時間 5,104 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
15,032 KB
testcase_01 AC 70 ms
15,292 KB
testcase_02 AC 72 ms
15,028 KB
testcase_03 AC 69 ms
15,268 KB
testcase_04 AC 69 ms
15,300 KB
testcase_05 AC 70 ms
15,272 KB
testcase_06 AC 72 ms
15,208 KB
testcase_07 AC 69 ms
15,108 KB
testcase_08 AC 116 ms
23,580 KB
testcase_09 AC 142 ms
30,144 KB
testcase_10 AC 134 ms
29,944 KB
testcase_11 AC 130 ms
27,140 KB
testcase_12 AC 97 ms
20,528 KB
testcase_13 AC 71 ms
15,284 KB
testcase_14 AC 73 ms
15,264 KB
testcase_15 AC 68 ms
15,372 KB
testcase_16 AC 72 ms
15,180 KB
testcase_17 AC 69 ms
15,116 KB
testcase_18 AC 107 ms
20,620 KB
testcase_19 AC 101 ms
19,292 KB
testcase_20 AC 94 ms
18,076 KB
testcase_21 AC 118 ms
21,132 KB
testcase_22 AC 96 ms
18,764 KB
testcase_23 AC 68 ms
15,116 KB
testcase_24 AC 155 ms
32,920 KB
testcase_25 AC 114 ms
20,716 KB
testcase_26 AC 83 ms
16,828 KB
testcase_27 AC 69 ms
15,072 KB
evil01.txt AC 159 ms
33,572 KB
evil02.txt AC 163 ms
33,580 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.strip.to_i
a = gets.strip.split(' ')
count = 0

h = Hash.new(0)

a.each do |k|
	h[k] += 1
end

h.each do |k, v|
	count += 1 if v == 1
end
puts count
0