| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 12451 | I2P(II)_Chen Mini Project 1 Practice |
|
Description
You need to implement a calculator. The input is a list of expressions consisting of integers, operators(+,-,*,/,=,%,++,--), and three variables x, y, z; and the output is a list of assembly codes.
For more infomation, please refer to the github page.
Input
Contains mutiple expressions. Each expression is separated by a newline character ('\n').
The initial value of variables, x, y, and z, are stored in memory [0], [4], and [8] respectively.
If you use the variable which isn't assigned the value before, you need to read those initial values.
Output
If the expression is illegal, your final output should be "Compile Error!".
Note: You need to output a list of assembly codes. This time the judge is using special judge, and your answer doesn't need to be as same as the sample output. You just need to ensure the final values which are stored in memory [0], [4], and [8] (the value of variables x, y ,and z) is correct.
※There must be a “\n” at the end of line.