結果

問題 No.457 (^^*)
ユーザー ebicochinealebicochineal
提出日時 2016-12-08 07:57:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 347 bytes
コンパイル時間 655 ms
コンパイル使用メモリ 10,600 KB
実行使用メモリ 12,440 KB
最終ジャッジ日時 2023-08-18 22:09:18
合計ジャッジ時間 5,427 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,228 KB
testcase_01 AC 15 ms
7,764 KB
testcase_02 AC 15 ms
7,664 KB
testcase_03 AC 15 ms
7,684 KB
testcase_04 AC 16 ms
7,764 KB
testcase_05 AC 16 ms
7,852 KB
testcase_06 AC 16 ms
7,860 KB
testcase_07 AC 23 ms
7,728 KB
testcase_08 AC 59 ms
7,876 KB
testcase_09 AC 233 ms
7,736 KB
testcase_10 TLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#! /usr/bin/env python3

S = input()
l, r = [], []
lcnt = rcnt = 0
for i in range(len(S)):
    if S[i] == '(' : l += [i]
    if S[i] == ')' : r += [i]
for x in l:
    for y in r:
        i = S[x+1:y]
        if '*' in i:
            lcnt += i.rsplit('*', 1)[0].count('^') > 1
            rcnt += i.split('*', 1)[1].count('^') > 1
print(lcnt, rcnt)
0