結果

問題 No.182 新規性の虜
ユーザー kazukimscskazukimscs
提出日時 2022-05-14 00:24:50
言語 Ruby
(3.3.0)
結果
AC  
実行時間 149 ms / 5,000 ms
コード長 153 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 11,196 KB
実行使用メモリ 29,624 KB
最終ジャッジ日時 2023-09-29 10:27:24
合計ジャッジ時間 4,599 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
15,108 KB
testcase_01 AC 78 ms
15,208 KB
testcase_02 AC 76 ms
15,232 KB
testcase_03 AC 76 ms
15,272 KB
testcase_04 AC 76 ms
15,156 KB
testcase_05 AC 80 ms
15,300 KB
testcase_06 AC 77 ms
15,152 KB
testcase_07 AC 76 ms
15,168 KB
testcase_08 AC 113 ms
22,344 KB
testcase_09 AC 133 ms
28,112 KB
testcase_10 AC 129 ms
27,144 KB
testcase_11 AC 118 ms
23,496 KB
testcase_12 AC 95 ms
18,468 KB
testcase_13 AC 75 ms
15,188 KB
testcase_14 AC 76 ms
15,244 KB
testcase_15 AC 76 ms
15,236 KB
testcase_16 AC 75 ms
15,248 KB
testcase_17 AC 75 ms
15,184 KB
testcase_18 AC 113 ms
20,356 KB
testcase_19 AC 106 ms
19,240 KB
testcase_20 AC 95 ms
18,036 KB
testcase_21 AC 118 ms
21,092 KB
testcase_22 AC 101 ms
18,364 KB
testcase_23 AC 76 ms
15,032 KB
testcase_24 AC 149 ms
29,624 KB
testcase_25 AC 126 ms
21,128 KB
testcase_26 AC 84 ms
16,616 KB
testcase_27 AC 76 ms
15,236 KB
evil01.txt AC 151 ms
30,224 KB
evil02.txt AC 152 ms
30,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.split.map(&:to_i)

counts = Hash.new(0)
a.each { |number| counts[number] += 1 }
i = counts.select { |k, v| v == 1 }.keys
p i.size
0