結果
| 問題 | No.921 ずんだアロー |
| コンテスト | |
| ユーザー |
deideiro
|
| 提出日時 | 2019-11-25 22:29:21 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 153 ms / 2,000 ms |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 562 ms |
| コンパイル使用メモリ | 20,952 KB |
| 実行使用メモリ | 24,216 KB |
| 最終ジャッジ日時 | 2026-05-02 03:25:52 |
| 合計ジャッジ時間 | 6,306 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#yukicoder 921 ずんだアロー
N = int(input())
A = list(map(int,input().split()))
flg = 1
ans = 1
for i in range(1,N):
if flg:
if A[i-1] == A[i]:
ans += 1
else:
flg = 0
else:
ans += 1
flg = 1
print(ans)
deideiro