結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2017-03-20 23:04:17 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 2,306 ms |
コンパイル使用メモリ | 74,748 KB |
実行使用メモリ | 54,452 KB |
最終ジャッジ日時 | 2024-07-05 04:35:14 |
合計ジャッジ時間 | 6,703 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 WA * 6 |
ソースコード
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"); } } }