結果

問題 No.3140 Weird Parentheses Game
ユーザー Nikkuniku029
提出日時 2025-05-16 21:22:50
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 53,760 KB
最終ジャッジ日時 2025-05-16 21:22:54
合計ジャッジ時間 2,139 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import deque

N = int(input())
S = input()
q = deque()
cnt = 0
for s in S:
    if q:
        if q[-1] == "(" and s == ")":
            cnt += 1
    else:
        q.append(s)
ans = "First" if cnt % 2 != 0 else "Second"
print(ans)
0