結果
問題 | No.457 (^^*) |
ユーザー |
![]() |
提出日時 | 2016-12-09 00:05:04 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 471 bytes |
コンパイル時間 | 305 ms |
コンパイル使用メモリ | 82,564 KB |
実行使用メモリ | 117,324 KB |
最終ジャッジ日時 | 2024-11-28 15:34:55 |
合計ジャッジ時間 | 12,336 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 TLE * 3 |
ソースコード
def main():S = input()l, r = [], []lcnt = rcnt = 0for i in range(len(S)):if S[i] == '(' : l += [i]if S[i] == ')' : r += [i]for s in l:for e in r:if s < e:i = S.find('*', s+1, e)if i > -1:lcnt += S.count('^', s+1, S.rfind('*', s+1, e)) > 1rcnt += S.count('^', i, e) > 1print(lcnt, rcnt)if __name__ == '__main__':main()