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.
Input
Exactly 99 test cases.
Each test case contains one line with a correct expression, without leading or trailing spaces.
Output
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.
Example
Input: 6*7 67-25 31+11 [And 96 test cases more.] Output: 42 42 42 [And 96 test cases more.]
hide comments
Ruslan:
2013-04-29 10:42:42
ia bi vdul |
|
Ahmed Abdel Samad:
2012-02-04 10:19:53
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 |
|
Christian Handoko:
2012-01-23 14:06:30
how can process input no space? |
Added by: | Fudan University Problem Setters |
Date: | 2009-03-19 |
Time limit: | 1s |
Source limit: | 10000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | A copy of problem GALAXY, with language restrictions and source limit modified. |