結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
![]() |
提出日時 | 2017-04-12 22:38:16 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 98 ms / 2,000 ms |
コード長 | 256 bytes |
コンパイル時間 | 83 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,416 KB |
最終ジャッジ日時 | 2024-06-26 04:25:31 |
合計ジャッジ時間 | 3,571 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
コンパイルメッセージ
Syntax OK
ソースコード
S = gets.chomp M = S.size i = (0...M).find {|i| (0..2).all? {|j| S[i + j] == 'O'}} || M j = (0...M).find {|i| (0..2).all? {|j| S[i + j] == 'X'}} || M ans = if i < j "East" elsif j < i "West" else "NA" end puts ans