結果

問題 No.182 新規性の虜
ユーザー a_tena_ten
提出日時 2016-03-17 14:18:38
言語 Python2
(2.7.18)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 184 bytes
コンパイル時間 1,109 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 14,700 KB
最終ジャッジ日時 2023-08-27 10:15:25
合計ジャッジ時間 3,352 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,116 KB
testcase_01 AC 11 ms
5,952 KB
testcase_02 AC 11 ms
6,112 KB
testcase_03 AC 11 ms
6,096 KB
testcase_04 AC 11 ms
5,944 KB
testcase_05 AC 12 ms
6,028 KB
testcase_06 AC 11 ms
6,188 KB
testcase_07 AC 11 ms
6,152 KB
testcase_08 AC 75 ms
10,468 KB
testcase_09 AC 120 ms
13,252 KB
testcase_10 AC 106 ms
12,348 KB
testcase_11 AC 86 ms
11,080 KB
testcase_12 AC 41 ms
8,164 KB
testcase_13 AC 11 ms
5,964 KB
testcase_14 AC 11 ms
6,092 KB
testcase_15 AC 11 ms
6,016 KB
testcase_16 AC 11 ms
6,176 KB
testcase_17 AC 12 ms
6,176 KB
testcase_18 AC 91 ms
12,296 KB
testcase_19 AC 67 ms
10,436 KB
testcase_20 AC 44 ms
8,728 KB
testcase_21 AC 104 ms
13,140 KB
testcase_22 AC 55 ms
9,420 KB
testcase_23 AC 11 ms
6,020 KB
testcase_24 AC 93 ms
14,700 KB
testcase_25 AC 67 ms
9,868 KB
testcase_26 AC 23 ms
6,876 KB
testcase_27 AC 12 ms
6,020 KB
evil01.txt AC 95 ms
14,620 KB
evil02.txt AC 95 ms
14,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding:utf-8

N=input()
A=map(int,raw_input().split())
A=sorted(A)

cnt=0
for i in range(N-1):
	if A[i-1]!=A[i] and A[i]!=A[i+1]:
		cnt+=1
	
if A.count(A[-1]) == 1:
	cnt+=1

print cnt
0