|
|||
Spreadsheet management
In these dire financial times it is quite difficult for companies to spare money to buy a license for a quality spreadsheet management software, thus we - as senior developers - decided to create a free, however professional application which is able to handle every accounting problem.
Unfortunately it seems that we are "not quite as seniors" as we thought, so ultimately we needed to simplify our task to only create a spreadsheet manager which is able to handle the so-called "one column" spreadsheets. Every column of the table will contain the following information:
VALUE x _ -> changes the value of the cell to x. In this case the second parameter is always the _ character. ADD x y -> changes the value of the cell to x+y. SUB x y -> changes the value of the cell to x-y. MULT x y -> changes the value of the cell to x*y.The indexing of the cells starts at 0 and increases by one. After the given operation the following type of values can appear:
Input
The input consists of the following lines:
Output
The output is N number of lines, each containing the final, calculated integer value to the corresponding table-cell (so the 0th line corresponds to the value of the 0th cell, etc.).
Restrictions
Example |
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |