結果

問題 No.486 3 Straight Win(3連勝)
ユーザー 37zigen37zigen
提出日時 2017-02-24 22:36:11
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 443 bytes
コンパイル時間 3,242 ms
コンパイル使用メモリ 71,688 KB
実行使用メモリ 56,332 KB
最終ジャッジ日時 2023-09-08 10:42:39
合計ジャッジ時間 7,717 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
55,560 KB
testcase_01 AC 114 ms
56,332 KB
testcase_02 AC 115 ms
55,816 KB
testcase_03 AC 116 ms
55,900 KB
testcase_04 AC 117 ms
55,248 KB
testcase_05 AC 115 ms
55,172 KB
testcase_06 AC 114 ms
55,904 KB
testcase_07 AC 117 ms
55,184 KB
testcase_08 AC 116 ms
55,596 KB
testcase_09 AC 118 ms
56,024 KB
testcase_10 AC 121 ms
55,260 KB
testcase_11 AC 117 ms
55,668 KB
testcase_12 AC 115 ms
55,604 KB
testcase_13 AC 114 ms
55,716 KB
testcase_14 AC 118 ms
55,588 KB
testcase_15 AC 114 ms
55,700 KB
testcase_16 AC 113 ms
55,516 KB
testcase_17 AC 115 ms
55,368 KB
testcase_18 AC 115 ms
55,656 KB
testcase_19 AC 114 ms
56,100 KB
testcase_20 AC 115 ms
55,508 KB
testcase_21 AC 114 ms
55,668 KB
testcase_22 AC 117 ms
55,444 KB
testcase_23 AC 117 ms
55,684 KB
testcase_24 AC 117 ms
55,748 KB
testcase_25 AC 118 ms
55,660 KB
testcase_26 AC 115 ms
55,928 KB
testcase_27 AC 114 ms
55,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.util.Scanner;

public class Q485 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		char[] S = sc.next().toCharArray();
		for (int i = 0; i + 2 < S.length; ++i) {
			if (S[i] == S[i + 1] && S[i + 1] == S[i + 2]) {
				if (S[i] == 'O') {
					System.out.println("East");
				} else {
					System.out.println("West");
				}
				return;
			}
		}
		System.out.println("NA");
	}

}
0