結果

問題 No.182 新規性の虜
ユーザー yuruhiyayuruhiya
提出日時 2019-02-28 21:32:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 294 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 19,448 KB
最終ジャッジ日時 2023-09-05 16:20:41
合計ジャッジ時間 2,872 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,964 KB
testcase_01 AC 15 ms
7,848 KB
testcase_02 AC 15 ms
7,824 KB
testcase_03 AC 16 ms
7,756 KB
testcase_04 AC 16 ms
7,772 KB
testcase_05 AC 15 ms
7,968 KB
testcase_06 AC 15 ms
7,752 KB
testcase_07 AC 16 ms
7,756 KB
testcase_08 AC 75 ms
13,752 KB
testcase_09 AC 117 ms
17,304 KB
testcase_10 AC 99 ms
16,284 KB
testcase_11 AC 86 ms
14,604 KB
testcase_12 AC 43 ms
10,668 KB
testcase_13 AC 16 ms
7,944 KB
testcase_14 AC 16 ms
7,960 KB
testcase_15 RE -
testcase_16 AC 16 ms
7,892 KB
testcase_17 AC 16 ms
7,896 KB
testcase_18 AC 84 ms
16,324 KB
testcase_19 AC 64 ms
14,096 KB
testcase_20 AC 44 ms
11,372 KB
testcase_21 AC 95 ms
17,508 KB
testcase_22 AC 52 ms
12,680 KB
testcase_23 RE -
testcase_24 AC 102 ms
19,448 KB
testcase_25 AC 69 ms
9,960 KB
testcase_26 AC 28 ms
9,308 KB
testcase_27 AC 15 ms
7,836 KB
evil01.txt AC 110 ms
18,832 KB
evil02.txt AC 108 ms
19,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[int(i) for i in input().split()]
a.sort()
ans=0
for i in range(len(a)):
    if i==0:
        if a[i]!=a[i+1]:
            ans+=1
    elif i==len(a)-1:
        if a[i]!=a[i-1]:
            ans+=1
    else:
        if a[i]!=a[i-1] and a[i]!=a[i+1]:
            ans+=1
print(ans)
0