結果
問題 | No.457 (^^*) |
ユーザー | ebicochineal |
提出日時 | 2016-12-08 07:58:01 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 347 bytes |
コンパイル時間 | 1,884 ms |
コンパイル使用メモリ | 86,680 KB |
実行使用メモリ | 77,188 KB |
最終ジャッジ日時 | 2023-08-18 22:14:53 |
合計ジャッジ時間 | 6,469 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
71,136 KB |
testcase_01 | AC | 73 ms
70,988 KB |
testcase_02 | AC | 73 ms
71,000 KB |
testcase_03 | AC | 71 ms
71,212 KB |
testcase_04 | AC | 73 ms
70,892 KB |
testcase_05 | AC | 74 ms
70,948 KB |
testcase_06 | AC | 72 ms
71,132 KB |
testcase_07 | AC | 83 ms
75,844 KB |
testcase_08 | AC | 99 ms
76,476 KB |
testcase_09 | AC | 172 ms
76,580 KB |
testcase_10 | AC | 1,289 ms
77,188 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
#! /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)