結果

問題 No.486 3 Straight Win(3連勝)
ユーザー jimanojimano
提出日時 2018-01-18 23:47:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 436 bytes
コンパイル時間 2,992 ms
コンパイル使用メモリ 72,000 KB
実行使用メモリ 58,124 KB
最終ジャッジ日時 2023-08-25 21:32:51
合計ジャッジ時間 7,882 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
56,084 KB
testcase_01 AC 111 ms
55,560 KB
testcase_02 AC 111 ms
55,628 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 117 ms
55,560 KB
testcase_06 AC 114 ms
55,620 KB
testcase_07 WA -
testcase_08 AC 115 ms
55,708 KB
testcase_09 WA -
testcase_10 AC 115 ms
55,828 KB
testcase_11 AC 113 ms
55,740 KB
testcase_12 WA -
testcase_13 AC 117 ms
56,016 KB
testcase_14 AC 115 ms
56,148 KB
testcase_15 AC 119 ms
55,652 KB
testcase_16 AC 112 ms
56,108 KB
testcase_17 AC 112 ms
55,952 KB
testcase_18 AC 115 ms
55,708 KB
testcase_19 AC 111 ms
55,976 KB
testcase_20 AC 111 ms
56,040 KB
testcase_21 AC 112 ms
55,348 KB
testcase_22 AC 115 ms
55,804 KB
testcase_23 WA -
testcase_24 AC 116 ms
56,044 KB
testcase_25 AC 110 ms
56,076 KB
testcase_26 AC 111 ms
55,596 KB
testcase_27 AC 111 ms
55,744 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 (o != -1) {
					System.out.println("East");
				} else {
					System.out.println("West");
				}
			}
		}
	}
}
0