結果
問題 | No.2924 <===Super Spaceship String===> |
ユーザー |
![]() |
提出日時 | 2024-10-12 15:15:30 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 86 ms / 2,000 ms |
コード長 | 232 bytes |
コンパイル時間 | 171 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 82,888 KB |
最終ジャッジ日時 | 2024-10-16 17:54:06 |
合計ジャッジ時間 | 1,532 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
s=input() a=0 q=[] for c in s: a+=1 if c=="<": q+=[0] if c=="=": if len(q)==0: continue q[-1]+=1 if c==">": if len(q)==0: continue if q[-1]==0: q=[] else: a-=q.pop()+2 print(a)