結果

問題 No.182 新規性の虜
ユーザー y_nakamura_CC2y_nakamura_CC2
提出日時 2018-01-17 01:40:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 19,768 KB
最終ジャッジ日時 2023-08-25 19:16:09
合計ジャッジ時間 2,613 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,840 KB
testcase_01 AC 14 ms
7,936 KB
testcase_02 AC 14 ms
7,836 KB
testcase_03 AC 15 ms
7,968 KB
testcase_04 AC 14 ms
7,760 KB
testcase_05 AC 15 ms
7,796 KB
testcase_06 AC 14 ms
7,796 KB
testcase_07 AC 14 ms
7,796 KB
testcase_08 AC 55 ms
13,656 KB
testcase_09 AC 84 ms
17,308 KB
testcase_10 AC 70 ms
15,844 KB
testcase_11 AC 65 ms
14,564 KB
testcase_12 AC 32 ms
11,032 KB
testcase_13 AC 13 ms
7,712 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 13 ms
7,864 KB
testcase_17 AC 15 ms
7,712 KB
testcase_18 AC 68 ms
16,348 KB
testcase_19 AC 55 ms
14,136 KB
testcase_20 AC 38 ms
11,800 KB
testcase_21 AC 76 ms
17,532 KB
testcase_22 AC 45 ms
12,640 KB
testcase_23 WA -
testcase_24 AC 78 ms
19,768 KB
testcase_25 AC 56 ms
9,908 KB
testcase_26 AC 23 ms
9,300 KB
testcase_27 AC 13 ms
7,844 KB
evil01.txt AC 74 ms
18,888 KB
evil02.txt AC 77 ms
18,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = sorted([int(i) for i in input().split()])

ans = 0
isOnly = True

for i in range(N-1):

    if A[i] == A[i+1]:
        isOnly = False

    elif isOnly:
        ans += 1
        if i == N-2:
            ans+=1
    else:
        isOnly = True
        
print(ans)
0