結果

問題 No.1016 三目並べ
ユーザー tamatotamato
提出日時 2020-04-03 21:54:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 618 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 87,140 KB
実行使用メモリ 76,088 KB
最終ジャッジ日時 2023-09-16 01:13:14
合計ジャッジ時間 1,831 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,308 KB
testcase_01 AC 69 ms
71,140 KB
testcase_02 AC 68 ms
71,156 KB
testcase_03 AC 72 ms
70,972 KB
testcase_04 AC 70 ms
71,152 KB
testcase_05 AC 71 ms
71,296 KB
testcase_06 AC 71 ms
71,264 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    input = sys.stdin.readline

    for _ in range(int(input())):
        N, line = input().split()
        N = int(N)
        ans = 'X'
        for i in range(N-2):
            s = line[i: i+3]
            if s == 'ooo' or s == 'oo-' or s == 'o-o' or s == '-oo':
                ans = 'O'
        for i in range(N-3):
            s = line[i: i + 4]
            if s == '-o--' or s == '--o-':
                ans = 'O'
        for i in range(N-4):
            s = line[i: i+5]
            if s == 'o---o':
                ans = 'O'
        print(ans)


if __name__ == '__main__':
    main()
0