結果

問題 No.182 新規性の虜
ユーザー No-RaNo-Ra
提出日時 2017-08-21 21:34:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 387 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 20,520 KB
最終ジャッジ日時 2024-04-23 01:40:06
合計ジャッジ時間 2,574 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 27 ms
10,752 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 25 ms
10,752 KB
testcase_04 AC 25 ms
10,880 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 25 ms
10,752 KB
testcase_07 AC 24 ms
10,752 KB
testcase_08 AC 81 ms
16,492 KB
testcase_09 AC 118 ms
20,396 KB
testcase_10 AC 112 ms
19,300 KB
testcase_11 AC 90 ms
17,288 KB
testcase_12 AC 57 ms
13,472 KB
testcase_13 AC 26 ms
10,752 KB
testcase_14 AC 26 ms
10,752 KB
testcase_15 RE -
testcase_16 AC 24 ms
10,752 KB
testcase_17 AC 24 ms
10,752 KB
testcase_18 AC 90 ms
17,848 KB
testcase_19 AC 74 ms
16,156 KB
testcase_20 AC 54 ms
13,668 KB
testcase_21 AC 100 ms
18,984 KB
testcase_22 AC 61 ms
14,656 KB
testcase_23 RE -
testcase_24 AC 113 ms
20,520 KB
testcase_25 AC 82 ms
12,628 KB
testcase_26 AC 36 ms
12,032 KB
testcase_27 AC 25 ms
10,752 KB
evil01.txt AC 118 ms
21,640 KB
evil02.txt AC 113 ms
21,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
listA = [int(i) for i in input().split()]
listA.sort()

count = 0
for i in range(len(listA)):
    if i == 0:
        if listA[i] != listA[(i+1)]:
            count += 1
    elif i == len(listA)-1:
        if listA[(i-1)] != listA[i]:
            count += 1
    else:
        if listA[(i-1)] != listA[i] and listA[i] != listA[(i+1)]:
            count += 1

print(count)
0