結果

問題 No.457 (^^*)
ユーザー 6soukiti296soukiti29
提出日時 2017-03-23 09:04:22
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 570 bytes
コンパイル時間 151 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 15,120 KB
最終ジャッジ日時 2023-09-19 08:44:04
合計ジャッジ時間 5,930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
15,120 KB
testcase_01 AC 16 ms
7,740 KB
testcase_02 AC 16 ms
7,888 KB
testcase_03 AC 16 ms
7,744 KB
testcase_04 AC 16 ms
7,748 KB
testcase_05 AC 16 ms
7,752 KB
testcase_06 AC 16 ms
7,740 KB
testcase_07 AC 22 ms
7,864 KB
testcase_08 AC 45 ms
7,940 KB
testcase_09 AC 124 ms
7,768 KB
testcase_10 AC 742 ms
7,736 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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