結果
| 問題 | No.2924 <===Super Spaceship String===> |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-10-28 13:47:20 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 276 bytes |
| 記録 | |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 82,344 KB |
| 実行使用メモリ | 205,744 KB |
| 最終ジャッジ日時 | 2024-10-28 13:47:25 |
| 合計ジャッジ時間 | 5,390 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 11 TLE * 1 |
ソースコード
import re
S = str(input())
if len(S) % 3 == 0 and 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))