結果
| 問題 |
No.1016 三目並べ
|
| コンテスト | |
| ユーザー |
IT_parsely
|
| 提出日時 | 2020-04-03 23:18:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 583 bytes |
| コンパイル時間 | 261 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-03 06:13:13 |
| 合計ジャッジ時間 | 1,233 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 10 |
ソースコード
import re
import math
t = int(input())
for _ in range(t):
n, line = input().split()
if line.find('ooo') != -1 \
or line.find('-oo') != -1 \
or line.find('oo-') != -1 \
or line.find('--o-') != -1 \
or line.find('-o--') != -1 \
or re.search('o-+o_', line) \
or re.search('-o-+o', line):
print('O')
else:
limit = int(math.log2(int(n)) + 1)
for i in range(1, limit):
desire = 'o' + '-'*(2**i-1) + 'o'
if line.find(desire):
print('O')
continue
print('X')
IT_parsely