結果

問題 No.486 3 Straight Win(3連勝)
ユーザー FVRChanFVRChan
提出日時 2017-09-29 12:30:33
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 503 bytes
コンパイル時間 3,990 ms
コンパイル使用メモリ 71,408 KB
実行使用メモリ 56,224 KB
最終ジャッジ日時 2023-09-08 11:15:17
合計ジャッジ時間 8,810 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,572 KB
testcase_01 AC 125 ms
55,508 KB
testcase_02 AC 124 ms
55,664 KB
testcase_03 AC 127 ms
55,984 KB
testcase_04 AC 125 ms
55,744 KB
testcase_05 AC 128 ms
55,976 KB
testcase_06 AC 126 ms
55,540 KB
testcase_07 AC 126 ms
55,788 KB
testcase_08 AC 126 ms
56,224 KB
testcase_09 AC 127 ms
55,788 KB
testcase_10 AC 126 ms
55,760 KB
testcase_11 AC 128 ms
55,684 KB
testcase_12 AC 129 ms
55,712 KB
testcase_13 AC 130 ms
55,764 KB
testcase_14 AC 129 ms
55,672 KB
testcase_15 AC 128 ms
56,012 KB
testcase_16 AC 130 ms
55,636 KB
testcase_17 AC 125 ms
55,580 KB
testcase_18 AC 125 ms
55,568 KB
testcase_19 AC 125 ms
55,812 KB
testcase_20 AC 131 ms
56,032 KB
testcase_21 AC 126 ms
55,788 KB
testcase_22 AC 127 ms
56,096 KB
testcase_23 AC 127 ms
55,980 KB
testcase_24 AC 131 ms
55,388 KB
testcase_25 AC 128 ms
55,792 KB
testcase_26 AC 126 ms
55,552 KB
testcase_27 AC 123 ms
56,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class Main{
	private static Scanner sc=new Scanner(System.in);
	public static void main(String args[])throws Exception{
		String s=sc.nextLine();
		if(s.indexOf("OOO")==-1 && s.indexOf("XXX")==-1)
			System.out.println("NA");
		else if(s.indexOf("OOO")==-1)
			System.out.println("West");
		else if(s.indexOf("XXX")==-1)
			System.out.println("East");
		else if(s.indexOf("OOO")<s.indexOf("XXX"))
			System.out.println("East");
		else
			System.out.println("West");
	}
}
0