結果

問題 No.486 3 Straight Win(3連勝)
ユーザー 💕💖💞💕💖💞
提出日時 2017-04-04 07:59:49
言語 Kotlin
(1.9.23)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 390 bytes
コンパイル時間 9,092 ms
コンパイル使用メモリ 431,700 KB
実行使用メモリ 56,876 KB
最終ジャッジ日時 2024-04-30 12:47:11
合計ジャッジ時間 17,555 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 251 ms
56,632 KB
testcase_01 AC 252 ms
56,740 KB
testcase_02 AC 258 ms
56,644 KB
testcase_03 AC 257 ms
56,764 KB
testcase_04 AC 261 ms
56,868 KB
testcase_05 AC 253 ms
56,832 KB
testcase_06 AC 256 ms
56,776 KB
testcase_07 AC 253 ms
56,784 KB
testcase_08 AC 267 ms
56,788 KB
testcase_09 AC 261 ms
56,764 KB
testcase_10 AC 270 ms
56,860 KB
testcase_11 AC 257 ms
56,668 KB
testcase_12 AC 263 ms
56,764 KB
testcase_13 AC 258 ms
56,844 KB
testcase_14 AC 252 ms
56,668 KB
testcase_15 AC 259 ms
56,792 KB
testcase_16 AC 262 ms
56,772 KB
testcase_17 AC 260 ms
56,760 KB
testcase_18 AC 260 ms
56,744 KB
testcase_19 AC 257 ms
56,864 KB
testcase_20 AC 255 ms
56,864 KB
testcase_21 AC 259 ms
56,764 KB
testcase_22 AC 258 ms
56,876 KB
testcase_23 AC 260 ms
56,672 KB
testcase_24 AC 261 ms
56,788 KB
testcase_25 AC 258 ms
56,640 KB
testcase_26 AC 266 ms
56,852 KB
testcase_27 AC 270 ms
56,748 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used
fun main(args:Array<String>) {
         ^

ソースコード

diff #

fun main(args:Array<String>) {
  val text = readLine()!!
  val o    = text.indexOf("OOO")
  val x    = text.indexOf("XXX")
  if( o > -1 && x > -1 ) { 
    if( o > x ) { 
      println("West")
    } else { 
      println("East")
    }   
  } else if( o > -1 || x > -1) {
    if( o > -1 ) { 
      println("East")
    } else {
      println("West")
    }   
  } else {
    println("NA")
  }
}
0