結果

問題 No.1016 三目並べ
ユーザー gew1fw
提出日時 2025-06-12 20:04:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 75,716 KB
最終ジャッジ日時 2025-06-12 20:09:51
合計ジャッジ時間 1,387 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    N, S = input().split()
    N = int(N)
    if 'ooo' in S:
        print('O')
        continue
    found = False
    for i in range(len(S)):
        if S[i] == '-':
            temp = S[:i] + 'o' + S[i+1:]
            if 'ooo' in temp:
                found = True
                break
    print('O' if found else 'X')
0