結果

問題 No.1016 三目並べ
ユーザー もりを
提出日時 2020-04-03 21:53:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 313 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 53,632 KB
最終ジャッジ日時 2024-07-03 02:18:56
合計ジャッジ時間 1,218 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 5 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

def check(s, pattern):
    return s.count(pattern) > 0

for _ in range(T):
    _, s = input().split()
    ok = False
    ok |= check(s, 'ooo')
    ok |= check(s, 'o-o')
    ok |= check(s, 'oo-')
    ok |= check(s, '-oo')
    ok |= check(s, '-o--')
    ok |= check(s, '--o-')
    print("XO"[ok])
0