結果
問題 | No.457 (^^*) |
ユーザー |
![]() |
提出日時 | 2017-01-26 17:31:10 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 585 bytes |
コンパイル時間 | 244 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 17,440 KB |
最終ジャッジ日時 | 2024-06-06 00:58:10 |
合計ジャッジ時間 | 6,066 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 25 ms
15,872 KB |
testcase_01 | AC | 26 ms
10,368 KB |
testcase_02 | AC | 25 ms
10,496 KB |
testcase_03 | AC | 26 ms
10,368 KB |
testcase_04 | AC | 26 ms
10,496 KB |
testcase_05 | AC | 26 ms
10,496 KB |
testcase_06 | AC | 25 ms
10,368 KB |
testcase_07 | AC | 39 ms
10,368 KB |
testcase_08 | AC | 101 ms
10,368 KB |
testcase_09 | AC | 250 ms
10,368 KB |
testcase_10 | AC | 1,568 ms
10,624 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
s = input() left = "(^^*)" right = "(*^^)" ans = 0 for i in range(len(s)): if s[i] == '(': state = 1 for j in range(i,len(s)): if state < len(left)-1 and s[j] == left[state]: state += 1 elif s[j] == left[state]: ans += 1 print(ans,end=" ") ans = 0 for i in range(len(s)): if s[i] == '(': state = 1 for j in range(i,len(s)): if state < len(right)-1 and s[j] == right[state]: state += 1 elif s[j] == right[state]: ans += 1 print(ans)