括号表达式求值

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

计算

题目描述

给出一个表达式,其中运算符仅包含+,-,*,/,^(加 减 乘 整除 乘方)要求求出表达式的最终值。

数据可能会出现括号情况,还有可能出现多余括号情况。

数据保证不会出现大于或等于2^31的答案。

输入格式

输入仅一行,即为表达式。

输出格式

输出仅一行,既为表达式算出的结果。

样例 #1

样例输入 #1

(2+2)^(1+1)

样例输出 #1

16

大明

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
38
Start at
2025-2-11 16:00
End at
2025-2-28 8:00
Duration
400 hour(s)
Host
Partic.
7