結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2019-09-14 00:39:30 |
言語 | Go (1.23.4) |
結果 |
WA
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 12,154 ms |
コンパイル使用メモリ | 228,480 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-04 10:46:40 |
合計ジャッジ時間 | 13,362 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 WA * 1 |
ソースコード
package main import ( "fmt" "strings" ) func main() { var s string fmt.Scan(&s) e := strings.Index(s, "OOO") w := strings.Index(s, "XXX") // fmt.Println("e", e, "w", w) if e >= 0 && w >= 0 { if w > e { fmt.Println("East") } else { fmt.Println("West") } } else if e < 0 && w < 0 { fmt.Println("NA") } else { if e > 0 { fmt.Println("East") } else { fmt.Println("West") } } }