407144: GYM102697 115 Pseudocode Compiler

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

115. Pseudocode Compilertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

In this question your goal is to make a program that will simulate running some pretty basic pseudocode. Here is the syntax that will be used:

Defining a variable: -"var variableName = value" -value can be any integer -value can be a simple math equations ex: "3 + 5" -value can be a simple math equation that includes a variable "testVar + 2"

Manipulating a variable: -"variableName = value" -same rules applied to what the value can be as the one above -Ex: "test1 = test1 + 2 - test2"

Printing: -"print (hello word )+exampleVariable+" -text that is being printed will be surrounded in parentheses -variables being printed will be surrounded in addition signs

Input

The first line will be the number of lines of code. The next X number of lines will be the code that you need to simulate.

Output

Print whatever the program prints.

ExampleInput
6
print (hello world)
var a = 5
a = a - 1
var b = a + 3
var c = a + b
print +a+( + )+b+( = )+c+
Output
hello world
4 + 7 = 11

加入题单

算法标签: