結果

問題 No.2398 ヒドラ崩し
ユーザー gew1fw
提出日時 2025-06-12 19:44:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 216 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 82,600 KB
実行使用メモリ 65,628 KB
最終ジャッジ日時 2025-06-12 19:44:43
合計ジャッジ時間 2,172 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

H = input().strip()

count = 0
depth = 0

for c in H:
    if c == '(':
        if depth == 0:
            count += 1
        depth += 1
    else:
        depth -= 1

if count % 2 == 0:
    print(1)
else:
    print(0)
0