#P122. [KSC002D] 新的编程语言
[KSC002D] 新的编程语言
Source
This problem is adapted from Long Long OJ and proposed by . All rights reserved.
Problem Background
yangrenruiYRR was bored and created a new programming language.
Problem Description
The input provides a series of statements of the following types ( is a variable name consisting of a lowercase letter, and is an integer):
define x y, sets to ;plus x y, changes to ;minus x y, changes to ;times x y, changes to ;divide x y, changes to ;out x, outputs .
The initial value of all variables is .
Input Format
- Line : A positive integer ;
- Lines to : One statement per line.
Output Format
The output of the program defined by the input.
Samples
4
define a 31415
define b 92653
out a
out b
31415
92653
Data Range
| Case | Special Property | |
|---|---|---|
| None | ||
| A | ||
| B | ||
| C |
Special Properties:
- A: Only one variable appears;
- B: Only
defineandoutoperations are used; - C: All variable values during computation are and .
For of the data, , .
You only need to use int for calculations.