結果

問題 No.1765 While Shining
ユーザー Keroru
提出日時 2021-11-26 22:56:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 165 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 82,392 KB
実行使用メモリ 111,908 KB
最終ジャッジ日時 2024-06-29 18:23:08
合計ジャッジ時間 2,882 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 1 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

n,*a=map(int,open(0).read().split())
from collections import deque
a=deque(a)
x=a[-1]==0
while a and a[-1]==1:a.pop()
while a and a[0]==0:a.popleft()
print(len(a)-x)
0