結果

問題 No.1016 三目並べ
ユーザー 👑 rin204rin204
提出日時 2022-03-21 21:05:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 143 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 62,440 KB
最終ジャッジ日時 2024-04-17 17:36:20
合計ジャッジ時間 1,037 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,820 KB
testcase_01 AC 37 ms
53,340 KB
testcase_02 AC 35 ms
52,748 KB
testcase_03 WA -
testcase_04 AC 36 ms
53,080 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

win = ["ooo", "-oo", "o-o", "oo-", "-o--", "--o-"]
def solve():
    n, S = input().split()
    for w in win:
        if w in S:
            print("O")
            return
    S = S.split("o")
    for s in S:
        if "x" not in s and len(s) % 2 == 1 and len(s) >= 3:
            print("O")
            return
    print("X")
    
for _ in range(int(input())):
    solve()
0