結果

問題 No.486 3 Straight Win(3連勝)
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-03-20 23:02:26
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 507 bytes
コンパイル時間 1,874 ms
コンパイル使用メモリ 71,184 KB
実行使用メモリ 58,176 KB
最終ジャッジ日時 2023-09-18 13:24:14
合計ジャッジ時間 6,949 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 117 ms
55,972 KB
testcase_04 AC 118 ms
55,988 KB
testcase_05 AC 119 ms
56,504 KB
testcase_06 WA -
testcase_07 AC 117 ms
56,216 KB
testcase_08 WA -
testcase_09 AC 119 ms
56,048 KB
testcase_10 AC 118 ms
55,944 KB
testcase_11 AC 118 ms
56,008 KB
testcase_12 AC 119 ms
56,136 KB
testcase_13 WA -
testcase_14 AC 119 ms
56,116 KB
testcase_15 WA -
testcase_16 AC 119 ms
58,176 KB
testcase_17 AC 118 ms
56,288 KB
testcase_18 AC 118 ms
55,996 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 118 ms
55,860 KB
testcase_22 AC 119 ms
56,356 KB
testcase_23 AC 120 ms
56,256 KB
testcase_24 AC 118 ms
55,772 KB
testcase_25 AC 118 ms
55,932 KB
testcase_26 AC 117 ms
54,284 KB
testcase_27 AC 116 ms
55,752 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 (east < west) {
            System.out.println("East");
        } else {
            System.out.println("West");
        }
    }
}
0