#C5636. Evaluate FizzLang Expression
Evaluate FizzLang Expression
Evaluate FizzLang Expression
In this problem, you are given an arithmetic expression composed solely of non-negative integers and the operators +
and *
. The expression follows the usual operator precedence: multiplication is evaluated before addition. For example, the expression \(3+5*2\) is evaluated as \(3 + (5\times2) = 13\). Your task is to compute and output the value of the given expression.
The expression will not contain any parentheses or invalid characters, and each number may consist of one or more digits.
inputFormat
The input consists of a single line read from standard input (stdin
) that contains the FizzLang expression.
Example: 3+5*2
outputFormat
Output the evaluated result of the expression as an integer to standard output (stdout
).
Example: For input 3+5*2
, output should be 13
.
3+5
8
</p>