← 返回 meta 的题目列表Basic String Calculator
类型:online_judge
meta
You need to write a function to compute the result of a given mathematical expression string that contains only addition and multiplication (no parentheses and division). For example, given the string "2*3+4", the function should return 10. Provide a complete implementation that supports handling necessary spaces and positive integer values.
Example
Input
2*3+4