結果

問題 No.486 3 Straight Win(3連勝)
ユーザー jimanojimano
提出日時 2018-01-18 23:52:57
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 467 bytes
コンパイル時間 3,197 ms
コンパイル使用メモリ 72,280 KB
実行使用メモリ 57,776 KB
最終ジャッジ日時 2023-08-25 21:34:29
合計ジャッジ時間 7,827 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 117 ms
55,948 KB
testcase_02 WA -
testcase_03 AC 118 ms
55,684 KB
testcase_04 AC 119 ms
56,168 KB
testcase_05 AC 116 ms
55,708 KB
testcase_06 WA -
testcase_07 AC 116 ms
55,832 KB
testcase_08 AC 117 ms
55,920 KB
testcase_09 AC 117 ms
56,188 KB
testcase_10 AC 118 ms
55,764 KB
testcase_11 AC 118 ms
56,068 KB
testcase_12 AC 118 ms
55,976 KB
testcase_13 WA -
testcase_14 AC 116 ms
55,864 KB
testcase_15 WA -
testcase_16 AC 117 ms
55,984 KB
testcase_17 AC 116 ms
55,928 KB
testcase_18 AC 116 ms
55,680 KB
testcase_19 AC 115 ms
55,664 KB
testcase_20 WA -
testcase_21 AC 116 ms
55,716 KB
testcase_22 AC 117 ms
56,224 KB
testcase_23 AC 118 ms
56,204 KB
testcase_24 AC 118 ms
55,884 KB
testcase_25 AC 117 ms
55,684 KB
testcase_26 AC 116 ms
55,872 KB
testcase_27 AC 115 ms
55,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;

import java.util.Scanner;

public class No0486 {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			String S = sc.next();
			int o = S.indexOf("OOO");
			int x = S.indexOf("XXX");

			if (o == -1 && x == -1) {
				System.out.println("NA");
			} else {
				if (x == -1 || o < x) {
					System.out.println("East");
				} else if (o == -1 || x < o) {
					System.out.println("West");
				}
			}
		}
	}
}
0