結果

問題 No.3144 Parentheses Modification and Rotation (01 Ver.)
ユーザー Tamiji
提出日時 2025-05-16 21:53:53
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 119 bytes
コンパイル時間 624 ms
コンパイル使用メモリ 83,000 KB
実行使用メモリ 66,412 KB
最終ジャッジ日時 2025-05-16 21:53:58
合計ジャッジ時間 3,840 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 34 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
S=input()
if n&1:
	print('No')
	exit()
a=0
for x in S:
	if x=='(':
		a+=1
	else:
		a-=1
print(abs(a)>>1)
0