CE - Compile Error
You are to write a program to analyse some simple arithmetical expressions. The BNF form of the defination of the expression is below.
<expression>::=<num><oper><num> <num>::=0|1|2|...|99 <oper>::=+|-|*
Tip: You may find this problem is like the problem GALAXY very much. You may use any language you like to solve this problem.
Exactly 99 test cases.
Each test case contains one line with a correct expression, without leading or trailing spaces.
For each test case you should output one line contains the result of the expression without any leading zeros. You may assume this number is always a non-negative one.
Score is the length of your source.
Input: 6*7 67-25 31+11 [And 96 test cases more.] Output: 42 42 42 [And 96 test cases more.]
ia bi vdul
Ahmed Abdel Samad:
Getting a WA. i compile it on my PC and there isn't any problem when trying some test cases.Last edit: 2012-02-06 19:54:15
how can process input no space?