結果

問題 No.2924 <===Super Spaceship String===>
コンテスト
ユーザー Basin-Bug
提出日時 2024-10-28 13:46:01
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 256 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 174 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 307,832 KB
最終ジャッジ日時 2026-05-05 23:36:09
合計ジャッジ時間 5,195 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 10 WA * 1 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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))
0