結果
問題 |
No.2924 <===Super Spaceship String===>
|
ユーザー |
|
提出日時 | 2024-10-28 13:46:01 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 256 bytes |
コンパイル時間 | 440 ms |
コンパイル使用メモリ | 82,472 KB |
実行使用メモリ | 220,732 KB |
最終ジャッジ日時 | 2024-10-28 13:46:07 |
合計ジャッジ時間 | 6,007 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 1 TLE * 1 |
ソースコード
import re S = str(input()) if S[:2 * len(S) // 3] == "<=" * (len(S) // 3) and S[2 * len(S) // 3 + 1:] == ">" * (len(S) // 3): print(0) exit() new_S = re.sub("<=+>", "", S) while new_S != S: S = new_S new_S = re.sub("<=+>", "", S) print(len(new_S))