結果

問題 No.1016 三目並べ
ユーザー rulerruler
提出日時 2020-04-03 23:23:25
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 435 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 10,668 KB
実行使用メモリ 8,512 KB
最終ジャッジ日時 2023-09-16 04:55:12
合計ジャッジ時間 1,140 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,184 KB
testcase_01 AC 17 ms
8,188 KB
testcase_02 AC 16 ms
8,248 KB
testcase_03 AC 19 ms
8,512 KB
testcase_04 AC 19 ms
8,400 KB
testcase_05 AC 19 ms
8,244 KB
testcase_06 AC 19 ms
8,104 KB
testcase_07 AC 39 ms
8,056 KB
testcase_08 AC 40 ms
8,052 KB
testcase_09 AC 51 ms
8,148 KB
testcase_10 AC 51 ms
8,072 KB
権限があれば一括ダウンロードができます

ソースコード

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