結果
問題 |
No.486 3 Straight Win(3連勝)
|
ユーザー |
![]() |
提出日時 | 2017-04-04 07:59:49 |
言語 | Kotlin (2.1.0) |
結果 |
AC
|
実行時間 | 315 ms / 2,000 ms |
コード長 | 390 bytes |
コンパイル時間 | 11,260 ms |
コンパイル使用メモリ | 430,816 KB |
実行使用メモリ | 51,012 KB |
最終ジャッジ日時 | 2024-11-20 07:51:12 |
合計ジャッジ時間 | 21,702 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
コンパイルメッセージ
Main.kt:1:10: warning: parameter 'args' is never used fun main(args:Array<String>) { ^
ソースコード
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") } }