結果

問題 No.486 3 Straight Win(3連勝)
ユーザー HAGI_TAROHAGI_TARO
提出日時 2021-10-06 09:05:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 259 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 87,196 KB
実行使用メモリ 71,604 KB
最終ジャッジ日時 2023-09-30 08:38:34
合計ジャッジ時間 3,265 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,324 KB
testcase_01 AC 66 ms
71,372 KB
testcase_02 AC 65 ms
71,264 KB
testcase_03 AC 66 ms
71,240 KB
testcase_04 AC 65 ms
71,460 KB
testcase_05 AC 70 ms
71,464 KB
testcase_06 AC 66 ms
71,128 KB
testcase_07 AC 66 ms
71,408 KB
testcase_08 AC 67 ms
71,248 KB
testcase_09 AC 66 ms
71,324 KB
testcase_10 AC 69 ms
71,244 KB
testcase_11 AC 68 ms
71,444 KB
testcase_12 AC 68 ms
71,556 KB
testcase_13 AC 68 ms
71,224 KB
testcase_14 AC 67 ms
71,260 KB
testcase_15 AC 66 ms
71,244 KB
testcase_16 AC 66 ms
71,320 KB
testcase_17 AC 67 ms
71,404 KB
testcase_18 AC 67 ms
71,240 KB
testcase_19 AC 68 ms
71,280 KB
testcase_20 AC 66 ms
71,412 KB
testcase_21 AC 66 ms
71,456 KB
testcase_22 AC 68 ms
71,268 KB
testcase_23 AC 67 ms
71,348 KB
testcase_24 AC 68 ms
71,604 KB
testcase_25 AC 67 ms
71,464 KB
testcase_26 AC 70 ms
71,104 KB
testcase_27 AC 71 ms
71,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
ans = "NA"
E = 0
W = 0
for i in range(len(S)):
    if S[i] == "O":
        W = 0
        E += 1
    else:
        E = 0
        W += 1
    if E == 3:
        ans = "East"
        break
    elif W == 3:
        ans = "West"
        break
print(ans)
0