結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,756 KB
testcase_01 AC 15 ms
7,900 KB
testcase_02 AC 16 ms
7,688 KB
testcase_03 AC 16 ms
7,760 KB
testcase_04 AC 15 ms
7,776 KB
testcase_05 AC 16 ms
7,760 KB
testcase_06 AC 16 ms
7,760 KB
testcase_07 AC 16 ms
7,932 KB
testcase_08 AC 65 ms
13,648 KB
testcase_09 AC 99 ms
17,276 KB
testcase_10 AC 89 ms
15,992 KB
testcase_11 AC 76 ms
14,564 KB
testcase_12 AC 38 ms
10,656 KB
testcase_13 AC 17 ms
7,936 KB
testcase_14 AC 16 ms
7,764 KB
testcase_15 WA -
testcase_16 AC 15 ms
7,964 KB
testcase_17 AC 15 ms
7,932 KB
testcase_18 AC 77 ms
16,276 KB
testcase_19 AC 58 ms
14,212 KB
testcase_20 AC 40 ms
11,276 KB
testcase_21 AC 83 ms
17,484 KB
testcase_22 AC 48 ms
12,736 KB
testcase_23 WA -
testcase_24 AC 88 ms
19,428 KB
testcase_25 AC 61 ms
9,904 KB
testcase_26 AC 26 ms
9,232 KB
testcase_27 WA -
evil01.txt AC 90 ms
18,832 KB
evil02.txt AC 93 ms
18,848 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ls=list(map(int,input().split()))
ls.sort()
cnt=0
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