結果

問題 No.182 新規性の虜
ユーザー No-RaNo-Ra
提出日時 2017-08-21 21:35:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 468 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,992 KB
実行使用メモリ 19,756 KB
最終ジャッジ日時 2023-08-27 16:25:34
合計ジャッジ時間 2,537 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,804 KB
testcase_01 AC 14 ms
7,944 KB
testcase_02 AC 13 ms
7,836 KB
testcase_03 AC 13 ms
7,800 KB
testcase_04 AC 14 ms
7,872 KB
testcase_05 AC 14 ms
7,768 KB
testcase_06 AC 15 ms
7,876 KB
testcase_07 AC 14 ms
7,964 KB
testcase_08 AC 65 ms
13,648 KB
testcase_09 AC 100 ms
17,384 KB
testcase_10 AC 89 ms
16,056 KB
testcase_11 AC 79 ms
14,432 KB
testcase_12 AC 40 ms
10,700 KB
testcase_13 AC 14 ms
7,844 KB
testcase_14 AC 14 ms
7,772 KB
testcase_15 AC 15 ms
7,796 KB
testcase_16 AC 14 ms
7,800 KB
testcase_17 AC 14 ms
7,840 KB
testcase_18 AC 77 ms
16,416 KB
testcase_19 AC 60 ms
14,172 KB
testcase_20 AC 42 ms
11,544 KB
testcase_21 AC 86 ms
17,644 KB
testcase_22 AC 47 ms
12,680 KB
testcase_23 AC 14 ms
7,892 KB
testcase_24 AC 95 ms
19,756 KB
testcase_25 AC 62 ms
10,020 KB
testcase_26 AC 24 ms
9,340 KB
testcase_27 AC 14 ms
7,964 KB
evil01.txt AC 99 ms
18,956 KB
evil02.txt AC 92 ms
18,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

count = 0
if len(listA) == 1:
    count += 1
else:
    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