結果
| 問題 | 
                            No.509 塗りつぶしツール
                             | 
                    
| コンテスト | |
| ユーザー | 
                             nobigomu
                         | 
                    
| 提出日時 | 2018-03-29 17:47:15 | 
| 言語 | Lua  (LuaJit 2.1.1734355927)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 235 bytes | 
| コンパイル時間 | 114 ms | 
| コンパイル使用メモリ | 6,812 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-25 23:50:03 | 
| 合計ジャッジ時間 | 1,171 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 WA * 16 | 
ソースコード
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")))
            
            
            
        
            
nobigomu