結果

問題 No.182 新規性の虜
ユーザー tarotaro789tarotaro789
提出日時 2017-10-22 17:41:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 5,000 ms
コード長 331 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 10,752 KB
実行使用メモリ 19,544 KB
最終ジャッジ日時 2023-08-27 16:46:40
合計ジャッジ時間 2,881 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,768 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 15 ms
7,792 KB
testcase_03 AC 15 ms
7,964 KB
testcase_04 AC 16 ms
7,788 KB
testcase_05 AC 16 ms
7,808 KB
testcase_06 AC 15 ms
7,832 KB
testcase_07 AC 17 ms
7,804 KB
testcase_08 AC 65 ms
13,556 KB
testcase_09 AC 101 ms
17,332 KB
testcase_10 AC 89 ms
15,860 KB
testcase_11 AC 74 ms
14,372 KB
testcase_12 AC 40 ms
10,828 KB
testcase_13 AC 15 ms
7,788 KB
testcase_14 AC 15 ms
7,852 KB
testcase_15 AC 16 ms
7,852 KB
testcase_16 AC 16 ms
7,788 KB
testcase_17 AC 16 ms
7,860 KB
testcase_18 AC 76 ms
16,288 KB
testcase_19 AC 58 ms
14,076 KB
testcase_20 AC 40 ms
11,444 KB
testcase_21 AC 84 ms
17,636 KB
testcase_22 AC 47 ms
12,744 KB
testcase_23 AC 16 ms
7,808 KB
testcase_24 AC 88 ms
19,544 KB
testcase_25 AC 60 ms
9,852 KB
testcase_26 AC 25 ms
9,416 KB
testcase_27 AC 15 ms
7,788 KB
evil01.txt AC 91 ms
18,880 KB
evil02.txt AC 92 ms
18,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ls=list(map(int,input().split()))
ls.sort()
cnt=0
if n==1:
    cnt+=1
if n==2:
    if ls[0]!=ls[1]:
        cnt+=2
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