結果

問題 No.486 3 Straight Win(3連勝)
ユーザー nobigomu
提出日時 2018-04-30 11:49:32
言語 Lua
(LuaJit 2.1.1734355927)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 215 bytes
コンパイル時間 88 ms
コンパイル使用メモリ 6,812 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-27 23:50:10
合計ジャッジ時間 1,101 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

print((function (s)
	local e,w=0,0
	for i=1,#s do
		if s:sub(i,i)=="O" then e,w=e+1,0 else e,w=0,w+1 end
		if e==3 then return "East" end
		if w==3 then return "West" end
	end
	return "NA"
end)(io.stdin:read("*l")))
0