結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
|
提出日時 | 2024-03-30 15:20:22 |
言語 | Go (1.23.4) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 10,897 ms |
コンパイル使用メモリ | 235,040 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-09-30 17:30:32 |
合計ジャッジ時間 | 11,828 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
// No.486 3 Straight Win(3連勝) package main import ( "fmt" "strings" ) func main() { var s string fmt.Scan(&s) ew := strings.Index(s, "OOO") //east ww := strings.Index(s, "XXX") //west if ew == -1 && ww == -1 { fmt.Println("NA") } else if ww == -1 { fmt.Println("East") } else if ew == -1 { fmt.Println("West") } else { if ww > ew { fmt.Println("East") } else { fmt.Println("West") } } }