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