結果

問題 No.1016 三目並べ
ユーザー rei60rei60
提出日時 2020-04-04 17:42:45
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 340 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 8,356 KB
最終ジャッジ日時 2023-09-16 06:00:13
合計ジャッジ時間 1,221 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

T = int(input())
win = ["ooo", "oo-", "o-o", "-oo", "--o-", "-o--"]

for i in range(1,500):
    temp = "o"+"-"*(2*i+1)+"o"
    win.append(temp)

for _ in range(T):
    flag = 0
    N, S = input().split()
    for x in win:
        if x in S:
            flag = 1
            break
    if flag:
        print("O")
    else:
        print("X")
0