結果

問題 No.2924 <===Super Spaceship String===>
ユーザー miho-4
提出日時 2024-10-12 15:19:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 544,600 KB
最終ジャッジ日時 2024-10-12 15:19:19
合計ジャッジ時間 4,222 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other AC * 1 WA * 4 MLE * 1 -- * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

S=input()
s=[]
tmp=[]
f1,f2=0,0
for e in S:
	if e=="<":
		s+=tmp
		tmp=[e]
	if e=="=":
		if tmp and (tmp[-1]=="<" or tmp[-1]=="="):
			tmp+=e
		else:
			s+=[e]
	if e==">":
		if tmp and tmp[-1]=="=":
			tmp=[]
		else:
			s+=e
	s+=tmp
	print(len(s))
0