結果

問題 No.457 (^^*)
ユーザー 6soukiti29
提出日時 2017-03-23 09:04:22
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 570 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-07-05 20:32:07
合計ジャッジ時間 4,911 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 TLE * 1 -- * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
count_left = S.count("(")
count_right = S.count(")")
kr = 0
sumL = 0
sumR = 0
for si,s in enumerate(S):
	if s == "(":
		kl = 0
		countstar = 0
		countyama = 0
		countstya = 0
		Lface = 0
		Rface = 0
		for ti,t in enumerate(S[si:]):
			if t == "*":
				countstar = countstar + 1
				if countyama >= 2:
					Lface = 1
			elif t == "^":
				countyama = countyama + 1
				if countstya == 1:
					Rface = 1
				elif countstar >= 1:
					countstya = 1
			elif t == ")":
				sumR = sumR + Rface
				sumL = sumL + Lface
				kl = kl + 1
		kr = kr + 1
print(sumL,sumR)
0