当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2646:Expression

题目描述
As a shopkeeper of a restaurant,everyday ,dandelion's mother needs to calculate the incomes.Sometimes,she may make some mistakes.So dandelion wants you to write a program to help her calculate the value of some expressions.
You may consider every expression is made of :left parenthesis '(' ,right parenthesis ')' , plus sign '+' , subtraction sign '-' , multiplication sign '*' ,positive sign '+' ,and negative sign '-'.There is no precursor 0.The length of expression will not exceed 100.The value produced during the calculating will not exceed 10^9.Every expression is legal.Ie. ((10+(-100))) ,-(-1),-3*(+5+7*2)-(0) ,-0 ,(-3)*(-5+7) are legal,while 1+-7 ,--3+8 ,-3+() are illegal.
输入解释
There are several cases,every line contains a expression.
输出解释
For every case ,print the answer of the expression.
输入样例
-3*(+5-7*2)-(0)
输出样例
27
来自杭电HDUOJ的附加信息
Author dandelion
Recommend yifenfei

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 曾是惊鸿照影来

源链接: HDU-2646

最后修改于 2020-10-25T22:55:31+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)