提出 #2846909


ソースコード 拡げる

N = int(input())
a = list(map(int, input().split()))
flag = 0
for i in range(1,10001):
	if not(i in a) and flag == 0:
		a = [i] + a
		flag += 1
	elif not(i in a) and flag == 1:
		a = a + [i]
		flag += 1
	elif flag == 2:
		break

count = 0
for i in range(1, N+1):
	if a[i] == a[i-1]:
		count += 1
		a[i] = a[i-2]
print(count)

提出情報

提出日時
問題 A - Colorful Slimes 2
ユーザ yopiyama
言語 Python (3.4.3)
得点 0
コード長 344 Byte
結果 WA
実行時間 18 ms
メモリ 3064 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 0 / 200
結果
AC × 4
AC × 9
WA × 4
セット名 テストケース
Sample example_0, example_1, example_2, example_3
All example_0, example_1, example_2, example_3, handmade_0, handmade_1, rand_0, rand_1, smallcolor_0, smallcolor_1, smallcolor_2, smallcolor_3, smallcolor_4
ケース名 結果 実行時間 メモリ
example_0 AC 18 ms 3060 KiB
example_1 AC 18 ms 3064 KiB
example_2 AC 18 ms 3064 KiB
example_3 AC 18 ms 3064 KiB
handmade_0 AC 18 ms 3064 KiB
handmade_1 AC 18 ms 3060 KiB
rand_0 AC 18 ms 3064 KiB
rand_1 AC 18 ms 3064 KiB
smallcolor_0 AC 18 ms 3064 KiB
smallcolor_1 WA 18 ms 3064 KiB
smallcolor_2 WA 18 ms 3060 KiB
smallcolor_3 WA 18 ms 3060 KiB
smallcolor_4 WA 18 ms 3060 KiB