結果

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

ソースコード

diff #

H = input().strip()

count = 0
level = 0

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

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