結果

問題 No.1016 三目並べ
ユーザー ks2mks2m
提出日時 2020-04-03 21:31:32
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 728 bytes
コンパイル時間 3,149 ms
コンパイル使用メモリ 71,992 KB
実行使用メモリ 52,560 KB
最終ジャッジ日時 2023-09-16 00:18:27
合計ジャッジ時間 4,542 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
49,852 KB
testcase_01 AC 45 ms
50,020 KB
testcase_02 AC 45 ms
49,520 KB
testcase_03 AC 47 ms
49,548 KB
testcase_04 WA -
testcase_05 AC 46 ms
49,504 KB
testcase_06 AC 45 ms
49,336 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int t = Integer.parseInt(br.readLine());
		PrintWriter pw = new PrintWriter(System.out);
		for (int i = 0; i < t; i++) {
			String[] sa = br.readLine().split(" ");
			String s = sa[1];
			if (s.indexOf("ooo") != -1
					|| s.indexOf("oo-") != -1
					|| s.indexOf("-oo") != -1
					|| s.indexOf("--o-") != -1
					|| s.indexOf("-o--") != -1
					|| s.indexOf("o-o") != -1
					) {
				pw.println("O");
			} else {
				pw.println("X");
			}
		}
		br.close();
		pw.flush();
	}
}
0