#t432. 计算
计算
Expression Cracker
Problem Description
With your help, Xiao Ming cracked the password door set by Ferrari. Just as he walks forward, another password door appears. On it is an expression containing only (, ), 0-9, +, -, *, /, ^; its value is the password. Xiao Ming is bad at math, so he needs your help. (/ is integer division, ^ is exponentiation, so 2^3 is .)
Input Format
One line: an expression with no spaces, of length at most 100.
Output Format
One line: the password.
Sample Input 1
1+(3+2)*(7^2+6*9)/(2)
Sample Output 1
258
Sample Input 2
10+(-3+2)*(7^2+6)
Sample Output 2
-45
Note: a negative number is always preceded by a left parenthesis, e.g. or .
Limitation
1 s, 1024 KiB for each test case.
All intermediate results fit in the int range.