結果

問題 No.182 新規性の虜
ユーザー カルロスカルロス
提出日時 2016-05-24 13:42:21
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 225 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 19,200 KB
最終ジャッジ日時 2024-04-16 11:49:22
合計ジャッジ時間 4,367 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
12,800 KB
testcase_01 AC 97 ms
12,800 KB
testcase_02 AC 100 ms
12,544 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 98 ms
12,672 KB
testcase_14 AC 96 ms
12,672 KB
testcase_15 AC 97 ms
12,672 KB
testcase_16 AC 97 ms
12,800 KB
testcase_17 AC 97 ms
12,672 KB
testcase_18 AC 137 ms
17,408 KB
testcase_19 AC 121 ms
16,000 KB
testcase_20 AC 120 ms
14,848 KB
testcase_21 AC 144 ms
18,048 KB
testcase_22 AC 119 ms
15,488 KB
testcase_23 AC 97 ms
12,800 KB
testcase_24 AC 148 ms
19,200 KB
testcase_25 AC 148 ms
19,200 KB
testcase_26 RE -
testcase_27 AC 97 ms
12,800 KB
evil01.txt RE -
evil02.txt RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

novelty = Array.new(100001, 0)
n = gets.to_i
data = gets.split.map(&:to_i)
n.times{|i|
    novelty[data[i]] = novelty[data[i]] + 1
}

ans = 0
(1..100000).each{|i|
    if novelty[i]==1
        ans = ans + 1
    end
}
puts ans
0