結果

問題 No.486 3 Straight Win(3連勝)
ユーザー kohei2019kohei2019
提出日時 2022-01-30 12:48:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 269 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 71,612 KB
最終ジャッジ日時 2023-09-02 01:31:44
合計ジャッジ時間 3,867 ms
ジャッジサーバーID
(参考情報)
judge16 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,432 KB
testcase_01 AC 65 ms
71,416 KB
testcase_02 AC 65 ms
71,240 KB
testcase_03 AC 69 ms
71,400 KB
testcase_04 AC 64 ms
71,108 KB
testcase_05 AC 64 ms
71,300 KB
testcase_06 AC 64 ms
71,228 KB
testcase_07 AC 65 ms
71,468 KB
testcase_08 AC 64 ms
71,324 KB
testcase_09 AC 66 ms
71,504 KB
testcase_10 AC 65 ms
71,360 KB
testcase_11 AC 64 ms
71,292 KB
testcase_12 AC 64 ms
71,292 KB
testcase_13 AC 62 ms
71,360 KB
testcase_14 AC 64 ms
71,236 KB
testcase_15 AC 64 ms
71,204 KB
testcase_16 AC 64 ms
71,392 KB
testcase_17 AC 65 ms
71,576 KB
testcase_18 AC 66 ms
71,612 KB
testcase_19 AC 66 ms
71,400 KB
testcase_20 AC 66 ms
71,196 KB
testcase_21 AC 65 ms
71,356 KB
testcase_22 AC 65 ms
71,356 KB
testcase_23 AC 64 ms
71,240 KB
testcase_24 AC 64 ms
71,352 KB
testcase_25 AC 65 ms
71,296 KB
testcase_26 AC 65 ms
71,060 KB
testcase_27 AC 65 ms
71,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
N = len(S)
w = 0
s = 0
for i in range(N):
    if S[i] == 'O':
        s += 1
        w = 0
    elif S[i] == 'X':
        w += 1
        s = 0
    if s == 3:
        print('East')
        exit()
    if w == 3:
        print('West')
        exit()
print('NA')
0