結果

問題 No.486 3 Straight Win(3連勝)
ユーザー YOSHIYOSHI
提出日時 2021-03-16 23:35:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 541 bytes
コンパイル時間 3,304 ms
コンパイル使用メモリ 74,944 KB
実行使用メモリ 50,392 KB
最終ジャッジ日時 2024-04-26 06:31:01
合計ジャッジ時間 5,432 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
50,300 KB
testcase_01 WA -
testcase_02 AC 51 ms
50,032 KB
testcase_03 AC 53 ms
50,016 KB
testcase_04 AC 50 ms
50,364 KB
testcase_05 AC 50 ms
50,036 KB
testcase_06 AC 50 ms
50,076 KB
testcase_07 AC 50 ms
50,252 KB
testcase_08 WA -
testcase_09 AC 50 ms
50,060 KB
testcase_10 AC 53 ms
50,292 KB
testcase_11 AC 52 ms
50,192 KB
testcase_12 AC 51 ms
50,088 KB
testcase_13 AC 51 ms
50,332 KB
testcase_14 AC 52 ms
50,140 KB
testcase_15 AC 50 ms
50,328 KB
testcase_16 AC 49 ms
50,024 KB
testcase_17 AC 49 ms
50,124 KB
testcase_18 AC 52 ms
50,348 KB
testcase_19 WA -
testcase_20 AC 51 ms
50,340 KB
testcase_21 AC 52 ms
50,156 KB
testcase_22 AC 51 ms
50,276 KB
testcase_23 AC 53 ms
50,060 KB
testcase_24 AC 51 ms
49,980 KB
testcase_25 AC 54 ms
50,212 KB
testcase_26 AC 51 ms
50,392 KB
testcase_27 AC 52 ms
50,360 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 {
		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 < oi) {
				System.out.println("West");
			} else {
				System.out.println("East");
			}
		}
	}
}
0