結果

問題 No.2924 <===Super Spaceship String===>
ユーザー nouka28
提出日時 2024-09-16 11:02:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 83,264 KB
最終ジャッジ日時 2024-10-16 17:52:53
合計ジャッジ時間 1,693 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
d=[]
ans=len(s)
for i in s:
    if i=="<":d.append(0)
    if i=="=":
        if len(d):d[-1]+=1
    if i==">":
        if len(d) and d[-1]:
            ans-=2+d.pop()
        else:d.clear()
print(ans)
0