結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2019-09-14 00:46:38 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 413 bytes |
コンパイル時間 | 11,075 ms |
コンパイル使用メモリ | 239,712 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-04 10:58:45 |
合計ジャッジ時間 | 11,919 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
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") } } }