結果

問題 No.486 3 Straight Win(3連勝)
ユーザー YOSHIYOSHI
提出日時 2021-03-17 19:42:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 568 bytes
コンパイル時間 2,961 ms
コンパイル使用メモリ 74,676 KB
実行使用メモリ 50,808 KB
最終ジャッジ日時 2024-04-27 12:07:13
合計ジャッジ時間 5,256 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
50,452 KB
testcase_01 AC 45 ms
50,448 KB
testcase_02 AC 45 ms
50,284 KB
testcase_03 AC 47 ms
50,228 KB
testcase_04 AC 45 ms
50,172 KB
testcase_05 AC 46 ms
50,256 KB
testcase_06 AC 45 ms
50,228 KB
testcase_07 AC 46 ms
50,040 KB
testcase_08 AC 44 ms
50,808 KB
testcase_09 AC 48 ms
50,232 KB
testcase_10 AC 45 ms
50,212 KB
testcase_11 AC 44 ms
49,920 KB
testcase_12 AC 44 ms
50,280 KB
testcase_13 AC 45 ms
50,244 KB
testcase_14 AC 45 ms
50,048 KB
testcase_15 AC 43 ms
50,288 KB
testcase_16 AC 44 ms
50,376 KB
testcase_17 AC 44 ms
50,236 KB
testcase_18 AC 43 ms
50,396 KB
testcase_19 AC 43 ms
50,272 KB
testcase_20 AC 46 ms
49,984 KB
testcase_21 AC 47 ms
50,328 KB
testcase_22 AC 44 ms
50,000 KB
testcase_23 AC 44 ms
50,324 KB
testcase_24 AC 44 ms
50,256 KB
testcase_25 AC 44 ms
50,104 KB
testcase_26 AC 43 ms
50,024 KB
testcase_27 AC 43 ms
50,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000486_Main {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) throws IOException {
		// TODO 解けてない
		String s = br.readLine();
		int oi = s.indexOf("OOO");
		int xi = s.indexOf("XXX");
		if(oi == -1 && xi == -1) {
			System.out.println("NA");
		} else if(oi == -1 || (xi != -1 && xi < oi)) {
			System.out.println("West");
		} else {
			System.out.println("East");
		}
	}
}
0