結果
| 問題 |
No.921 ずんだアロー
|
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2019-11-09 15:05:25 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 102 ms / 2,000 ms |
| コード長 | 389 bytes |
| コンパイル時間 | 740 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 20,848 KB |
| 最終ジャッジ日時 | 2024-09-15 04:28:57 |
| 合計ジャッジ時間 | 3,237 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
# coding: utf-8
# Your code here!
N=int(input())
A=list(map(int,input().split()))
l=[0]*N
count=0
for i in range(N):
if i==0:
count+=1
l[i]=1
else:
if A[i-1]==A[i]:
count+=1
l[i]=1
else:
if l[i-1]==1:
pass
else:
count+=1
l[i]=1
#print(l)
print(count)
komkompi