結果

問題 No.182 新規性の虜
ユーザー tarotaro789tarotaro789
提出日時 2017-03-16 22:25:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 286 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,576 KB
実行使用メモリ 19,384 KB
最終ジャッジ日時 2023-09-17 05:27:35
合計ジャッジ時間 2,650 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,812 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,824 KB
testcase_03 AC 15 ms
7,772 KB
testcase_04 AC 16 ms
7,760 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 AC 16 ms
7,820 KB
testcase_07 AC 16 ms
7,764 KB
testcase_08 AC 66 ms
13,628 KB
testcase_09 AC 101 ms
17,160 KB
testcase_10 AC 89 ms
15,852 KB
testcase_11 AC 73 ms
14,412 KB
testcase_12 AC 40 ms
10,664 KB
testcase_13 AC 16 ms
7,772 KB
testcase_14 AC 15 ms
7,776 KB
testcase_15 AC 15 ms
7,776 KB
testcase_16 AC 16 ms
7,828 KB
testcase_17 AC 16 ms
7,760 KB
testcase_18 AC 78 ms
16,332 KB
testcase_19 AC 58 ms
14,032 KB
testcase_20 AC 40 ms
11,396 KB
testcase_21 AC 88 ms
17,484 KB
testcase_22 AC 47 ms
12,696 KB
testcase_23 AC 16 ms
7,760 KB
testcase_24 AC 88 ms
19,384 KB
testcase_25 AC 59 ms
9,788 KB
testcase_26 AC 26 ms
9,304 KB
testcase_27 WA -
evil01.txt AC 90 ms
18,916 KB
evil02.txt AC 91 ms
18,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ls=list(map(int,input().split()))
ls.sort()
cnt=0
if n==1:
    cnt+=1
for i in range(n-2):
    if i==0:
        if ls[i]!=ls[i+1]:
            cnt+=1
    if i==n-3:
        if ls[i+1]!=ls[i+2]:
            cnt+=1
    if ls[i]!=ls[i+1]!=ls[i+2]:
        cnt+=1
print(cnt)
0