|
||||||||||
ExpressionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 354 Accepted Submission(s): 80 Problem Description 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. Input There are several cases,every line contains a expression. Output For every case ,print the answer of the expression. Sample Input
Sample Output
Author dandelion Source | ||||||||||
|