{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e pre { text-align:left; font-family: \"Courier New\", Courier, monospace; font-size: 16px; white-space: pre; line-height:20px; text-indent: 0px; }\u003c/style\u003e\u003cdiv class\u003d\"pro_desc\"\u003e\n \u003cp\u003eIn the distant space, there is a technologically advanced planet. \u003c/p\u003e\n \u003cp\u003e One day they provided the Earth with a code that could achieve the ultimate meaning of the universe. People were very happy, but found that this code can only run on computers with a word length of 47 bits. As a good computer scientist, you need to implement a tool to simulate running this code on our computer. \u003c/p\u003e\n \u003cp\u003eThis tool needs to simulate the following instructions: \u003c/p\u003e\n \u003cp\u003e\"def x n\" : define a unsigned 47 bits integer variable named x, with initial value n, n is an integer in [0, 2^47-1] \u003c/p\u003e\n \u003cp\u003e\"add x y\" : means x \u003d x + y \u003c/p\u003e\n \u003cp\u003e\"sub x y\" : means x \u003d x - y \u003c/p\u003e\n \u003cp\u003e\"mul x y\" : means x \u003d x * y \u003c/p\u003e\n \u003cp\u003e\"div x y\" : means x \u003d x / y, we guarantee y is not zero \u003c/p\u003e\n \u003cp\u003e\"mod x y\" : means x \u003d x % y, we guarantee y is not zero \u003c/p\u003e\n \u003cp\u003eWhen the result of addition and multiplication cannot be represented by 47 bits, the part above 47 bits is truncated. \u003c/p\u003e\n \u003cp\u003eWhen the result of subtraction is less than zero, the result should add 2^47. \u003c/p\u003e\n \u003cp\u003eThe name of each variable only contains letters and the length does not greater than 20. \u003c/p\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"pro_desc\"\u003e\n \u003cp\u003eContains multiple lines of input, one instruction per line. \u003c/p\u003e\n\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"pro_desc\"\u003e\n \u003cp\u003eFor each instruction, output the value of the first argument after calculation. For example, \"def abc 100\", then your output will be \"abc \u003d 100\" in a line with no quotation marks. \u003c/p\u003e\n \u003cp\u003eSee Sample Output for more information. \u003c/p\u003e\n\u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003edef six 6\r\ndef abc 1\r\ndef bcd 0\r\nsub bcd abc\r\nadd abc six\r\ndef universe 0\r\nmul abc six\r\nadd universe abc\r\ndiv bcd six\r\nmod bcd abc\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003esix \u003d 6\r\nabc \u003d 1\r\nbcd \u003d 0\r\nbcd \u003d 140737488355327\r\nabc \u003d 7\r\nuniverse \u003d 0\r\nabc \u003d 42\r\nuniverse \u003d 42\r\nbcd \u003d 23456248059221\r\nbcd \u003d 5\r\n\u003c/pre\u003e"}}]}