結果

問題 No.1016 三目並べ
ユーザー ruler
提出日時 2020-04-03 23:23:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 435 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-07-03 06:26:01
合計ジャッジ時間 1,146 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

cand = ['--o-', '-o--', '-oo', 'oo-', 'ooo']
i = 1
for i in range(1, 1000, 2):
    cand.append('o' + '-' * i + 'o')

t = int(sys.stdin.readline().rstrip())

def main():
    for _ in range(t):
        n, s = sys.stdin.readline().split()
        for c in cand:
            if s.find(c) != -1:
                print('O')
                break
        else:
            print('X')
        
if __name__ == '__main__':
    main()
0