結果

問題 No.486 3 Straight Win(3連勝)
ユーザー mayoko_
提出日時 2017-04-11 15:58:38
言語 Python2
(2.7.18)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 213 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2024-06-26 04:25:21
合計ジャッジ時間 1,505 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

S = raw_input()
east, west = 0, 0
for c in S:
	if c == 'O':
		east, west = east+1, 0
		if east >= 3:
			print "East"
			exit(0)
	else:
		east, west = 0, west+1
		if west >= 3:
			print "West"
			exit(0)
print "NA"
0