結果

問題 No.509 塗りつぶしツール
コンテスト
ユーザー nobigomu
提出日時 2018-03-29 17:47:15
言語 Lua
(LuaJit 2.1.1767980792)
コンパイル:
luajit -b _filename_ a.out
実行:
luajit _filename_
結果
WA  
実行時間 -
コード長 235 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 141 ms
コンパイル使用メモリ 7,840 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-12 11:23:28
合計ジャッジ時間 1,029 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

print((function (f, s)
	return f(s)
end)(function (s)
	local r = #s*2+1
	for i=1,#s do
		local c = s:sub(i,i)
		if c=="0" or c=="4" or c=="6" or c=="9" then r=r+1
		elseif c=="8" then r=r+2 end
	end
	return r
end, io.stdin:read("*l")))
0