結果

問題 No.486 3 Straight Win(3連勝)
ユーザー 👑 yumechiyumechi
提出日時 2017-02-24 23:37:21
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,656 KB
実行使用メモリ 71,348 KB
最終ジャッジ日時 2023-09-08 10:45:41
合計ジャッジ時間 3,459 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,240 KB
testcase_01 AC 71 ms
71,268 KB
testcase_02 AC 72 ms
71,160 KB
testcase_03 AC 73 ms
71,128 KB
testcase_04 AC 74 ms
71,176 KB
testcase_05 AC 71 ms
71,336 KB
testcase_06 AC 74 ms
71,120 KB
testcase_07 AC 71 ms
71,228 KB
testcase_08 AC 72 ms
71,020 KB
testcase_09 AC 73 ms
71,204 KB
testcase_10 AC 72 ms
71,240 KB
testcase_11 AC 70 ms
71,200 KB
testcase_12 AC 72 ms
71,028 KB
testcase_13 AC 73 ms
71,300 KB
testcase_14 AC 72 ms
71,284 KB
testcase_15 AC 72 ms
71,288 KB
testcase_16 AC 72 ms
71,120 KB
testcase_17 AC 71 ms
71,016 KB
testcase_18 AC 72 ms
71,288 KB
testcase_19 AC 70 ms
71,264 KB
testcase_20 AC 72 ms
71,076 KB
testcase_21 AC 72 ms
71,284 KB
testcase_22 AC 74 ms
71,028 KB
testcase_23 AC 76 ms
71,176 KB
testcase_24 AC 75 ms
71,264 KB
testcase_25 AC 71 ms
71,348 KB
testcase_26 AC 72 ms
71,292 KB
testcase_27 AC 71 ms
71,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
	s = input()
	east_3win = s.find("OOO")
	west_3win = s.find("XXX")
	if east_3win >= 0 and west_3win >= 0:
		print("East" if east_3win < west_3win else "West")
	elif east_3win == -1 and west_3win >= 0:
		print("West")
	elif west_3win == -1 and east_3win >= 0:
		print("East")
	else:
		print("NA")

if __name__=="__main__":
    solve()
0