結果

問題 No.182 新規性の虜
ユーザー oz4point5oz4point5
提出日時 2019-03-30 16:51:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 103 ms / 5,000 ms
コード長 227 bytes
コンパイル時間 78 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 20,516 KB
最終ジャッジ日時 2024-04-27 16:11:26
合計ジャッジ時間 2,622 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,496 KB
testcase_01 AC 25 ms
10,624 KB
testcase_02 AC 25 ms
10,752 KB
testcase_03 AC 25 ms
10,624 KB
testcase_04 AC 24 ms
10,496 KB
testcase_05 AC 26 ms
10,496 KB
testcase_06 AC 24 ms
10,624 KB
testcase_07 AC 25 ms
10,624 KB
testcase_08 AC 74 ms
16,360 KB
testcase_09 AC 103 ms
19,868 KB
testcase_10 AC 98 ms
18,808 KB
testcase_11 AC 82 ms
17,404 KB
testcase_12 AC 49 ms
13,724 KB
testcase_13 AC 25 ms
10,624 KB
testcase_14 AC 26 ms
10,496 KB
testcase_15 AC 24 ms
10,624 KB
testcase_16 AC 24 ms
10,752 KB
testcase_17 AC 24 ms
10,752 KB
testcase_18 AC 75 ms
17,836 KB
testcase_19 AC 61 ms
15,776 KB
testcase_20 AC 50 ms
13,824 KB
testcase_21 AC 84 ms
18,848 KB
testcase_22 AC 53 ms
14,992 KB
testcase_23 AC 25 ms
10,624 KB
testcase_24 AC 96 ms
20,516 KB
testcase_25 AC 61 ms
12,900 KB
testcase_26 AC 35 ms
12,032 KB
testcase_27 AC 25 ms
10,624 KB
evil01.txt AC 95 ms
21,676 KB
evil02.txt AC 95 ms
21,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-

n = int(input())
a = list(map(int,input().split()))

a.sort()

a = ["x"] + a + ["x"]
new = []

for i in range(1,n+1):
    if a[i] != a[i-1] and a[i] != a[i+1]:
        new.append(a[i])

print(len(new))
0