牛牛给你一个只包含字符1到9的字符串S, 你现在可以在任意两个数字字符之间插入'+'号构成一个式子,现在希望你能求出所有式子的结果之和。
NiuNiu gives you a string contains only digit characters ‘1’ to ‘9’, and tell you that you can insert a ‘+’ for any number of times between any two characters to form a formula. Now he wants to know the sum of the results of all the different formulas that can be formed.