結果

問題 No.182 新規性の虜
ユーザー soupesuteakasoupesuteaka
提出日時 2016-03-03 16:09:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 332 bytes
コンパイル時間 586 ms
コンパイル使用メモリ 10,560 KB
実行使用メモリ 20,652 KB
最終ジャッジ日時 2023-08-27 10:11:00
合計ジャッジ時間 3,533 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,160 KB
testcase_01 AC 26 ms
9,184 KB
testcase_02 AC 26 ms
9,112 KB
testcase_03 AC 26 ms
9,164 KB
testcase_04 AC 26 ms
9,108 KB
testcase_05 AC 26 ms
9,184 KB
testcase_06 AC 27 ms
9,164 KB
testcase_07 AC 26 ms
9,316 KB
testcase_08 AC 79 ms
14,768 KB
testcase_09 AC 116 ms
18,532 KB
testcase_10 AC 102 ms
17,068 KB
testcase_11 AC 91 ms
15,744 KB
testcase_12 AC 52 ms
12,056 KB
testcase_13 AC 26 ms
9,184 KB
testcase_14 AC 26 ms
9,184 KB
testcase_15 AC 26 ms
9,188 KB
testcase_16 AC 27 ms
9,200 KB
testcase_17 AC 27 ms
9,120 KB
testcase_18 AC 85 ms
17,392 KB
testcase_19 AC 68 ms
15,328 KB
testcase_20 AC 51 ms
12,780 KB
testcase_21 AC 95 ms
18,140 KB
testcase_22 AC 57 ms
13,572 KB
testcase_23 AC 26 ms
9,256 KB
testcase_24 AC 100 ms
20,652 KB
testcase_25 AC 65 ms
11,212 KB
testcase_26 AC 37 ms
10,512 KB
testcase_27 AC 27 ms
9,284 KB
evil01.txt AC 105 ms
20,100 KB
evil02.txt AC 105 ms
20,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#coding: UTF-8

import sys
import re
import itertools
from math import log
from collections import deque

### defs ###


### main ###
N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

A = sorted(A)
A = [0] + A + [0]
ans=0
for i in range(1,N+1):
	if (A[i-1]!=A[i] and A[i]!=A[i+1]):
		ans+=1

print(ans)
0