結果

問題 No.486 3 Straight Win(3連勝)
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-03-20 23:04:17
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 2,701 ms
コンパイル使用メモリ 72,508 KB
実行使用メモリ 56,460 KB
最終ジャッジ日時 2023-09-18 13:24:32
合計ジャッジ時間 6,387 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 117 ms
55,944 KB
testcase_02 WA -
testcase_03 AC 116 ms
55,824 KB
testcase_04 AC 117 ms
55,832 KB
testcase_05 AC 118 ms
56,420 KB
testcase_06 WA -
testcase_07 AC 117 ms
55,920 KB
testcase_08 AC 116 ms
55,572 KB
testcase_09 AC 118 ms
56,132 KB
testcase_10 AC 118 ms
55,728 KB
testcase_11 AC 117 ms
55,820 KB
testcase_12 AC 118 ms
55,804 KB
testcase_13 WA -
testcase_14 AC 117 ms
55,636 KB
testcase_15 WA -
testcase_16 AC 118 ms
55,796 KB
testcase_17 AC 118 ms
55,788 KB
testcase_18 AC 117 ms
55,832 KB
testcase_19 AC 117 ms
55,908 KB
testcase_20 WA -
testcase_21 AC 120 ms
55,764 KB
testcase_22 AC 121 ms
55,976 KB
testcase_23 AC 119 ms
55,744 KB
testcase_24 AC 120 ms
56,332 KB
testcase_25 AC 120 ms
56,460 KB
testcase_26 AC 118 ms
55,572 KB
testcase_27 AC 119 ms
56,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;


public class Main {
    public static void main(String[] args) {
        Scanner stdin = new Scanner(System.in);
        String line = stdin.nextLine();
        
        int east = line.indexOf("OOO");
        int west = line.indexOf("XXX");
        
        if (east == -1 && west == -1) {
            System.out.println("NA");
        } else if (west == -1 || east < west) {
            System.out.println("East");
        } else {
            System.out.println("West");
        }
    }
}
0