条件を満たす行を取り除く
Posted feedbacks - Lua
1 2 3 4 5 6 7 8 9 10 11 | function remove_comments(in_filename, out_filename)
out_f = io.output(out_filename)
for line in io.lines(in_filename) do
if string.sub(line, 1, 1) ~= "#" then
out_f:write(line, "\n")
end
end
out_f:close()
end
remove_comments("10.input", "10.output")
|


にしお
#3366()
Rating0/0=0.00
サンプル入力
サンプル出力[ reply ]