by@Sakura_Neko_UT
WA
475ms
function split(str, delim) -- Eliminate bad cases... if string.find(str, delim) == nil then return { str } end local result = {} local pat = "(.-)" .. delim .. "()" local lastPos for part, pos in string.gfind(str, pat) do table.insert(result, part) lastPos = pos end table.insert(result, string.sub(str, lastPos)) return result end s="" while true do s += io.read() if line == nil then return end t = split(s, " ") for k,v in pairs(t) do print(v) end
09 40 85 61 54 03 08 80 20 93 87 89
/usr/bin/lua5.3: /volume/CODE:20: syntax error near '+'