結果

問題 No.486 3 Straight Win(3連勝)
ユーザー KisaragiEffectiveKisaragiEffective
提出日時 2020-10-09 14:40:52
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 161 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 11,528 KB
実行使用メモリ 15,332 KB
最終ジャッジ日時 2023-09-27 12:40:46
合計ジャッジ時間 3,593 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
15,256 KB
testcase_01 AC 80 ms
15,088 KB
testcase_02 AC 80 ms
15,020 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 85 ms
15,040 KB
testcase_07 WA -
testcase_08 AC 85 ms
15,120 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 81 ms
15,136 KB
testcase_14 AC 79 ms
15,292 KB
testcase_15 AC 81 ms
15,120 KB
testcase_16 WA -
testcase_17 AC 82 ms
15,228 KB
testcase_18 AC 80 ms
15,128 KB
testcase_19 AC 80 ms
15,312 KB
testcase_20 AC 82 ms
15,208 KB
testcase_21 AC 79 ms
15,332 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 81 ms
15,028 KB
testcase_25 AC 81 ms
15,072 KB
testcase_26 AC 82 ms
15,096 KB
testcase_27 AC 79 ms
15,248 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
w, e = [s.index("OOO"), s.index("XXX")]
# #index がnilを返す対策
w = w ? w : -1
e = e ? e : -1
puts w < e ? "West" : (w > e ? "East" : "NA")
0