結果

問題 No.182 新規性の虜
ユーザー maimai
提出日時 2016-01-23 19:15:37
言語 Ruby
(3.2.2)
結果
AC  
実行時間 167 ms / 5,000 ms
コード長 104 bytes
コンパイル時間 49 ms
コンパイル使用メモリ 11,400 KB
実行使用メモリ 28,832 KB
最終ジャッジ日時 2023-08-27 09:28:32
合計ジャッジ時間 4,733 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,052 KB
testcase_01 AC 83 ms
15,284 KB
testcase_02 AC 81 ms
15,052 KB
testcase_03 AC 82 ms
15,284 KB
testcase_04 AC 83 ms
15,048 KB
testcase_05 AC 84 ms
15,232 KB
testcase_06 AC 84 ms
15,136 KB
testcase_07 AC 85 ms
15,056 KB
testcase_08 AC 124 ms
22,328 KB
testcase_09 AC 150 ms
27,400 KB
testcase_10 AC 143 ms
26,340 KB
testcase_11 AC 132 ms
22,720 KB
testcase_12 AC 107 ms
18,416 KB
testcase_13 AC 86 ms
15,312 KB
testcase_14 AC 85 ms
15,308 KB
testcase_15 AC 86 ms
15,076 KB
testcase_16 AC 86 ms
15,276 KB
testcase_17 AC 84 ms
15,236 KB
testcase_18 AC 127 ms
20,320 KB
testcase_19 AC 119 ms
19,172 KB
testcase_20 AC 108 ms
17,808 KB
testcase_21 AC 133 ms
20,980 KB
testcase_22 AC 112 ms
18,516 KB
testcase_23 AC 84 ms
15,136 KB
testcase_24 AC 167 ms
28,832 KB
testcase_25 AC 141 ms
21,208 KB
testcase_26 AC 92 ms
16,488 KB
testcase_27 AC 86 ms
15,312 KB
evil01.txt AC 166 ms
29,340 KB
evil02.txt AC 166 ms
29,500 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n=gets.to_i
d={}
gets.split(" ").map(&:to_i).each{|i|d[i]=d[i] ? d[i]+1 : 1}
p d.select{|k,v| v==1}.size
0