結果

問題 No.182 新規性の虜
ユーザー ynyn
提出日時 2015-06-25 11:34:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 269 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 19,444 KB
最終ジャッジ日時 2023-09-22 00:37:19
合計ジャッジ時間 3,110 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,820 KB
testcase_01 AC 17 ms
7,836 KB
testcase_02 AC 16 ms
7,848 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 16 ms
7,852 KB
testcase_05 AC 16 ms
7,768 KB
testcase_06 AC 16 ms
7,864 KB
testcase_07 AC 16 ms
7,784 KB
testcase_08 AC 58 ms
13,620 KB
testcase_09 AC 89 ms
17,276 KB
testcase_10 AC 75 ms
16,356 KB
testcase_11 AC 65 ms
14,404 KB
testcase_12 AC 36 ms
10,696 KB
testcase_13 AC 16 ms
7,820 KB
testcase_14 AC 16 ms
7,768 KB
testcase_15 RE -
testcase_16 AC 16 ms
7,764 KB
testcase_17 AC 16 ms
7,784 KB
testcase_18 AC 82 ms
16,320 KB
testcase_19 AC 61 ms
14,032 KB
testcase_20 AC 43 ms
11,496 KB
testcase_21 AC 93 ms
17,532 KB
testcase_22 AC 50 ms
12,628 KB
testcase_23 RE -
testcase_24 AC 71 ms
19,444 KB
testcase_25 AC 65 ms
9,996 KB
testcase_26 AC 24 ms
9,388 KB
testcase_27 AC 17 ms
7,840 KB
evil01.txt AC 71 ms
19,128 KB
evil02.txt AC 71 ms
19,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

count = 1

if a[1] == a[0]:
        count -= 1
else :
    count += 1

for i in range(2,n):
    if a[i] == a[i-1]:
        if a[i] != a[i-2]:
            count -= 1
    else:
        count += 1

print(count)
0