結果

問題 No.182 新規性の虜
ユーザー osa_kosa_k
提出日時 2015-07-27 00:39:42
言語 Ruby
(3.3.0)
結果
AC  
実行時間 179 ms / 5,000 ms
コード長 151 bytes
コンパイル時間 737 ms
コンパイル使用メモリ 11,368 KB
実行使用メモリ 28,304 KB
最終ジャッジ日時 2023-08-27 07:26:16
合計ジャッジ時間 5,474 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,032 KB
testcase_01 AC 81 ms
15,204 KB
testcase_02 AC 83 ms
15,128 KB
testcase_03 AC 84 ms
15,096 KB
testcase_04 AC 81 ms
15,124 KB
testcase_05 AC 83 ms
15,144 KB
testcase_06 AC 82 ms
15,212 KB
testcase_07 AC 81 ms
15,112 KB
testcase_08 AC 132 ms
22,376 KB
testcase_09 AC 167 ms
26,136 KB
testcase_10 AC 154 ms
25,288 KB
testcase_11 AC 136 ms
22,936 KB
testcase_12 AC 108 ms
18,752 KB
testcase_13 AC 82 ms
15,016 KB
testcase_14 AC 80 ms
15,032 KB
testcase_15 AC 83 ms
15,148 KB
testcase_16 AC 81 ms
15,036 KB
testcase_17 AC 81 ms
15,172 KB
testcase_18 AC 125 ms
20,984 KB
testcase_19 AC 116 ms
19,500 KB
testcase_20 AC 106 ms
18,180 KB
testcase_21 AC 134 ms
21,444 KB
testcase_22 AC 109 ms
18,680 KB
testcase_23 AC 82 ms
15,152 KB
testcase_24 AC 179 ms
28,304 KB
testcase_25 AC 141 ms
21,400 KB
testcase_26 AC 90 ms
16,116 KB
testcase_27 AC 82 ms
15,120 KB
evil01.txt AC 180 ms
29,040 KB
evil02.txt AC 180 ms
29,040 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

#!/usr/bin/env ruby

n = gets.to_i
tbl = Hash.new
gets.chomp.split.map(&:to_i).each do |i|
  tbl[i] ||= 0
  tbl[i] += 1
end
puts tbl.count{|_,v| v==1}
0