結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2017-09-29 12:30:33 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 125 ms / 2,000 ms |
コード長 | 503 bytes |
コンパイル時間 | 1,917 ms |
コンパイル使用メモリ | 73,996 KB |
実行使用メモリ | 41,788 KB |
最終ジャッジ日時 | 2024-06-26 04:33:57 |
合計ジャッジ時間 | 6,166 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
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");elseSystem.out.println("West");}}