結果

問題 No.182 新規性の虜
ユーザー simansiman
提出日時 2016-03-19 23:47:10
言語 Ruby
(3.3.0)
結果
AC  
実行時間 170 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 11,184 KB
実行使用メモリ 28,192 KB
最終ジャッジ日時 2023-08-27 10:17:52
合計ジャッジ時間 5,392 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,256 KB
testcase_01 AC 82 ms
15,028 KB
testcase_02 AC 82 ms
15,264 KB
testcase_03 AC 82 ms
15,024 KB
testcase_04 AC 83 ms
15,144 KB
testcase_05 AC 84 ms
15,224 KB
testcase_06 AC 82 ms
15,152 KB
testcase_07 AC 83 ms
15,264 KB
testcase_08 AC 129 ms
22,572 KB
testcase_09 AC 158 ms
26,256 KB
testcase_10 AC 149 ms
25,452 KB
testcase_11 AC 136 ms
22,844 KB
testcase_12 AC 108 ms
18,736 KB
testcase_13 AC 82 ms
15,252 KB
testcase_14 AC 81 ms
15,096 KB
testcase_15 AC 82 ms
15,220 KB
testcase_16 AC 82 ms
15,028 KB
testcase_17 AC 82 ms
15,268 KB
testcase_18 AC 124 ms
20,872 KB
testcase_19 AC 114 ms
19,444 KB
testcase_20 AC 105 ms
18,080 KB
testcase_21 AC 130 ms
21,324 KB
testcase_22 AC 108 ms
18,636 KB
testcase_23 AC 83 ms
15,148 KB
testcase_24 AC 170 ms
28,192 KB
testcase_25 AC 135 ms
21,416 KB
testcase_26 AC 93 ms
16,108 KB
testcase_27 AC 83 ms
15,312 KB
evil01.txt AC 174 ms
28,988 KB
evil02.txt AC 173 ms
29,080 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

class Yukicoder
  def initialize
    n = gets.chomp.to_i
    a = gets.chomp.split(' ').map(&:to_i)
    hash = Hash.new(0)

    a.each do |num|
      hash[num] += 1
    end

    puts hash.count{|k,v| v==1}
  end
end

Yukicoder.new
0