結果

問題 No.22 括弧の対応
ユーザー utsumidaisuke
提出日時 2018-12-10 17:50:38
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 222 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-16 15:55:38
合計ジャッジ時間 1,558 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11 WA * 7 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

a, n = map(int,input().split())

sq = input()

ls = sq[n:]

c = 1
for N, i in enumerate(ls):
    if c > 0:
        if i == '(':
            c += 1
        else:
            c -= 1
    else:
        break

print(str(n + N))
0