node_ids
sequencelengths
4
1.4k
edge_index
sequencelengths
1
2.22k
text
sequencelengths
4
1.4k
source
stringlengths
14
427k
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 17, 41, 13, 41, 13, 17, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 0, 18, 13, 13, 13, 40, 13, 23, 13, 12, 13, 30, 40, 13, 0, 13, 18, 13, 13, 0, 18, 13, 13, 13, 29, 13, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 41, 13, 0, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 4, 18, 13, 13, 30, 0, 13, 4, 18, 13, 18, 13, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 230, 11 ], [ 230, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 21, 26 ], [ 26, 27 ], [ 27, 28 ], [ 12, 29 ], [ 29, 30 ], [ 0, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 31, 35 ], [ 35, 36 ], [ 35, 37 ], [ 31, 38 ], [ 38, 39 ], [ 31, 40 ], [ 40, 41 ], [ 40, 42 ], [ 31, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 43, 51 ], [ 51, 52 ], [ 31, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 55, 61 ], [ 61, 62 ], [ 53, 63 ], [ 63, 64 ], [ 31, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 67, 80 ], [ 80, 81 ], [ 0, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 82, 86 ], [ 86, 87 ], [ 82, 88 ], [ 88, 89 ], [ 82, 90 ], [ 90, 91 ], [ 82, 92 ], [ 92, 93 ], [ 82, 94 ], [ 94, 95 ], [ 82, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 96, 104 ], [ 104, 105 ], [ 82, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 108, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 114, 124 ], [ 124, 125 ], [ 125, 126 ], [ 114, 127 ], [ 128, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 128, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 134, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 139, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 139, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 152, 154 ], [ 139, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 134, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 160, 163 ], [ 159, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 164, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 164, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 177, 179 ], [ 164, 180 ], [ 180, 181 ], [ 181, 182 ], [ 180, 183 ], [ 159, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 184, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 189, 195 ], [ 195, 196 ], [ 195, 197 ], [ 197, 198 ], [ 198, 199 ], [ 189, 200 ], [ 200, 201 ], [ 200, 202 ], [ 202, 203 ], [ 202, 204 ], [ 189, 205 ], [ 205, 206 ], [ 206, 207 ], [ 205, 208 ], [ 184, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 212, 215 ], [ 215, 216 ], [ 215, 217 ], [ 209, 218 ], [ 218, 219 ], [ 219, 220 ], [ 218, 221 ], [ 108, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 225, 226 ], [ 108, 227 ], [ 227, 228 ], [ 0, 229 ], [ 229, 230 ], [ 229, 231 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tStackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));\n\t\tSystem.out.println(readDataArr.calcData());\n\t}\n}\n\nclass Stack {\n\tprivate int[] stack;\n\tprivate static int pointer = 0, popData, remover = 0;\n\n\tStack(int[] stack) {\n\t\tthis.stack = stack;\n\t}\n\n\tpublic void push(int data) {\n\t\tstack[pointer] = data;\n\t\tpointer++;\n\t}\n\n\tpublic int pop() {\n\t\tpointer--;\n\t\tpopData = stack[pointer];\n\t\tstack[pointer] = remover;// pop????????????data?????????\n\t\treturn popData;\n\t}\n\n}\n\nclass StackControler {\n\tprivate Stack stack;\n\tprivate String[] readData;\n\tprivate int operand2, operand1, result, strToIntData;\n\n\tStackControler(String[] readData) {\n\t\tthis.readData = readData;\n\t}\n\n\tpublic int calcData() {\n\t\tString tempStrData;\n\t\tstack = new Stack(new int[readData.length / 2 + 1]);\n\t\tfor (int i = 0; i < readData.length; i++) {\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}\n\t\tresult = stack.pop();\n\t\treturn result;\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tStackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));\n\t\tSystem.out.println(readDataArr.calcData());\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tStackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));\n\t\tSystem.out.println(readDataArr.calcData());\n\t}", "main", "{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tStackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));\n\t\tSystem.out.println(readDataArr.calcData());\n\t}", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "StackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));", "readDataArr", "new StackControler(in.readLine()\n\t\t\t\t.split(\" \"))", "System.out.println(readDataArr.calcData())", "System.out.println", "System.out", "System", "System.out", "readDataArr.calcData()", "readDataArr.calcData", "readDataArr", "String[] args", "args", "class Stack {\n\tprivate int[] stack;\n\tprivate static int pointer = 0, popData, remover = 0;\n\n\tStack(int[] stack) {\n\t\tthis.stack = stack;\n\t}\n\n\tpublic void push(int data) {\n\t\tstack[pointer] = data;\n\t\tpointer++;\n\t}\n\n\tpublic int pop() {\n\t\tpointer--;\n\t\tpopData = stack[pointer];\n\t\tstack[pointer] = remover;// pop????????????data?????????\n\t\treturn popData;\n\t}\n\n}", "Stack", "private int[] stack;", "stack", "private static int pointer = 0", "pointer", "0", "popData", "popData", "remover = 0;", "remover", "0", "Stack(int[] stack) {\n\t\tthis.stack = stack;\n\t}", "Stack", "{\n\t\tthis.stack = stack;\n\t}", "this.stack = stack", "this.stack", "this", "this.stack", "stack", "int[] stack", "stack", "public void push(int data) {\n\t\tstack[pointer] = data;\n\t\tpointer++;\n\t}", "push", "{\n\t\tstack[pointer] = data;\n\t\tpointer++;\n\t}", "stack[pointer] = data", "stack[pointer]", "stack", "pointer", "data", "pointer++", "pointer", "int data", "data", "public int pop() {\n\t\tpointer--;\n\t\tpopData = stack[pointer];\n\t\tstack[pointer] = remover;// pop????????????data?????????\n\t\treturn popData;\n\t}", "pop", "{\n\t\tpointer--;\n\t\tpopData = stack[pointer];\n\t\tstack[pointer] = remover;// pop????????????data?????????\n\t\treturn popData;\n\t}", "pointer--", "pointer", "popData = stack[pointer]", "popData", "stack[pointer]", "stack", "pointer", "stack[pointer] = remover", "stack[pointer]", "stack", "pointer", "remover", "return popData;", "popData", "class StackControler {\n\tprivate Stack stack;\n\tprivate String[] readData;\n\tprivate int operand2, operand1, result, strToIntData;\n\n\tStackControler(String[] readData) {\n\t\tthis.readData = readData;\n\t}\n\n\tpublic int calcData() {\n\t\tString tempStrData;\n\t\tstack = new Stack(new int[readData.length / 2 + 1]);\n\t\tfor (int i = 0; i < readData.length; i++) {\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}\n\t\tresult = stack.pop();\n\t\treturn result;\n\t}\n}", "StackControler", "private Stack stack;", "stack", "private String[] readData;", "readData", "private int operand2", "operand2", "operand1", "operand1", "result", "result", "strToIntData;", "strToIntData", "StackControler(String[] readData) {\n\t\tthis.readData = readData;\n\t}", "StackControler", "{\n\t\tthis.readData = readData;\n\t}", "this.readData = readData", "this.readData", "this", "this.readData", "readData", "String[] readData", "readData", "public int calcData() {\n\t\tString tempStrData;\n\t\tstack = new Stack(new int[readData.length / 2 + 1]);\n\t\tfor (int i = 0; i < readData.length; i++) {\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}\n\t\tresult = stack.pop();\n\t\treturn result;\n\t}", "calcData", "{\n\t\tString tempStrData;\n\t\tstack = new Stack(new int[readData.length / 2 + 1]);\n\t\tfor (int i = 0; i < readData.length; i++) {\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}\n\t\tresult = stack.pop();\n\t\treturn result;\n\t}", "String tempStrData;", "tempStrData", "stack = new Stack(new int[readData.length / 2 + 1])", "stack", "new Stack(new int[readData.length / 2 + 1])", "for (int i = 0; i < readData.length; i++) {\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < readData.length", "i", "readData.length", "readData", "readData.length", "i++", "i++", "i", "{\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}", "{\n\t\t\ttempStrData = readData[i];\n\n\t\t\tif (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}\n\t\t}", "tempStrData = readData[i]", "tempStrData", "readData[i]", "readData", "i", "if (tempStrData.equals(\"+\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}", "tempStrData.equals(\"+\")", "tempStrData.equals", "tempStrData", "\"+\"", "{\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 + operand1;\n\t\t\t\tstack.push(result);\n\t\t\t}", "operand1 = stack.pop()", "operand1", "stack.pop()", "stack.pop", "stack", "operand2 = stack.pop()", "operand2", "stack.pop()", "stack.pop", "stack", "result = operand2 + operand1", "result", "operand2 + operand1", "operand2", "operand1", "stack.push(result)", "stack.push", "stack", "result", "if (tempStrData.equals(\"-\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}", "tempStrData.equals(\"-\")", "tempStrData.equals", "tempStrData", "\"-\"", "{\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 - operand1;\n\t\t\t\tstack.push(result);\n\t\t\t}", "operand1 = stack.pop()", "operand1", "stack.pop()", "stack.pop", "stack", "operand2 = stack.pop()", "operand2", "stack.pop()", "stack.pop", "stack", "result = operand2 - operand1", "result", "operand2 - operand1", "operand2", "operand1", "stack.push(result)", "stack.push", "stack", "result", "if (tempStrData.equals(\"*\")) {\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t} else {\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}", "tempStrData.equals(\"*\")", "tempStrData.equals", "tempStrData", "\"*\"", "{\n\t\t\t\toperand1 = stack.pop();\n\t\t\t\toperand2 = stack.pop();\n\t\t\t\tresult = operand2 * operand1;\n\t\t\t\tstack.push(result);\n\t\t\t}", "operand1 = stack.pop()", "operand1", "stack.pop()", "stack.pop", "stack", "operand2 = stack.pop()", "operand2", "stack.pop()", "stack.pop", "stack", "result = operand2 * operand1", "result", "operand2 * operand1", "operand2", "operand1", "stack.push(result)", "stack.push", "stack", "result", "{\n\t\t\t\tstrToIntData = Integer.parseInt(readData[i]);\n\t\t\t\tstack.push(strToIntData);\n\t\t\t}", "strToIntData = Integer.parseInt(readData[i])", "strToIntData", "Integer.parseInt(readData[i])", "Integer.parseInt", "Integer", "readData[i]", "readData", "i", "stack.push(strToIntData)", "stack.push", "stack", "strToIntData", "result = stack.pop()", "result", "stack.pop()", "stack.pop", "stack", "return result;", "result", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tStackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));\n\t\tSystem.out.println(readDataArr.calcData());\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tStackControler readDataArr = new StackControler(in.readLine()\n\t\t\t\t.split(\" \"));\n\t\tSystem.out.println(readDataArr.calcData());\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); StackControler readDataArr = new StackControler(in.readLine() .split(" ")); System.out.println(readDataArr.calcData()); } } class Stack { private int[] stack; private static int pointer = 0, popData, remover = 0; Stack(int[] stack) { this.stack = stack; } public void push(int data) { stack[pointer] = data; pointer++; } public int pop() { pointer--; popData = stack[pointer]; stack[pointer] = remover;// pop????????????data????????? return popData; } } class StackControler { private Stack stack; private String[] readData; private int operand2, operand1, result, strToIntData; StackControler(String[] readData) { this.readData = readData; } public int calcData() { String tempStrData; stack = new Stack(new int[readData.length / 2 + 1]); for (int i = 0; i < readData.length; i++) { tempStrData = readData[i]; if (tempStrData.equals("+")) { operand1 = stack.pop(); operand2 = stack.pop(); result = operand2 + operand1; stack.push(result); } else if (tempStrData.equals("-")) { operand1 = stack.pop(); operand2 = stack.pop(); result = operand2 - operand1; stack.push(result); } else if (tempStrData.equals("*")) { operand1 = stack.pop(); operand2 = stack.pop(); result = operand2 * operand1; stack.push(result); } else { strToIntData = Integer.parseInt(readData[i]); stack.push(strToIntData); } } result = stack.pop(); return result; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 0, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 28, 13, 13, 30, 30, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 154, 11 ], [ 154, 12 ], [ 12, 13 ], [ 154, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 154, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 24, 28 ], [ 28, 29 ], [ 28, 30 ], [ 24, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 24, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 24, 42 ], [ 42, 43 ], [ 42, 44 ], [ 42, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 47, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 59, 60 ], [ 52, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 67, 68 ], [ 52, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 47, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 78, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 90, 91 ], [ 83, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 98, 99 ], [ 83, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 106, 108 ], [ 78, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 109, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 121, 122 ], [ 114, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 128, 129 ], [ 129, 130 ], [ 114, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 137, 139 ], [ 109, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 24, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 145, 150 ], [ 150, 151 ], [ 151, 152 ], [ 0, 153 ], [ 153, 154 ], [ 153, 155 ] ]
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n private Scanner sc;\n\n private void solve() {\n sc = new Scanner(System.in);\n Deque<String> stack = new ArrayDeque<String>();\n String line = sc.nextLine();\n String[] a = line.split(\" \");\n for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }\n System.out.println(stack.pop());\n }\n}", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n private Scanner sc;\n\n private void solve() {\n sc = new Scanner(System.in);\n Deque<String> stack = new ArrayDeque<String>();\n String line = sc.nextLine();\n String[] a = line.split(\" \");\n for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }\n System.out.println(stack.pop());\n }\n}", "Main", "private Scanner sc;", "sc", "public static void main(String[] args) {\n new Main().solve();\n }", "main", "{\n new Main().solve();\n }", "new Main().solve()", "new Main().solve", "new Main()", "String[] args", "args", "private void solve() {\n sc = new Scanner(System.in);\n Deque<String> stack = new ArrayDeque<String>();\n String line = sc.nextLine();\n String[] a = line.split(\" \");\n for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }\n System.out.println(stack.pop());\n }", "solve", "{\n sc = new Scanner(System.in);\n Deque<String> stack = new ArrayDeque<String>();\n String line = sc.nextLine();\n String[] a = line.split(\" \");\n for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }\n System.out.println(stack.pop());\n }", "sc = new Scanner(System.in)", "sc", "new Scanner(System.in)", "Deque<String> stack = new ArrayDeque<String>();", "stack", "new ArrayDeque<String>()", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] a = line.split(\" \");", "a", "line.split(\" \")", "line.split", "line", "\" \"", "for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }", "String s", "a", "{\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }", "{\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }", "if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }", "\"+\".equals(s)", "\"+\".equals", "\"+\"", "s", "{\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n }", "int n1 = Integer.parseInt(stack.pop());", "n1", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int n2 = Integer.parseInt(stack.pop());", "n2", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(String.valueOf(n1 + n2))", "stack.push", "stack", "String.valueOf(n1 + n2)", "String.valueOf", "String", "n1 + n2", "n1", "n2", "if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }", "\"-\".equals(s)", "\"-\".equals", "\"-\"", "s", "{\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n }", "int n1 = Integer.parseInt(stack.pop());", "n1", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int n2 = Integer.parseInt(stack.pop());", "n2", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(String.valueOf(n2 - n1))", "stack.push", "stack", "String.valueOf(n2 - n1)", "String.valueOf", "String", "n2 - n1", "n2", "n1", "if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }", "\"*\".equals(s)", "\"*\".equals", "\"*\"", "s", "{\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n }", "int n1 = Integer.parseInt(stack.pop());", "n1", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int n2 = Integer.parseInt(stack.pop());", "n2", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(String.valueOf(n1 * n2))", "stack.push", "stack", "String.valueOf(n1 * n2)", "String.valueOf", "String", "n1 * n2", "n1", "n2", "{\n stack.push(s);\n }", "stack.push(s)", "stack.push", "stack", "s", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "public class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n private Scanner sc;\n\n private void solve() {\n sc = new Scanner(System.in);\n Deque<String> stack = new ArrayDeque<String>();\n String line = sc.nextLine();\n String[] a = line.split(\" \");\n for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }\n System.out.println(stack.pop());\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n private Scanner sc;\n\n private void solve() {\n sc = new Scanner(System.in);\n Deque<String> stack = new ArrayDeque<String>();\n String line = sc.nextLine();\n String[] a = line.split(\" \");\n for (String s : a) {\n if (\"+\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 + n2));\n } else if (\"-\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n2 - n1));\n } else if (\"*\".equals(s)) {\n int n1 = Integer.parseInt(stack.pop());\n int n2 = Integer.parseInt(stack.pop());\n stack.push(String.valueOf(n1 * n2));\n } else {\n stack.push(s);\n }\n }\n System.out.println(stack.pop());\n }\n}", "Main" ]
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().solve(); } private Scanner sc; private void solve() { sc = new Scanner(System.in); Deque<String> stack = new ArrayDeque<String>(); String line = sc.nextLine(); String[] a = line.split(" "); for (String s : a) { if ("+".equals(s)) { int n1 = Integer.parseInt(stack.pop()); int n2 = Integer.parseInt(stack.pop()); stack.push(String.valueOf(n1 + n2)); } else if ("-".equals(s)) { int n1 = Integer.parseInt(stack.pop()); int n2 = Integer.parseInt(stack.pop()); stack.push(String.valueOf(n2 - n1)); } else if ("*".equals(s)) { int n1 = Integer.parseInt(stack.pop()); int n2 = Integer.parseInt(stack.pop()); stack.push(String.valueOf(n1 * n2)); } else { stack.push(s); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 35, 4, 18, 18, 13, 13, 17, 34, 17, 30, 30, 41, 13, 2, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 13, 3, 34, 17, 30, 30, 41, 13, 2, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 13, 3, 34, 17, 30, 30, 41, 13, 2, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 18, 13, 13, 3, 29, 4, 18, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 13, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 26, 31 ], [ 20, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 40, 42 ], [ 18, 43 ], [ 43, 44 ], [ 13, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 51, 61 ], [ 61, 62 ], [ 62, 63 ], [ 51, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 65, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 71, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 84, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 81, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 100, 102 ], [ 81, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 106, 108 ], [ 81, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 81, 113 ], [ 71, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 124, 126 ], [ 120, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 130, 131 ], [ 130, 132 ], [ 117, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 136, 138 ], [ 117, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 142, 143 ], [ 142, 144 ], [ 117, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 117, 149 ], [ 71, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 160, 161 ], [ 160, 162 ], [ 156, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 166, 167 ], [ 166, 168 ], [ 153, 169 ], [ 169, 170 ], [ 170, 171 ], [ 169, 172 ], [ 172, 173 ], [ 172, 174 ], [ 153, 175 ], [ 175, 176 ], [ 176, 177 ], [ 175, 178 ], [ 178, 179 ], [ 178, 180 ], [ 153, 181 ], [ 181, 182 ], [ 182, 183 ], [ 181, 184 ], [ 153, 185 ], [ 71, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 188, 191 ], [ 191, 192 ], [ 192, 193 ], [ 191, 194 ], [ 194, 195 ], [ 194, 196 ], [ 187, 197 ], [ 47, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 199, 202 ], [ 45, 203 ], [ 203, 204 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n \nclass Main {\n static StringBuilder builder = new StringBuilder();\n \n public static void main(String[] args) throws NumberFormatException,\n IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n final String[] str = reader.readLine().split(\" \");\n \n System.out.println(String.valueOf(getReversePolishResult(str)));\n }\n \n private static int getReversePolishResult(final String str[]){\n \tArrayList<Integer> list = new ArrayList<Integer>();\n \tfor(int i = 0;i < str.length;++i){\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n \treturn list.get(0);\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "class Main {\n static StringBuilder builder = new StringBuilder();\n \n public static void main(String[] args) throws NumberFormatException,\n IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n final String[] str = reader.readLine().split(\" \");\n \n System.out.println(String.valueOf(getReversePolishResult(str)));\n }\n \n private static int getReversePolishResult(final String str[]){\n \tArrayList<Integer> list = new ArrayList<Integer>();\n \tfor(int i = 0;i < str.length;++i){\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n \treturn list.get(0);\n }\n}", "Main", "static StringBuilder builder = new StringBuilder();", "builder", "new StringBuilder()", "public static void main(String[] args) throws NumberFormatException,\n IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n final String[] str = reader.readLine().split(\" \");\n \n System.out.println(String.valueOf(getReversePolishResult(str)));\n }", "main", "{\n BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));\n final String[] str = reader.readLine().split(\" \");\n \n System.out.println(String.valueOf(getReversePolishResult(str)));\n }", "BufferedReader reader = new BufferedReader(new InputStreamReader(\n System.in));", "reader", "new BufferedReader(new InputStreamReader(\n System.in))", "final String[] str = reader.readLine().split(\" \");", "str", "reader.readLine().split(\" \")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\" \"", "System.out.println(String.valueOf(getReversePolishResult(str)))", "System.out.println", "System.out", "System", "System.out", "String.valueOf(getReversePolishResult(str))", "String.valueOf", "String", "getReversePolishResult(str)", "getReversePolishResult", "str", "String[] args", "args", "private static int getReversePolishResult(final String str[]){\n \tArrayList<Integer> list = new ArrayList<Integer>();\n \tfor(int i = 0;i < str.length;++i){\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n \treturn list.get(0);\n }", "getReversePolishResult", "{\n \tArrayList<Integer> list = new ArrayList<Integer>();\n \tfor(int i = 0;i < str.length;++i){\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}\n \t\n \treturn list.get(0);\n }", "ArrayList<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for(int i = 0;i < str.length;++i){\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}", "int i = 0;", "int i = 0;", "i", "0", "i < str.length", "i", "str.length", "str", "str.length", "++i", "++i", "i", "{\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}", "{\n \t\tfinal int lastIndex = list.size();\n \t\tswitch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}\n \t}", "final int lastIndex = list.size();", "lastIndex", "list.size()", "list.size", "list", "switch(str[i].charAt(0)){\n \t\tcase '+':{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '-':{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tcase '*':{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}\n \t\tdefault:\n \t\t\tlist.add(Integer.parseInt(str[i]));\n \t\t\tbreak;\n \t\t}", "str[i].charAt(0)", "str[i].charAt", "str[i]", "str", "i", "0", "case '+':", "'+'", "case '+':", "{\n \t\t\tfinal int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}", "final int num = list.get(lastIndex - 2) + list.get(lastIndex - 1);", "num", "list.get(lastIndex - 2) + list.get(lastIndex - 1)", "list.get(lastIndex - 2)", "list.get", "list", "lastIndex - 2", "lastIndex", "2", "list.get(lastIndex - 1)", "list.get", "list", "lastIndex - 1", "lastIndex", "1", "list.remove(lastIndex - 1)", "list.remove", "list", "lastIndex - 1", "lastIndex", "1", "list.remove(lastIndex - 2)", "list.remove", "list", "lastIndex - 2", "lastIndex", "2", "list.add(num)", "list.add", "list", "num", "break;", "case '-':", "'-'", "case '-':", "{\n \t\t\tfinal int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}", "final int num = list.get(lastIndex - 2) - list.get(lastIndex - 1);", "num", "list.get(lastIndex - 2) - list.get(lastIndex - 1)", "list.get(lastIndex - 2)", "list.get", "list", "lastIndex - 2", "lastIndex", "2", "list.get(lastIndex - 1)", "list.get", "list", "lastIndex - 1", "lastIndex", "1", "list.remove(lastIndex - 1)", "list.remove", "list", "lastIndex - 1", "lastIndex", "1", "list.remove(lastIndex - 2)", "list.remove", "list", "lastIndex - 2", "lastIndex", "2", "list.add(num)", "list.add", "list", "num", "break;", "case '*':", "'*'", "case '*':", "{\n \t\t\tfinal int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 1);\n \t\t\tlist.remove(lastIndex - 2);\n \t\t\tlist.add(num);\n \t\t\tbreak;\n \t\t}", "final int num = list.get(lastIndex - 2) * list.get(lastIndex - 1);", "num", "list.get(lastIndex - 2) * list.get(lastIndex - 1)", "list.get(lastIndex - 2)", "list.get", "list", "lastIndex - 2", "lastIndex", "2", "list.get(lastIndex - 1)", "list.get", "list", "lastIndex - 1", "lastIndex", "1", "list.remove(lastIndex - 1)", "list.remove", "list", "lastIndex - 1", "lastIndex", "1", "list.remove(lastIndex - 2)", "list.remove", "list", "lastIndex - 2", "lastIndex", "2", "list.add(num)", "list.add", "list", "num", "break;", "default:", "default:", "list.add(Integer.parseInt(str[i]))", "list.add", "list", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "break;", "return list.get(0);", "list.get(0)", "list.get", "list", "0", "final String str[]", "str" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; class Main { static StringBuilder builder = new StringBuilder(); public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader reader = new BufferedReader(new InputStreamReader( System.in)); final String[] str = reader.readLine().split(" "); System.out.println(String.valueOf(getReversePolishResult(str))); } private static int getReversePolishResult(final String str[]){ ArrayList<Integer> list = new ArrayList<Integer>(); for(int i = 0;i < str.length;++i){ final int lastIndex = list.size(); switch(str[i].charAt(0)){ case '+':{ final int num = list.get(lastIndex - 2) + list.get(lastIndex - 1); list.remove(lastIndex - 1); list.remove(lastIndex - 2); list.add(num); break; } case '-':{ final int num = list.get(lastIndex - 2) - list.get(lastIndex - 1); list.remove(lastIndex - 1); list.remove(lastIndex - 2); list.add(num); break; } case '*':{ final int num = list.get(lastIndex - 2) * list.get(lastIndex - 1); list.remove(lastIndex - 1); list.remove(lastIndex - 2); list.add(num); break; } default: list.add(Integer.parseInt(str[i])); break; } } return list.get(0); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 14, 4, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 4, 18, 13, 17, 30, 0, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 38, 5, 13, 30, 29, 17, 30, 4, 18, 13, 13, 29, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 123, 5 ], [ 123, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 26, 29 ], [ 30, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 31, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 43, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 54, 55 ], [ 54, 56 ], [ 43, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 57, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 68, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 68, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 79, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 43, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 8, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 100, 101 ], [ 6, 102 ], [ 102, 103 ], [ 123, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 107, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 113, 118 ], [ 118, 119 ], [ 104, 120 ], [ 120, 121 ], [ 0, 122 ], [ 122, 123 ], [ 122, 124 ] ]
[ "import java.util.*;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] s = line.split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<>();\n\t\tfor(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(stack.removeLast());\n\t}\n\tpublic static boolean isNumber(String num) {\n try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] s = line.split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<>();\n\t\tfor(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(stack.removeLast());\n\t}\n\tpublic static boolean isNumber(String num) {\n try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] s = line.split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<>();\n\t\tfor(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(stack.removeLast());\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] s = line.split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<>();\n\t\tfor(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(stack.removeLast());\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] s = line.split(\" \");", "s", "line.split(\" \")", "line.split", "line", "\" \"", "Deque<Integer> stack = new ArrayDeque<>();", "stack", "new ArrayDeque<>()", "for(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}", "String op", "s", "{\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}", "{\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}", "if(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}", "isNumber(op)", "isNumber", "op", "{\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}", "stack.addLast(Integer.parseInt(op))", "stack.addLast", "stack", "Integer.parseInt(op)", "Integer.parseInt", "Integer", "op", "{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}", "int b = stack.removeLast();", "b", "stack.removeLast()", "stack.removeLast", "stack", "int a = stack.removeLast();", "a", "stack.removeLast()", "stack.removeLast", "stack", "int c = 0;", "c", "0", "if(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}", "op.equals(\"+\")", "op.equals", "op", "\"+\"", "{\n\t\t\t\t\tc = a + b;\n\t\t\t\t}", "c = a + b", "c", "a + b", "a", "b", "if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}", "op.equals(\"-\")", "op.equals", "op", "\"-\"", "{\n\t\t\t\t\tc = a - b;\n\t\t\t\t}", "c = a - b", "c", "a - b", "a", "b", "if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}", "op.equals(\"*\")", "op.equals", "op", "\"*\"", "{\n\t\t\t\t\tc = a * b;\n\t\t\t\t}", "c = a * b", "c", "a * b", "a", "b", "stack.addLast(c)", "stack.addLast", "stack", "c", "System.out.println(stack.removeLast())", "System.out.println", "System.out", "System", "System.out", "stack.removeLast()", "stack.removeLast", "stack", "String[] args", "args", "public static boolean isNumber(String num) {\n try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n}", "isNumber", "{\n try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n}", "try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }", "catch (NumberFormatException e) {\n return false;\n }", "NumberFormatException e", "{\n return false;\n }", "return false;", "false", "{\n Integer.parseInt(num);\n return true;\n }", "Integer.parseInt(num)", "Integer.parseInt", "Integer", "num", "return true;", "true", "String num", "num", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] s = line.split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<>();\n\t\tfor(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(stack.removeLast());\n\t}\n\tpublic static boolean isNumber(String num) {\n try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] s = line.split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<>();\n\t\tfor(String op : s){\n\t\t\tif(isNumber(op)){\n\t\t\t\tstack.addLast(Integer.parseInt(op));\n\t\t\t}else{\n\t\t\t\tint b = stack.removeLast();\n\t\t\t\tint a = stack.removeLast();\n\t\t\t\tint c = 0;\n\t\t\t\tif(op.equals(\"+\")){\n\t\t\t\t\tc = a + b;\n\t\t\t\t}else if(op.equals(\"-\")){\n\t\t\t\t\tc = a - b;\n\t\t\t\t}else if(op.equals(\"*\")){\n\t\t\t\t\tc = a * b;\n\t\t\t\t}\n\t\t\t\tstack.addLast(c);\n\t\t\t}\t\n\t\t}\n\t\tSystem.out.println(stack.removeLast());\n\t}\n\tpublic static boolean isNumber(String num) {\n try {\n Integer.parseInt(num);\n return true;\n } catch (NumberFormatException e) {\n return false;\n }\n}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] s = line.split(" "); Deque<Integer> stack = new ArrayDeque<>(); for(String op : s){ if(isNumber(op)){ stack.addLast(Integer.parseInt(op)); }else{ int b = stack.removeLast(); int a = stack.removeLast(); int c = 0; if(op.equals("+")){ c = a + b; }else if(op.equals("-")){ c = a - b; }else if(op.equals("*")){ c = a * b; } stack.addLast(c); } } System.out.println(stack.removeLast()); } public static boolean isNumber(String num) { try { Integer.parseInt(num); return true; } catch (NumberFormatException e) { return false; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 29, 17, 30, 4, 18, 13, 13, 29, 17, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 4, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 2, 4, 18, 13, 4, 18, 13, 40, 17, 4, 18, 13, 13, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 130, 5 ], [ 130, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 9, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 16, 19 ], [ 15, 20 ], [ 20, 21 ], [ 6, 22 ], [ 22, 23 ], [ 130, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 26, 33 ], [ 33, 34 ], [ 33, 35 ], [ 26, 36 ], [ 36, 37 ], [ 36, 38 ], [ 26, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 43, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 49, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 61, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 69, 73 ], [ 73, 74 ], [ 74, 75 ], [ 66, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 61, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 80, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 89, 93 ], [ 93, 94 ], [ 94, 95 ], [ 88, 96 ], [ 96, 97 ], [ 85, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 80, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 102, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 26, 116 ], [ 116, 117 ], [ 117, 118 ], [ 26, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 24, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static boolean isNum(String str) {\n try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> deq = new ArrayDeque<>();\n String s = \"\";\n int a = 0;\n while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }\n sc.close();\n System.out.println(deq.getFirst());\n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n public static boolean isNum(String str) {\n try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> deq = new ArrayDeque<>();\n String s = \"\";\n int a = 0;\n while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }\n sc.close();\n System.out.println(deq.getFirst());\n }\n}", "Main", "public static boolean isNum(String str) {\n try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }", "isNum", "{\n try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }", "try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }", "catch(NumberFormatException e) {\n return false;\n }", "NumberFormatException e", "{\n return false;\n }", "return false;", "false", "{\n Integer.parseInt(str);\n return true;\n }", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "return true;", "true", "String str", "str", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> deq = new ArrayDeque<>();\n String s = \"\";\n int a = 0;\n while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }\n sc.close();\n System.out.println(deq.getFirst());\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n Deque<Integer> deq = new ArrayDeque<>();\n String s = \"\";\n int a = 0;\n while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }\n sc.close();\n System.out.println(deq.getFirst());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Deque<Integer> deq = new ArrayDeque<>();", "deq", "new ArrayDeque<>()", "String s = \"\";", "s", "\"\"", "int a = 0;", "a", "0", "while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }", "s = sc.next()", "s", "sc.next()", "sc.next", "sc", "if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }", "isNum(s)", "isNum", "s", "{\n deq.addFirst(Integer.parseInt(s));\n }", "deq.addFirst(Integer.parseInt(s))", "deq.addFirst", "deq", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n }", "a = deq.pollFirst() + deq.pollFirst()", "a", "deq.pollFirst() + deq.pollFirst()", "deq.pollFirst()", "deq.pollFirst", "deq", "deq.pollFirst()", "deq.pollFirst", "deq", "deq.addFirst(a)", "deq.addFirst", "deq", "a", "if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n }", "a = (deq.pollFirst() - deq.pollFirst()) * (-1)", "a", "(deq.pollFirst() - deq.pollFirst()) * (-1)", "(deq.pollFirst() - deq.pollFirst())", "deq.pollFirst()", "deq.pollFirst", "deq", "deq.pollFirst()", "deq.pollFirst", "deq", "(-1)", "1", "deq.addFirst(a)", "deq.addFirst", "deq", "a", "{\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }", "a = deq.pollFirst() * deq.pollFirst()", "a", "deq.pollFirst() * deq.pollFirst()", "deq.pollFirst()", "deq.pollFirst", "deq", "deq.pollFirst()", "deq.pollFirst", "deq", "deq.addFirst(a)", "deq.addFirst", "deq", "a", "sc.close()", "sc.close", "sc", "System.out.println(deq.getFirst())", "System.out.println", "System.out", "System", "System.out", "deq.getFirst()", "deq.getFirst", "deq", "String[] args", "args", "public class Main {\n public static boolean isNum(String str) {\n try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> deq = new ArrayDeque<>();\n String s = \"\";\n int a = 0;\n while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }\n sc.close();\n System.out.println(deq.getFirst());\n }\n}", "public class Main {\n public static boolean isNum(String str) {\n try {\n Integer.parseInt(str);\n return true;\n } catch(NumberFormatException e) {\n return false;\n }\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> deq = new ArrayDeque<>();\n String s = \"\";\n int a = 0;\n while(sc.hasNext()) {\n s = sc.next();\n if(isNum(s)) {\n deq.addFirst(Integer.parseInt(s));\n } else if(s.equals(\"+\")) {\n a = deq.pollFirst() + deq.pollFirst();\n deq.addFirst(a);\n } else if(s.equals(\"-\")) {\n a = (deq.pollFirst() - deq.pollFirst()) * (-1);\n deq.addFirst(a);\n } else {\n a = deq.pollFirst() * deq.pollFirst();\n deq.addFirst(a);\n }\n }\n sc.close();\n System.out.println(deq.getFirst());\n }\n}", "Main" ]
import java.util.*; public class Main { public static boolean isNum(String str) { try { Integer.parseInt(str); return true; } catch(NumberFormatException e) { return false; } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); Deque<Integer> deq = new ArrayDeque<>(); String s = ""; int a = 0; while(sc.hasNext()) { s = sc.next(); if(isNum(s)) { deq.addFirst(Integer.parseInt(s)); } else if(s.equals("+")) { a = deq.pollFirst() + deq.pollFirst(); deq.addFirst(a); } else if(s.equals("-")) { a = (deq.pollFirst() - deq.pollFirst()) * (-1); deq.addFirst(a); } else { a = deq.pollFirst() * deq.pollFirst(); deq.addFirst(a); } } sc.close(); System.out.println(deq.getFirst()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 2, 4, 18, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 13, 2, 4, 18, 13, 13, 4, 18, 13, 17, 0, 13, 2, 17, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 20, 17, 41, 13, 17, 12, 13, 30, 40, 13, 29, 18, 13, 13, 12, 13, 30, 0, 18, 13, 13, 13, 40, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 181, 5 ], [ 181, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 28, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 28, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 50, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 55, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 50, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 72, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 77, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 77, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 72, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 105, 109 ], [ 101, 110 ], [ 110, 111 ], [ 110, 112 ], [ 101, 113 ], [ 113, 114 ], [ 114, 115 ], [ 101, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 122, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 117, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 133, 135 ], [ 94, 136 ], [ 136, 137 ], [ 137, 138 ], [ 136, 139 ], [ 8, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 145, 146 ], [ 146, 147 ], [ 6, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 152, 154 ], [ 150, 156 ], [ 156, 157 ], [ 156, 158 ], [ 150, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 161, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 150, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 171, 175 ], [ 170, 176 ], [ 176, 177 ], [ 168, 178 ], [ 178, 179 ], [ 0, 180 ], [ 180, 181 ], [ 180, 182 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tString a=\"0\";\n\t\tIntStack iStack=new IntStack();\n\t\twhile(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(iStack.pop());\n\t}\n}\n\nclass IntStack{\n\tprivate int[] data=new int[256];\n\tprivate int sp=0;\n\tpublic int pop(){\n\t\tsp--;\n\t\treturn data[sp];\n\t}\n\tpublic void push(int value){\n\t\tdata[sp]=value;\n\t\tsp++;\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tString a=\"0\";\n\t\tIntStack iStack=new IntStack();\n\t\twhile(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(iStack.pop());\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tString a=\"0\";\n\t\tIntStack iStack=new IntStack();\n\t\twhile(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(iStack.pop());\n\t}", "main", "{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString a=\"0\";\n\t\tIntStack iStack=new IntStack();\n\t\twhile(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(iStack.pop());\n\t}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "String a=\"0\";", "a", "\"0\"", "IntStack iStack=new IntStack();", "iStack", "new IntStack()", "while(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}", "String str=sc.next();", "str", "sc.next()", "sc.next", "sc", "if(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}", "str.equals(\"+\")", "str.equals", "str", "\"+\"", "{\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}", "int x=iStack.pop();", "x", "iStack.pop()", "iStack.pop", "iStack", "int y=iStack.pop();", "y", "iStack.pop()", "iStack.pop", "iStack", "iStack.push(x+y)", "iStack.push", "iStack", "x+y", "x", "y", "if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}", "str.equals(\"-\")", "str.equals", "str", "\"-\"", "{\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}", "int x=iStack.pop();", "x", "iStack.pop()", "iStack.pop", "iStack", "int y=iStack.pop();", "y", "iStack.pop()", "iStack.pop", "iStack", "iStack.push(y-x)", "iStack.push", "iStack", "y-x", "y", "x", "if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}", "str.equals(\"*\")", "str.equals", "str", "\"*\"", "{\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}", "int x=iStack.pop();", "x", "iStack.pop()", "iStack.pop", "iStack", "int y=iStack.pop();", "y", "iStack.pop()", "iStack.pop", "iStack", "iStack.push(x*y)", "iStack.push", "iStack", "x*y", "x", "y", "{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}", "int m=0;", "m", "0", "int n=1;", "n", "1", "for(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}", "int i=str.length()-1;", "int i=str.length()-1;", "i", "str.length()-1", "str.length()", "str.length", "str", "1", "i>=0", "i", "0", "i--", "i--", "i", "{\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}", "{\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}", "m+=n*(str.charAt(i)-a.charAt(0))", "m", "n*(str.charAt(i)-a.charAt(0))", "n", "(str.charAt(i)-a.charAt(0))", "str.charAt(i)", "str.charAt", "str", "i", "a.charAt(0)", "a.charAt", "a", "0", "n=10*n", "n", "10*n", "10", "n", "iStack.push(m)", "iStack.push", "iStack", "m", "System.out.println(iStack.pop())", "System.out.println", "System.out", "System", "System.out", "iStack.pop()", "iStack.pop", "iStack", "String[] args", "args", "class IntStack{\n\tprivate int[] data=new int[256];\n\tprivate int sp=0;\n\tpublic int pop(){\n\t\tsp--;\n\t\treturn data[sp];\n\t}\n\tpublic void push(int value){\n\t\tdata[sp]=value;\n\t\tsp++;\n\t}\n}", "IntStack", "private int[] data=new int[256];", "data", "new int[256]", "256", "private int sp=0;", "sp", "0", "public int pop(){\n\t\tsp--;\n\t\treturn data[sp];\n\t}", "pop", "{\n\t\tsp--;\n\t\treturn data[sp];\n\t}", "sp--", "sp", "return data[sp];", "data[sp]", "data", "sp", "public void push(int value){\n\t\tdata[sp]=value;\n\t\tsp++;\n\t}", "push", "{\n\t\tdata[sp]=value;\n\t\tsp++;\n\t}", "data[sp]=value", "data[sp]", "data", "sp", "value", "sp++", "sp", "int value", "value", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tString a=\"0\";\n\t\tIntStack iStack=new IntStack();\n\t\twhile(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(iStack.pop());\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\tString a=\"0\";\n\t\tIntStack iStack=new IntStack();\n\t\twhile(sc.hasNext()){\n\t\t\tString str=sc.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x+y);\n\t\t\t\t//System.out.println(x+\"+\"+y);\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(y-x);\t\t\t\t\n\t\t\t\t//System.out.println(x+\"-\"+y);\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint x=iStack.pop();\n\t\t\t\tint y=iStack.pop();\n\t\t\t\tiStack.push(x*y);\n\t\t\t\t//System.out.println(x+\"*\"+y);\n\t\t\t}else{\n\t\t\t\tint m=0;\n\t\t\t\tint n=1;\n\t\t\t\tfor(int i=str.length()-1;i>=0;i--){\n\t\t\t\t\tm+=n*(str.charAt(i)-a.charAt(0));\n\t\t\t\t\tn=10*n;\n\t\t\t\t}\n\t\t\t\tiStack.push(m);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(iStack.pop());\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); String a="0"; IntStack iStack=new IntStack(); while(sc.hasNext()){ String str=sc.next(); if(str.equals("+")){ int x=iStack.pop(); int y=iStack.pop(); iStack.push(x+y); //System.out.println(x+"+"+y); }else if(str.equals("-")){ int x=iStack.pop(); int y=iStack.pop(); iStack.push(y-x); //System.out.println(x+"-"+y); }else if(str.equals("*")){ int x=iStack.pop(); int y=iStack.pop(); iStack.push(x*y); //System.out.println(x+"*"+y); }else{ int m=0; int n=1; for(int i=str.length()-1;i>=0;i--){ m+=n*(str.charAt(i)-a.charAt(0)); n=10*n; } iStack.push(m); } } System.out.println(iStack.pop()); } } class IntStack{ private int[] data=new int[256]; private int sp=0; public int pop(){ sp--; return data[sp]; } public void push(int value){ data[sp]=value; sp++; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 32, 34 ], [ 11, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 50, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 57, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 71, 73 ], [ 50, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 74, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 74, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 98, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 105, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 105, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 119, 121 ], [ 98, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 122, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 129, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 129, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 143, 145 ], [ 122, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 147, 150 ], [ 150, 151 ], [ 151, 152 ], [ 150, 153 ], [ 153, 154 ], [ 153, 155 ], [ 11, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 156, 161 ], [ 161, 162 ], [ 162, 163 ], [ 9, 164 ], [ 164, 165 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\nclass Main {\n public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] str = scan.nextLine().split(\"\\\\s\");\n\t\t\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint tmp = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length; i++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "class Main {\n public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] str = scan.nextLine().split(\"\\\\s\");\n\t\t\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint tmp = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length; i++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] str = scan.nextLine().split(\"\\\\s\");\n\t\t\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint tmp = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length; i++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] str = scan.nextLine().split(\"\\\\s\");\n\t\t\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint tmp = 0;\n\t\t\n\t\tfor(int i = 0; i < str.length; i++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "String[] str = scan.nextLine().split(\"\\\\s\");", "str", "scan.nextLine().split(\"\\\\s\")", "scan.nextLine().split", "scan.nextLine()", "scan.nextLine", "scan", "\"\\\\s\"", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "int x = 0;", "x", "0", "int y = 0;", "y", "0", "int tmp = 0;", "tmp", "0", "for(int i = 0; i < str.length; i++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < str.length", "i", "str.length", "str", "str.length", "i++", "i++", "i", "{\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}", "{\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}", "if(str[i].equals(\"+\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}else if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"+\")", "str[i].equals", "str[i]", "str", "i", "\"+\"", "{\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y + x);\n\t\t\t}", "x = stack.pop()", "x", "stack.pop()", "stack.pop", "stack", "y = stack.pop()", "y", "stack.pop()", "stack.pop", "stack", "stack.add(y + x)", "stack.add", "stack", "y + x", "y", "x", "if(str[i].equals(\"-\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}else if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"-\")", "str[i].equals", "str[i]", "str", "i", "\"-\"", "{\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y - x);\n\t\t\t}", "x = stack.pop()", "x", "stack.pop()", "stack.pop", "stack", "y = stack.pop()", "y", "stack.pop()", "stack.pop", "stack", "stack.add(y - x)", "stack.add", "stack", "y - x", "y", "x", "if(str[i].equals(\"*\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}else if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"*\")", "str[i].equals", "str[i]", "str", "i", "\"*\"", "{\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y * x);\n\t\t\t}", "x = stack.pop()", "x", "stack.pop()", "stack.pop", "stack", "y = stack.pop()", "y", "stack.pop()", "stack.pop", "stack", "stack.add(y * x)", "stack.add", "stack", "y * x", "y", "x", "if(str[i].equals(\"/\")){\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}else{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"/\")", "str[i].equals", "str[i]", "str", "i", "\"/\"", "{\n\t\t\t\tx = stack.pop();\n\t\t\t\ty = stack.pop();\n\t\t\t\tstack.add(y / x);\n\t\t\t}", "x = stack.pop()", "x", "stack.pop()", "stack.pop", "stack", "y = stack.pop()", "y", "stack.pop()", "stack.pop", "stack", "stack.add(y / x)", "stack.add", "stack", "y / x", "y", "x", "{\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "stack.push(Integer.parseInt(str[i]))", "stack.push", "stack", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args" ]
import java.util.Scanner; import java.util.Stack; class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); String[] str = scan.nextLine().split("\\s"); Stack<Integer> stack = new Stack<Integer>(); int x = 0; int y = 0; int tmp = 0; for(int i = 0; i < str.length; i++){ if(str[i].equals("+")){ x = stack.pop(); y = stack.pop(); stack.add(y + x); }else if(str[i].equals("-")){ x = stack.pop(); y = stack.pop(); stack.add(y - x); }else if(str[i].equals("*")){ x = stack.pop(); y = stack.pop(); stack.add(y * x); }else if(str[i].equals("/")){ x = stack.pop(); y = stack.pop(); stack.add(y / x); }else{ stack.push(Integer.parseInt(str[i])); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 30, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 148, 5 ], [ 148, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 6, 11 ], [ 11, 12 ], [ 148, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 19, 21 ], [ 15, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 32, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 43, 44 ], [ 44, 45 ], [ 37, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 51, 52 ], [ 52, 53 ], [ 37, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 59, 61 ], [ 37, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 32, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 66, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 78, 79 ], [ 71, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 71, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 71, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 66, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 100, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 105, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 120, 121 ], [ 105, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 127, 129 ], [ 105, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 100, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 15, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 144, 145 ], [ 145, 146 ], [ 0, 147 ], [ 147, 148 ], [ 147, 149 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tALDS1_3_A();\n\t}\n\n\tpublic static void ALDS1_3_A() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.removeFirst());\n\t}\n\t\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tALDS1_3_A();\n\t}\n\n\tpublic static void ALDS1_3_A() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.removeFirst());\n\t}\n\t\n}", "Main", "public static void main(String[] args) {\n\t\tALDS1_3_A();\n\t}", "main", "{\n\t\tALDS1_3_A();\n\t}", "ALDS1_3_A()", "ALDS1_3_A", "String[] args", "args", "public static void ALDS1_3_A() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.removeFirst());\n\t}", "ALDS1_3_A", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.removeFirst());\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Deque<String> stack = new ArrayDeque<String>();", "stack", "new ArrayDeque<String>()", "while(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "if(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}", "str.equals(\"+\")", "str.equals", "str", "\"+\"", "{\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t}", "int a = Integer.parseInt(stack.removeFirst());", "a", "Integer.parseInt(stack.removeFirst())", "Integer.parseInt", "Integer", "stack.removeFirst()", "stack.removeFirst", "stack", "int b = Integer.parseInt(stack.removeFirst());", "b", "Integer.parseInt(stack.removeFirst())", "Integer.parseInt", "Integer", "stack.removeFirst()", "stack.removeFirst", "stack", "String c = Integer.toString(a + b);", "c", "Integer.toString(a + b)", "Integer.toString", "Integer", "a + b", "a", "b", "stack.addFirst(c)", "stack.addFirst", "stack", "c", "if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}", "str.equals(\"-\")", "str.equals", "str", "\"-\"", "{\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t}", "int a = Integer.parseInt(stack.removeFirst());", "a", "Integer.parseInt(stack.removeFirst())", "Integer.parseInt", "Integer", "stack.removeFirst()", "stack.removeFirst", "stack", "int b = Integer.parseInt(stack.removeFirst());", "b", "Integer.parseInt(stack.removeFirst())", "Integer.parseInt", "Integer", "stack.removeFirst()", "stack.removeFirst", "stack", "String c = Integer.toString(b - a);", "c", "Integer.toString(b - a)", "Integer.toString", "Integer", "b - a", "b", "a", "stack.addFirst(c)", "stack.addFirst", "stack", "c", "if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}", "str.equals(\"*\")", "str.equals", "str", "\"*\"", "{\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t}", "int a = Integer.parseInt(stack.removeFirst());", "a", "Integer.parseInt(stack.removeFirst())", "Integer.parseInt", "Integer", "stack.removeFirst()", "stack.removeFirst", "stack", "int b = Integer.parseInt(stack.removeFirst());", "b", "Integer.parseInt(stack.removeFirst())", "Integer.parseInt", "Integer", "stack.removeFirst()", "stack.removeFirst", "stack", "String c = Integer.toString(a * b);", "c", "Integer.toString(a * b)", "Integer.toString", "Integer", "a * b", "a", "b", "stack.addFirst(c)", "stack.addFirst", "stack", "c", "{\n\t\t\t\tstack.addFirst(str);\n\t\t\t}", "stack.addFirst(str)", "stack.addFirst", "stack", "str", "System.out.println(stack.removeFirst())", "System.out.println", "System.out", "System", "System.out", "stack.removeFirst()", "stack.removeFirst", "stack", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tALDS1_3_A();\n\t}\n\n\tpublic static void ALDS1_3_A() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.removeFirst());\n\t}\n\t\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tALDS1_3_A();\n\t}\n\n\tpublic static void ALDS1_3_A() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a + b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(b - a);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint a = Integer.parseInt(stack.removeFirst());\n\t\t\t\tint b = Integer.parseInt(stack.removeFirst());\n\t\t\t\tString c = Integer.toString(a * b);\n\t\t\t\tstack.addFirst(c);\n\t\t\t} else {\n\t\t\t\tstack.addFirst(str);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.removeFirst());\n\t}\n\t\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { ALDS1_3_A(); } public static void ALDS1_3_A() { Scanner sc = new Scanner(System.in); Deque<String> stack = new ArrayDeque<String>(); while(sc.hasNext()) { String str = sc.next(); if(str.equals("+")) { int a = Integer.parseInt(stack.removeFirst()); int b = Integer.parseInt(stack.removeFirst()); String c = Integer.toString(a + b); stack.addFirst(c); } else if(str.equals("-")) { int a = Integer.parseInt(stack.removeFirst()); int b = Integer.parseInt(stack.removeFirst()); String c = Integer.toString(b - a); stack.addFirst(c); } else if(str.equals("*")) { int a = Integer.parseInt(stack.removeFirst()); int b = Integer.parseInt(stack.removeFirst()); String c = Integer.toString(a * b); stack.addFirst(c); } else { stack.addFirst(str); } } System.out.println(stack.removeFirst()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 28, 13, 13, 30, 30, 14, 2, 2, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 124, 8 ], [ 124, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 17, 19 ], [ 13, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 13, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 13, 31 ], [ 31, 32 ], [ 31, 33 ], [ 31, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 38, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 38, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 38, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 36, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 58, 59 ], [ 51, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 66, 67 ], [ 51, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 68, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 68, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 83, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 83, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 105, 106 ], [ 105, 107 ], [ 36, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 13, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 119, 120 ], [ 9, 121 ], [ 121, 122 ], [ 0, 123 ], [ 123, 124 ], [ 123, 125 ] ]
[ "\nimport java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}\n\t}", "main", "{\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}\n\t}", "try(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}", "{\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}", "Scanner sc = new Scanner(System.in)", "Scanner sc = new Scanner(System.in)", "new Scanner(System.in)", "Stack<String> stack = new Stack<String>();", "stack", "new Stack<String>()", "String str = sc.nextLine();", "str", "sc.nextLine()", "sc.nextLine", "sc", "String[] token = str.split(\" \");", "token", "str.split(\" \")", "str.split", "str", "\" \"", "for(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}", "String t", "token", "{\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}", "if( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}", "t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\")", "t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\")", "t.equals(\"+\")", "t.equals", "t", "\"+\"", "t.equals(\"-\")", "t.equals", "t", "\"-\"", "t.equals(\"*\")", "t.equals", "t", "\"*\"", "{ \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "int first = Integer.parseInt( stack.pop() );", "first", "Integer.parseInt( stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int second = Integer.parseInt( stack.pop() );", "second", "Integer.parseInt( stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "if(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}", "t.equals(\"+\")", "t.equals", "t", "\"+\"", "{\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}", "stack.push( Integer.toString(first + second) )", "stack.push", "stack", "Integer.toString(first + second)", "Integer.toString", "Integer", "first + second", "first", "second", "if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}", "t.equals(\"-\")", "t.equals", "t", "\"-\"", "{\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}", "stack.push( Integer.toString(second - first) )", "stack.push", "stack", "Integer.toString(second - first)", "Integer.toString", "Integer", "second - first", "second", "first", "{\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}", "stack.push( Integer.toString(first * second) )", "stack.push", "stack", "Integer.toString(first * second)", "Integer.toString", "Integer", "first * second", "first", "second", "{\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}", "stack.push(t)", "stack.push", "stack", "t", "System.out.println( stack.pop() )", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\tStack<String> stack = new Stack<String>();\n\t\t\tString str = sc.nextLine();\n\t\t\tString[] token = str.split(\" \");\n\t\t\tfor(String t : token) {\n\t\t\t\tif( t.equals(\"+\") || t.equals(\"-\") || t.equals(\"*\") ) { \n\t\t\t\t\tint first = Integer.parseInt( stack.pop() );\n\t\t\t\t\tint second = Integer.parseInt( stack.pop() );\n\t\t\t\t\tif(t.equals(\"+\")) {\n\t\t\t\t\t\tstack.push( Integer.toString(first + second) );\n\t\t\t\t\t}\n\t\t\t\t\telse if( t.equals(\"-\") ) {\n\t\t\t\t\t\tstack.push( Integer.toString(second - first) );\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tstack.push( Integer.toString(first * second) );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstack.push(t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println( stack.pop() );\n\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { try(Scanner sc = new Scanner(System.in)) { Stack<String> stack = new Stack<String>(); String str = sc.nextLine(); String[] token = str.split(" "); for(String t : token) { if( t.equals("+") || t.equals("-") || t.equals("*") ) { int first = Integer.parseInt( stack.pop() ); int second = Integer.parseInt( stack.pop() ); if(t.equals("+")) { stack.push( Integer.toString(first + second) ); } else if( t.equals("-") ) { stack.push( Integer.toString(second - first) ); } else { stack.push( Integer.toString(first * second) ); } } else { stack.push(t); } } System.out.println( stack.pop() ); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 9, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 130, 14 ], [ 130, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 47, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 58, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 46, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 66, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 73, 90 ], [ 46, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 91, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 102, 106 ], [ 106, 107 ], [ 107, 108 ], [ 98, 109 ], [ 46, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 116, 118 ], [ 17, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 15, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\n\npublic class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\"\\\\s\");\n Stack<Integer> q = new Stack<Integer>();\n for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }\n System.out.println(q.pop());\n }\n}\n", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\"\\\\s\");\n Stack<Integer> q = new Stack<Integer>();\n for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }\n System.out.println(q.pop());\n }\n}", "Main", "public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\"\\\\s\");\n Stack<Integer> q = new Stack<Integer>();\n for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }\n System.out.println(q.pop());\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\"\\\\s\");\n Stack<Integer> q = new Stack<Integer>();\n for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }\n System.out.println(q.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] str = br.readLine().split(\"\\\\s\");", "str", "br.readLine().split(\"\\\\s\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"\\\\s\"", "Stack<Integer> q = new Stack<Integer>();", "q", "new Stack<Integer>()", "for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }", "int i = 0;", "int i = 0;", "i", "0", "i < str.length", "i", "str.length", "str", "str.length", "i++", "i++", "i", "{\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }", "{\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }", "if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }", "str[i].equals(\"+\")", "str[i].equals", "str[i]", "str", "i", "\"+\"", "{\n q.add(q.pop() + q.pop());\n continue;\n }", "q.add(q.pop() + q.pop())", "q.add", "q", "q.pop() + q.pop()", "q.pop()", "q.pop", "q", "q.pop()", "q.pop", "q", "continue;", "if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }", "str[i].equals(\"-\")", "str[i].equals", "str[i]", "str", "i", "\"-\"", "{\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }", "int a1 = q.pop();", "a1", "q.pop()", "q.pop", "q", "int a2 = q.pop();", "a2", "q.pop()", "q.pop", "q", "q.add(a2 - a1)", "q.add", "q", "a2 - a1", "a2", "a1", "continue;", "if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }", "str[i].equals(\"*\")", "str[i].equals", "str[i]", "str", "i", "\"*\"", "{\n q.add(q.pop() * q.pop());\n continue;\n }", "q.add(q.pop() * q.pop())", "q.add", "q", "q.pop() * q.pop()", "q.pop()", "q.pop", "q", "q.pop()", "q.pop", "q", "continue;", "q.push(Integer.parseInt(str[i]))", "q.push", "q", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "System.out.println(q.pop())", "System.out.println", "System.out", "System", "System.out", "q.pop()", "q.pop", "q", "String args[]", "args", "public class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\"\\\\s\");\n Stack<Integer> q = new Stack<Integer>();\n for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }\n System.out.println(q.pop());\n }\n}", "public class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\"\\\\s\");\n Stack<Integer> q = new Stack<Integer>();\n for (int i = 0; i < str.length; i++) {\n if (str[i].equals(\"+\")) {\n q.add(q.pop() + q.pop());\n continue;\n }\n if (str[i].equals(\"-\")) {\n\t\tint a1 = q.pop();\n\t\tint a2 = q.pop();\n q.add(a2 - a1);\n continue;\n }\n if (str[i].equals(\"*\")) {\n q.add(q.pop() * q.pop());\n continue;\n }\n q.push(Integer.parseInt(str[i]));\n }\n System.out.println(q.pop());\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split("\\s"); Stack<Integer> q = new Stack<Integer>(); for (int i = 0; i < str.length; i++) { if (str[i].equals("+")) { q.add(q.pop() + q.pop()); continue; } if (str[i].equals("-")) { int a1 = q.pop(); int a2 = q.pop(); q.add(a2 - a1); continue; } if (str[i].equals("*")) { q.add(q.pop() * q.pop()); continue; } q.push(Integer.parseInt(str[i])); } System.out.println(q.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 17, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 13, 17, 14, 4, 18, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 13, 17, 14, 4, 18, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 0, 13, 17, 30, 0, 18, 13, 40, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 18, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 133, 5 ], [ 133, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 21, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 25, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 32, 35 ], [ 31, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 37, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 43, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 36, 54 ], [ 54, 55 ], [ 54, 56 ], [ 31, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 57, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 63, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 69, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 62, 80 ], [ 80, 81 ], [ 80, 82 ], [ 57, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 83, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 92, 94 ], [ 89, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 103, 105 ], [ 88, 106 ], [ 106, 107 ], [ 106, 108 ], [ 83, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 110, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 8, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 124, 126 ], [ 8, 127 ], [ 127, 128 ], [ 128, 129 ], [ 6, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint[] stack=new int[100];\n\t\tint stackPointer=0;\n\t\tString s;\n\t\twhile(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack[0]);\n\t\tscan.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint[] stack=new int[100];\n\t\tint stackPointer=0;\n\t\tString s;\n\t\twhile(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack[0]);\n\t\tscan.close();\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint[] stack=new int[100];\n\t\tint stackPointer=0;\n\t\tString s;\n\t\twhile(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack[0]);\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint[] stack=new int[100];\n\t\tint stackPointer=0;\n\t\tString s;\n\t\twhile(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack[0]);\n\t\tscan.close();\n\t}", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "int[] stack=new int[100];", "stack", "new int[100]", "100", "int stackPointer=0;", "stackPointer", "0", "String s;", "s", "while(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}", "scan.hasNext()", "scan.hasNext", "scan", "{\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}", "s=scan.next()", "s", "scan.next()", "scan.next", "scan", "if(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}", "stack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1]", "stack[stackPointer-2]", "stack", "stackPointer-2", "stackPointer", "2", "stack[stackPointer-2]+stack[stackPointer-1]", "stack[stackPointer-2]", "stack", "stackPointer-2", "stackPointer", "2", "stack[stackPointer-1]", "stack", "stackPointer-1", "stackPointer", "1", "stackPointer-=1", "stackPointer", "1", "if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}", "stack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1]", "stack[stackPointer-2]", "stack", "stackPointer-2", "stackPointer", "2", "stack[stackPointer-2]-stack[stackPointer-1]", "stack[stackPointer-2]", "stack", "stackPointer-2", "stackPointer", "2", "stack[stackPointer-1]", "stack", "stackPointer-1", "stackPointer", "1", "stackPointer-=1", "stackPointer", "1", "if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}", "stack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1]", "stack[stackPointer-2]", "stack", "stackPointer-2", "stackPointer", "2", "stack[stackPointer-2]*stack[stackPointer-1]", "stack[stackPointer-2]", "stack", "stackPointer-2", "stackPointer", "2", "stack[stackPointer-1]", "stack", "stackPointer-1", "stackPointer", "1", "stackPointer-=1", "stackPointer", "1", "{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}", "stack[stackPointer++]=Integer.parseInt(s)", "stack[stackPointer++]", "stack", "stackPointer++", "stackPointer", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "System.out.println(stack[0])", "System.out.println", "System.out", "System", "System.out", "stack[0]", "stack", "0", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint[] stack=new int[100];\n\t\tint stackPointer=0;\n\t\tString s;\n\t\twhile(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack[0]);\n\t\tscan.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tint[] stack=new int[100];\n\t\tint stackPointer=0;\n\t\tString s;\n\t\twhile(scan.hasNext()){\n\t\t\ts=scan.next();\n\t\t\tif(s.equals(\"+\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}else if(s.equals(\"-\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse if(s.equals(\"*\")){\n\t\t\t\tstack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1];\n\t\t\t\tstackPointer-=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstack[stackPointer++]=Integer.parseInt(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack[0]);\n\t\tscan.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan=new Scanner(System.in); int[] stack=new int[100]; int stackPointer=0; String s; while(scan.hasNext()){ s=scan.next(); if(s.equals("+")){ stack[stackPointer-2]=stack[stackPointer-2]+stack[stackPointer-1]; stackPointer-=1; }else if(s.equals("-")){ stack[stackPointer-2]=stack[stackPointer-2]-stack[stackPointer-1]; stackPointer-=1; } else if(s.equals("*")){ stack[stackPointer-2]=stack[stackPointer-2]*stack[stackPointer-1]; stackPointer-=1; } else{ stack[stackPointer++]=Integer.parseInt(s); } } System.out.println(stack[0]); scan.close(); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 20, 17, 12, 13, 30, 40, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 2, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 0, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 30, 4, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 143, 5 ], [ 143, 6 ], [ 6, 7 ], [ 143, 8 ], [ 8, 9 ], [ 8, 10 ], [ 143, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 12, 22 ], [ 22, 23 ], [ 143, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 32, 34 ], [ 143, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 37, 43 ], [ 43, 44 ], [ 37, 45 ], [ 45, 46 ], [ 37, 47 ], [ 47, 48 ], [ 47, 49 ], [ 37, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 50, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 54, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 61, 66 ], [ 60, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 67, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 60, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 82, 87 ], [ 81, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 88, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 88, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 81, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 103, 108 ], [ 102, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 109, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 109, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 102, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 37, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 37, 137 ], [ 137, 138 ], [ 138, 139 ], [ 35, 140 ], [ 140, 141 ], [ 0, 142 ], [ 142, 143 ], [ 142, 144 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tstatic int top;\n\tstatic int[] S = new int[1000];\n\n\tpublic static void push(int x) {\n\t\ttop++;\n\t\tS[top] = x;\n\t}\n\n\tpublic static int pop() {\n\t\ttop--;\n\t\treturn S[top + 1];\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tString s;\n\t\ttop = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t\tsc.close();\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tstatic int top;\n\tstatic int[] S = new int[1000];\n\n\tpublic static void push(int x) {\n\t\ttop++;\n\t\tS[top] = x;\n\t}\n\n\tpublic static int pop() {\n\t\ttop--;\n\t\treturn S[top + 1];\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tString s;\n\t\ttop = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t\tsc.close();\n\t}\n}", "Main", "static int top;", "top", "static int[] S = new int[1000];", "S", "new int[1000]", "1000", "public static void push(int x) {\n\t\ttop++;\n\t\tS[top] = x;\n\t}", "push", "{\n\t\ttop++;\n\t\tS[top] = x;\n\t}", "top++", "top", "S[top] = x", "S[top]", "S", "top", "x", "int x", "x", "public static int pop() {\n\t\ttop--;\n\t\treturn S[top + 1];\n\t}", "pop", "{\n\t\ttop--;\n\t\treturn S[top + 1];\n\t}", "top--", "top", "return S[top + 1];", "S[top + 1]", "S", "top + 1", "top", "1", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tString s;\n\t\ttop = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tString s;\n\t\ttop = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a", "a", "b;", "b", "String s;", "s", "top = 0", "top", "0", "while (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}", "s = sc.next()", "s", "sc.next()", "sc.next", "sc", "if (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}", "s.charAt(0) == '+'", "s.charAt(0)", "s.charAt", "s", "0", "'+'", "{\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t}", "b = pop()", "b", "pop()", "pop", "a = pop()", "a", "pop()", "pop", "push(a + b)", "push", "a + b", "a", "b", "if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}", "s.charAt(0) == '-'", "s.charAt(0)", "s.charAt", "s", "0", "'-'", "{\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t}", "b = pop()", "b", "pop()", "pop", "a = pop()", "a", "pop()", "pop", "push(a - b)", "push", "a - b", "a", "b", "if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}", "s.charAt(0) == '*'", "s.charAt(0)", "s.charAt", "s", "0", "'*'", "{\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t}", "b = pop()", "b", "pop()", "pop", "a = pop()", "a", "pop()", "pop", "push(a * b)", "push", "a * b", "a", "b", "{\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}", "push(Integer.parseInt(s))", "push", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "System.out.println(pop())", "System.out.println", "System.out", "System", "System.out", "pop()", "pop", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n\tstatic int top;\n\tstatic int[] S = new int[1000];\n\n\tpublic static void push(int x) {\n\t\ttop++;\n\t\tS[top] = x;\n\t}\n\n\tpublic static int pop() {\n\t\ttop--;\n\t\treturn S[top + 1];\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tString s;\n\t\ttop = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t\tsc.close();\n\t}\n}", "public class Main {\n\n\tstatic int top;\n\tstatic int[] S = new int[1000];\n\n\tpublic static void push(int x) {\n\t\ttop++;\n\t\tS[top] = x;\n\t}\n\n\tpublic static int pop() {\n\t\ttop--;\n\t\treturn S[top + 1];\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tString s;\n\t\ttop = 0;\n\t\twhile (sc.hasNext()) {\n\t\t\ts = sc.next();\n\t\t\tif (s.charAt(0) == '+') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a + b);\n\t\t\t} else if (s.charAt(0) == '-') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a - b);\n\t\t\t} else if (s.charAt(0) == '*') {\n\t\t\t\tb = pop();\n\t\t\t\ta = pop();\n\t\t\t\tpush(a * b);\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static int top; static int[] S = new int[1000]; public static void push(int x) { top++; S[top] = x; } public static int pop() { top--; return S[top + 1]; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a, b; String s; top = 0; while (sc.hasNext()) { s = sc.next(); if (s.charAt(0) == '+') { b = pop(); a = pop(); push(a + b); } else if (s.charAt(0) == '-') { b = pop(); a = pop(); push(a - b); } else if (s.charAt(0) == '*') { b = pop(); a = pop(); push(a * b); } else { push(Integer.parseInt(s)); } } System.out.println(pop()); sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 18, 13, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 151, 11 ], [ 151, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 47, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 47, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 46, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 47, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 44, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 72, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 83, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 99, 106 ], [ 83, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 109, 116 ], [ 83, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 119, 126 ], [ 44, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 134, 136 ], [ 14, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 137, 142 ], [ 142, 143 ], [ 143, 144 ], [ 14, 145 ], [ 145, 146 ], [ 146, 147 ], [ 12, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ] ]
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] input = scan.nextLine().split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tfor(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t\tscan.close();\n\t}\n}", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] input = scan.nextLine().split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tfor(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t\tscan.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] input = scan.nextLine().split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tfor(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] input = scan.nextLine().split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tfor(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "String[] input = scan.nextLine().split(\" \");", "input", "scan.nextLine().split(\" \")", "scan.nextLine().split", "scan.nextLine()", "scan.nextLine", "scan", "\" \"", "Deque<Integer> stack = new ArrayDeque<Integer>();", "stack", "new ArrayDeque<Integer>()", "for(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < input.length", "i", "input.length", "input", "input.length", "i++", "i++", "i", "{\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}", "{\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}", "if(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}", "input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")", "input[i].equals(\"*\")", "input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")", "input[i].equals(\"+\")", "input[i].equals", "input[i]", "input", "i", "\"+\"", "input[i].equals(\"-\")", "input[i].equals", "input[i]", "input", "i", "\"-\"", "input[i].equals(\"*\")", "input[i].equals", "input[i]", "input", "i", "\"*\"", "input[i].equals(\"/\")", "input[i].equals", "input[i]", "input", "i", "\"/\"", "{\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t}", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "switch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "input[i]", "input", "i", "case \"+\":", "\"+\"", "case \"+\":", "stack.push(a + b)", "stack.push", "stack", "a + b", "a", "b", "break;", "case \"-\":", "\"-\"", "case \"-\":", "stack.push(a - b)", "stack.push", "stack", "a - b", "a", "b", "break;", "case \"*\":", "\"*\"", "case \"*\":", "stack.push(a * b)", "stack.push", "stack", "a * b", "a", "b", "break;", "case \"/\":", "\"/\"", "case \"/\":", "stack.push(a / b)", "stack.push", "stack", "a / b", "a", "b", "break;", "{\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}", "stack.push(Integer.parseInt(input[i]))", "stack.push", "stack", "Integer.parseInt(input[i])", "Integer.parseInt", "Integer", "input[i]", "input", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "scan.close()", "scan.close", "scan", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] input = scan.nextLine().split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tfor(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t\tscan.close();\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString[] input = scan.nextLine().split(\" \");\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tfor(int i = 0; i < input.length; i++) {\n\t\t\tif(input[i].equals(\"+\") || input[i].equals(\"-\")\n\t\t\t\t\t|| input[i].equals(\"*\") || input[i].equals(\"/\")) {\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tswitch(input[i]) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"/\":\n\t\t\t\t\tstack.push(a / b);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tstack.push(Integer.parseInt(input[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t\tscan.close();\n\t}\n}", "Main" ]
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String[] input = scan.nextLine().split(" "); Deque<Integer> stack = new ArrayDeque<Integer>(); for(int i = 0; i < input.length; i++) { if(input[i].equals("+") || input[i].equals("-") || input[i].equals("*") || input[i].equals("/")) { int b = stack.pop(); int a = stack.pop(); switch(input[i]) { case "+": stack.push(a + b); break; case "-": stack.push(a - b); break; case "*": stack.push(a * b); break; case "/": stack.push(a / b); break; } } else { stack.push(Integer.parseInt(input[i])); } } System.out.println(stack.pop()); scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 145, 8 ], [ 145, 9 ], [ 9, 10 ], [ 9, 11 ], [ 145, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 20, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 28, 38 ], [ 38, 39 ], [ 39, 40 ], [ 28, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 43, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 50, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 50, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 43, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 70, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 77, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 77, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 77, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 70, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 97, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 104, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 104, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 104, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 97, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 125, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 131, 133 ], [ 14, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 139, 140 ], [ 140, 141 ], [ 12, 142 ], [ 142, 143 ], [ 0, 144 ], [ 144, 145 ], [ 144, 146 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n static Stack<Integer> stack = new Stack<>();\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String[] split = sc.nextLine().trim().split(\" \");\n for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }\n System.out.println(stack.pop());\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n static Stack<Integer> stack = new Stack<>();\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String[] split = sc.nextLine().trim().split(\" \");\n for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }\n System.out.println(stack.pop());\n }\n\n}", "Main", "static Stack<Integer> stack = new Stack<>();", "stack", "new Stack<>()", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String[] split = sc.nextLine().trim().split(\" \");\n for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }\n System.out.println(stack.pop());\n }", "main", "{\n\n Scanner sc = new Scanner(System.in);\n String[] split = sc.nextLine().trim().split(\" \");\n for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }\n System.out.println(stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String[] split = sc.nextLine().trim().split(\" \");", "split", "sc.nextLine().trim().split(\" \")", "sc.nextLine().trim().split", "sc.nextLine().trim()", "sc.nextLine().trim", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < split.length", "i", "split.length", "split", "split.length", "i++", "i++", "i", "{\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }", "{\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }", "if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }", "split[i].equals(\"+\")", "split[i].equals", "split[i]", "split", "i", "\"+\"", "{\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }", "Integer pop1 = stack.pop();", "pop1", "stack.pop()", "stack.pop", "stack", "Integer pop2 = stack.pop();", "pop2", "stack.pop()", "stack.pop", "stack", "int i1 =pop1 +pop2;", "i1", "pop1 +pop2", "pop1", "pop2", "stack.push(i1)", "stack.push", "stack", "i1", "if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }", "split[i].equals(\"-\")", "split[i].equals", "split[i]", "split", "i", "\"-\"", "{\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }", "Integer pop1 = stack.pop();", "pop1", "stack.pop()", "stack.pop", "stack", "Integer pop2 = stack.pop();", "pop2", "stack.pop()", "stack.pop", "stack", "int i1 =pop2 -pop1;", "i1", "pop2 -pop1", "pop2", "pop1", "stack.push(i1)", "stack.push", "stack", "i1", "if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }", "split[i].equals(\"*\")", "split[i].equals", "split[i]", "split", "i", "\"*\"", "{\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }", "Integer pop1 = stack.pop();", "pop1", "stack.pop()", "stack.pop", "stack", "Integer pop2 = stack.pop();", "pop2", "stack.pop()", "stack.pop", "stack", "int i1 =pop1 *pop2;", "i1", "pop1 *pop2", "pop1", "pop2", "stack.push(i1)", "stack.push", "stack", "i1", "{\n stack.push(Integer.parseInt(split[i]));\n }", "stack.push(Integer.parseInt(split[i]))", "stack.push", "stack", "Integer.parseInt(split[i])", "Integer.parseInt", "Integer", "split[i]", "split", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n static Stack<Integer> stack = new Stack<>();\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String[] split = sc.nextLine().trim().split(\" \");\n for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }\n System.out.println(stack.pop());\n }\n\n}", "public class Main {\n static Stack<Integer> stack = new Stack<>();\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String[] split = sc.nextLine().trim().split(\" \");\n for (int i = 0; i < split.length; i++) {\n if (split[i].equals(\"+\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 +pop2;\n stack.push(i1);\n }\n else if (split[i].equals(\"-\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop2 -pop1;\n stack.push(i1);\n }\n else if (split[i].equals(\"*\")) {\n Integer pop1 = stack.pop();\n Integer pop2 = stack.pop();\n int i1 =pop1 *pop2;\n stack.push(i1);\n }else {\n stack.push(Integer.parseInt(split[i]));\n }\n }\n System.out.println(stack.pop());\n }\n\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { static Stack<Integer> stack = new Stack<>(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] split = sc.nextLine().trim().split(" "); for (int i = 0; i < split.length; i++) { if (split[i].equals("+")) { Integer pop1 = stack.pop(); Integer pop2 = stack.pop(); int i1 =pop1 +pop2; stack.push(i1); } else if (split[i].equals("-")) { Integer pop1 = stack.pop(); Integer pop2 = stack.pop(); int i1 =pop2 -pop1; stack.push(i1); } else if (split[i].equals("*")) { Integer pop1 = stack.pop(); Integer pop2 = stack.pop(); int i1 =pop1 *pop2; stack.push(i1); }else { stack.push(Integer.parseInt(split[i])); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 41, 13, 4, 18, 13, 18, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 17, 41, 13, 12, 13, 30, 0, 13, 20, 13, 23, 13, 12, 13, 30, 40, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 40, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 179, 5 ], [ 179, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 26, 36 ], [ 36, 37 ], [ 37, 38 ], [ 26, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 41, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 48, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 62, 63 ], [ 62, 64 ], [ 48, 65 ], [ 40, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 66, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 73, 90 ], [ 40, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 91, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 98, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 98, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 98, 115 ], [ 40, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 121, 123 ], [ 40, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 8, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 134, 135 ], [ 6, 136 ], [ 136, 137 ], [ 0, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 140, 142 ], [ 138, 143 ], [ 143, 144 ], [ 138, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 145, 152 ], [ 152, 153 ], [ 138, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 156, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 154, 164 ], [ 164, 165 ], [ 138, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 171, 173 ], [ 168, 174 ], [ 174, 175 ], [ 168, 176 ], [ 176, 177 ], [ 0, 178 ], [ 178, 179 ], [ 178, 180 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString string = sc.nextLine();\n\t\tString[] a = string.split(\" \");\n\n\t\tPoppin poppin = new Poppin(1000);\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}\n\n\t\tSystem.out.println(poppin.pop());\n\n\t}\n\n}\n\nclass Poppin {\n\tint top = 0;\n\tint[] a;\n\n\tpublic Poppin(int n) {\n\t\ta = new int[n];\n\t}\n\n\tvoid add(int x) {\n\t\ttop++;\n\t\ta[top] = x;\n\n\t}\n\n\tint pop() {\n\t\tint x = a[top];\n\t\ttop--;\n\t\treturn x;\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString string = sc.nextLine();\n\t\tString[] a = string.split(\" \");\n\n\t\tPoppin poppin = new Poppin(1000);\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}\n\n\t\tSystem.out.println(poppin.pop());\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString string = sc.nextLine();\n\t\tString[] a = string.split(\" \");\n\n\t\tPoppin poppin = new Poppin(1000);\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}\n\n\t\tSystem.out.println(poppin.pop());\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString string = sc.nextLine();\n\t\tString[] a = string.split(\" \");\n\n\t\tPoppin poppin = new Poppin(1000);\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}\n\n\t\tSystem.out.println(poppin.pop());\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String string = sc.nextLine();", "string", "sc.nextLine()", "sc.nextLine", "sc", "String[] a = string.split(\" \");", "a", "string.split(\" \")", "string.split", "string", "\" \"", "Poppin poppin = new Poppin(1000);", "poppin", "new Poppin(1000)", "for (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < a.length", "i", "a.length", "a", "a.length", "i++", "i++", "i", "{\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}", "{\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}", "if (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}", "a[i].equals(\"+\")", "a[i].equals", "a[i]", "a", "i", "\"+\"", "{\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}", "int p = poppin.pop();", "p", "poppin.pop()", "poppin.pop", "poppin", "int q = poppin.pop();", "q", "poppin.pop()", "poppin.pop", "poppin", "poppin.add(p + q)", "poppin.add", "poppin", "p + q", "p", "q", "continue;", "if (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}", "a[i].equals(\"-\")", "a[i].equals", "a[i]", "a", "i", "\"-\"", "{\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}", "int p = poppin.pop();", "p", "poppin.pop()", "poppin.pop", "poppin", "int q = poppin.pop();", "q", "poppin.pop()", "poppin.pop", "poppin", "poppin.add(q - p)", "poppin.add", "poppin", "q - p", "q", "p", "continue;", "if (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}", "a[i].equals(\"*\")", "a[i].equals", "a[i]", "a", "i", "\"*\"", "{\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}", "int p = poppin.pop();", "p", "poppin.pop()", "poppin.pop", "poppin", "int q = poppin.pop();", "q", "poppin.pop()", "poppin.pop", "poppin", "poppin.add(p * q)", "poppin.add", "poppin", "p * q", "p", "q", "continue;", "int n = Integer.parseInt(a[i]);", "n", "Integer.parseInt(a[i])", "Integer.parseInt", "Integer", "a[i]", "a", "i", "poppin.add(n)", "poppin.add", "poppin", "n", "System.out.println(poppin.pop())", "System.out.println", "System.out", "System", "System.out", "poppin.pop()", "poppin.pop", "poppin", "String[] args", "args", "class Poppin {\n\tint top = 0;\n\tint[] a;\n\n\tpublic Poppin(int n) {\n\t\ta = new int[n];\n\t}\n\n\tvoid add(int x) {\n\t\ttop++;\n\t\ta[top] = x;\n\n\t}\n\n\tint pop() {\n\t\tint x = a[top];\n\t\ttop--;\n\t\treturn x;\n\t}\n}", "Poppin", "int top = 0;", "top", "0", "int[] a;", "a", "public Poppin(int n) {\n\t\ta = new int[n];\n\t}", "Poppin", "{\n\t\ta = new int[n];\n\t}", "a = new int[n]", "a", "new int[n]", "n", "int n", "n", "void add(int x) {\n\t\ttop++;\n\t\ta[top] = x;\n\n\t}", "add", "{\n\t\ttop++;\n\t\ta[top] = x;\n\n\t}", "top++", "top", "a[top] = x", "a[top]", "a", "top", "x", "int x", "x", "int pop() {\n\t\tint x = a[top];\n\t\ttop--;\n\t\treturn x;\n\t}", "pop", "{\n\t\tint x = a[top];\n\t\ttop--;\n\t\treturn x;\n\t}", "int x = a[top];", "x", "a[top]", "a", "top", "top--", "top", "return x;", "x", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString string = sc.nextLine();\n\t\tString[] a = string.split(\" \");\n\n\t\tPoppin poppin = new Poppin(1000);\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}\n\n\t\tSystem.out.println(poppin.pop());\n\n\t}\n\n}", "public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString string = sc.nextLine();\n\t\tString[] a = string.split(\" \");\n\n\t\tPoppin poppin = new Poppin(1000);\n\n\t\tfor (int i = 0; i < a.length; i++) {\n\n\t\t\tif (a[i].equals(\"+\")) {\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p + q);\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tif (a[i].equals(\"-\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(q - p);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (a[i].equals(\"*\")) {\n\n\t\t\t\tint p = poppin.pop();\n\t\t\t\tint q = poppin.pop();\n\t\t\t\tpoppin.add(p * q);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tint n = Integer.parseInt(a[i]);\n\t\t\tpoppin.add(n);\n\n\t\t}\n\n\t\tSystem.out.println(poppin.pop());\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); String string = sc.nextLine(); String[] a = string.split(" "); Poppin poppin = new Poppin(1000); for (int i = 0; i < a.length; i++) { if (a[i].equals("+")) { int p = poppin.pop(); int q = poppin.pop(); poppin.add(p + q); continue; } if (a[i].equals("-")) { int p = poppin.pop(); int q = poppin.pop(); poppin.add(q - p); continue; } if (a[i].equals("*")) { int p = poppin.pop(); int q = poppin.pop(); poppin.add(p * q); continue; } int n = Integer.parseInt(a[i]); poppin.add(n); } System.out.println(poppin.pop()); } } class Poppin { int top = 0; int[] a; public Poppin(int n) { a = new int[n]; } void add(int x) { top++; a[top] = x; } int pop() { int x = a[top]; top--; return x; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 28, 13, 4, 18, 13, 17, 30, 30, 14, 2, 2, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 30, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 135, 8 ], [ 135, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 11, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 27, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 37, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 37, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 35, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 55, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 55, 72 ], [ 51, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 75, 92 ], [ 51, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 95, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 95, 112 ], [ 35, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 11, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 127, 128 ], [ 11, 129 ], [ 129, 130 ], [ 130, 131 ], [ 9, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tString str = sc.nextLine();\n\t\tint x, y;\n\t\tfor (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.pop());\n\t\tsc.close();\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tString str = sc.nextLine();\n\t\tint x, y;\n\t\tfor (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.pop());\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tString str = sc.nextLine();\n\t\tint x, y;\n\t\tfor (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.pop());\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tString str = sc.nextLine();\n\t\tint x, y;\n\t\tfor (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.pop());\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Stack<Integer> st = new Stack<Integer>();", "st", "new Stack<Integer>()", "String str = sc.nextLine();", "str", "sc.nextLine()", "sc.nextLine", "sc", "int x", "x", "y;", "y", "for (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}", "String s", "str.split(\" \")", "str.split", "str", "\" \"", "{\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}", "{\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}", "if (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}", "s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")", "s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "switch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "s", "case \"+\":", "\"+\"", "case \"+\":", "y = st.pop()", "y", "st.pop()", "st.pop", "st", "x = st.pop()", "x", "st.pop()", "st.pop", "st", "st.push(x + y)", "st.push", "st", "x + y", "x", "y", "break;", "case \"-\":", "\"-\"", "case \"-\":", "y = st.pop()", "y", "st.pop()", "st.pop", "st", "x = st.pop()", "x", "st.pop()", "st.pop", "st", "st.push(x - y)", "st.push", "st", "x - y", "x", "y", "break;", "case \"*\":", "\"*\"", "case \"*\":", "y = st.pop()", "y", "st.pop()", "st.pop", "st", "x = st.pop()", "x", "st.pop()", "st.pop", "st", "st.push(x * y)", "st.push", "st", "x * y", "x", "y", "break;", "{\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}", "st.push(Integer.parseInt(s))", "st.push", "st", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "System.out.println(st.pop())", "System.out.println", "System.out", "System", "System.out", "st.pop()", "st.pop", "st", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tString str = sc.nextLine();\n\t\tint x, y;\n\t\tfor (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.pop());\n\t\tsc.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tString str = sc.nextLine();\n\t\tint x, y;\n\t\tfor (String s : str.split(\" \")) {\n\t\t\tif (s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")) {\n\t\t\t\tswitch (s) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x + y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x - y);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ty = st.pop();\n\t\t\t\t\tx = st.pop();\n\t\t\t\t\tst.push(x * y);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tst.push(Integer.parseInt(s));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.pop());\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Stack<Integer> st = new Stack<Integer>(); String str = sc.nextLine(); int x, y; for (String s : str.split(" ")) { if (s.equals("+") || s.equals("-") || s.equals("*")) { switch (s) { case "+": y = st.pop(); x = st.pop(); st.push(x + y); break; case "-": y = st.pop(); x = st.pop(); st.push(x - y); break; case "*": y = st.pop(); x = st.pop(); st.push(x * y); break; } } else { st.push(Integer.parseInt(s)); } } System.out.println(st.pop()); sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 20, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 17, 41, 13, 17, 42, 2, 2, 2, 13, 13, 2, 18, 13, 13, 17, 2, 18, 13, 13, 17, 30, 0, 13, 17, 0, 13, 2, 18, 13, 13, 17, 40, 13, 0, 13, 17, 14, 13, 30, 40, 13, 4, 18, 13, 13, 14, 2, 2, 2, 2, 18, 13, 13, 17, 2, 18, 13, 13, 17, 2, 18, 13, 13, 17, 2, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 18, 13, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 1, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 17, 41, 13, 20, 17, 41, 13, 17, 12, 13, 30, 0, 13, 17, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 2, 13, 17, 12, 13, 30, 40, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 2, 13, 17 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 26, 34 ], [ 34, 35 ], [ 34, 36 ], [ 26, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 26, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 26, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 26, 52 ], [ 52, 53 ], [ 52, 54 ], [ 26, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 67, 74 ], [ 74, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 76, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 74, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 90, 101 ], [ 101, 102 ], [ 90, 103 ], [ 103, 104 ], [ 103, 105 ], [ 67, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 106, 115 ], [ 115, 116 ], [ 118, 117 ], [ 129, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 119, 123 ], [ 118, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 129, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 118, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 134, 138 ], [ 115, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 139, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 139, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 150, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 160, 161 ], [ 160, 162 ], [ 156, 163 ], [ 150, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 167, 170 ], [ 170, 171 ], [ 170, 172 ], [ 166, 173 ], [ 150, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 177, 180 ], [ 180, 181 ], [ 180, 182 ], [ 176, 183 ], [ 150, 184 ], [ 184, 185 ], [ 184, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 187, 190 ], [ 190, 191 ], [ 190, 192 ], [ 186, 193 ], [ 150, 194 ], [ 194, 195 ], [ 195, 196 ], [ 26, 197 ], [ 197, 198 ], [ 198, 199 ], [ 199, 200 ], [ 199, 201 ], [ 197, 202 ], [ 202, 203 ], [ 203, 204 ], [ 24, 205 ], [ 205, 206 ], [ 0, 207 ], [ 207, 208 ], [ 207, 209 ], [ 209, 210 ], [ 209, 211 ], [ 207, 212 ], [ 212, 213 ], [ 212, 214 ], [ 207, 216 ], [ 216, 217 ], [ 216, 218 ], [ 207, 219 ], [ 219, 220 ], [ 219, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 207, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 229, 231 ], [ 207, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 235, 236 ], [ 236, 237 ], [ 236, 238 ], [ 238, 239 ], [ 238, 240 ], [ 207, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 244, 245 ], [ 243, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 246, 250 ], [ 241, 251 ], [ 251, 252 ], [ 207, 253 ], [ 253, 254 ], [ 253, 255 ], [ 255, 256 ], [ 256, 257 ], [ 255, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 261, 263 ] ]
[ "import java.util.StringTokenizer;\nimport java.io.BufferedReader;\nimport java.io.InputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint x;\n\tString s; \n\tStack stack = new Stack();\n\ts = sc.nextLine();\n\tchar[] str = s.toCharArray();\n\tint len = s.length();\n\tint num = 0;\n\tfor(int i = 0;i < len;i++){\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}\n\tSystem.out.println((int)stack.pop());\n }\n}\n\n\nclass Stack{\n private int top = 0;\n private int[] S = new int[200]; \n private static final int MAX = 10;\n public void initialize(){\n\ttop = 0;\n }\n public boolean isEmpty(){\n\treturn top == 0;\n }\n public boolean isFull(){\n \treturn top >= MAX - 1;\n }\n public void push(int x){\n \t/*if(isFull()){\n\t System.out.println(\"Stack over flow\");\n \t}*/\n \ttop++;\n \tS[top] = x;\n }\n public int pop(){\n\t/*if(isEmpty()){\n\t throw new RuntimeException(\"Stack under flow\");\n\t}*/\n\ttop--;\n\treturn S[top + 1];\n\t\n }\n \n}", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint x;\n\tString s; \n\tStack stack = new Stack();\n\ts = sc.nextLine();\n\tchar[] str = s.toCharArray();\n\tint len = s.length();\n\tint num = 0;\n\tfor(int i = 0;i < len;i++){\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}\n\tSystem.out.println((int)stack.pop());\n }\n}", "Main", "public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint x;\n\tString s; \n\tStack stack = new Stack();\n\ts = sc.nextLine();\n\tchar[] str = s.toCharArray();\n\tint len = s.length();\n\tint num = 0;\n\tfor(int i = 0;i < len;i++){\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}\n\tSystem.out.println((int)stack.pop());\n }", "main", "{\n\tScanner sc = new Scanner(System.in);\n\tint x;\n\tString s; \n\tStack stack = new Stack();\n\ts = sc.nextLine();\n\tchar[] str = s.toCharArray();\n\tint len = s.length();\n\tint num = 0;\n\tfor(int i = 0;i < len;i++){\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}\n\tSystem.out.println((int)stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x;", "x", "String s;", "s", "Stack stack = new Stack();", "stack", "new Stack()", "s = sc.nextLine()", "s", "sc.nextLine()", "sc.nextLine", "sc", "char[] str = s.toCharArray();", "str", "s.toCharArray()", "s.toCharArray", "s", "int len = s.length();", "len", "s.length()", "s.length", "s", "int num = 0;", "num", "0", "for(int i = 0;i < len;i++){\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}", "int i = 0;", "int i = 0;", "i", "0", "i < len", "i", "len", "i++", "i++", "i", "{\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}", "{\n\t num = 0;\n\t boolean f = false;\n\t while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }\n\t if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }\n\t}", "num = 0", "num", "0", "boolean f = false;", "f", "false", "while(i < len && str[i] <= '9' && str[i] >= '0'){\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }", "i < len && str[i] <= '9' && str[i] >= '0'", "i < len && str[i] <= '9' && str[i] >= '0'", "i < len", "i", "len", "str[i] <= '9'", "str[i]", "str", "i", "'9'", "str[i] >= '0'", "str[i]", "str", "i", "'0'", "{\n\t\tnum *= 10;\n\t\tnum += str[i] - '0';\n\t\ti++;\n\t\tf = true;\n\t }", "num *= 10", "num", "10", "num += str[i] - '0'", "num", "str[i] - '0'", "str[i]", "str", "i", "'0'", "i++", "i", "f = true", "f", "true", "if(f){\n\t\ti--;\n\t\tstack.push(num);\n\t }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }", "f", "{\n\t\ti--;\n\t\tstack.push(num);\n\t }", "i--", "i", "stack.push(num)", "stack.push", "stack", "num", "if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }", "str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'", "str[i]=='*'", "str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'", "str[i]=='+'", "str[i]", "str", "i", "'+'", "str[i]=='-'", "str[i]", "str", "i", "'-'", "str[i]=='*'", "str[i]", "str", "i", "'*'", "str[i]=='/'", "str[i]", "str", "i", "'/'", "{\n\t\tint b = (int)stack.pop();\n\t\tint a = (int)stack.pop();\n\t\tswitch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}\n\t }", "int b = (int)stack.pop();", "b", "(int)stack.pop()", "stack.pop", "stack", "int a = (int)stack.pop();", "a", "(int)stack.pop()", "stack.pop", "stack", "switch(str[i]) {\n\t\tcase '+': stack.push(a + b); break;\n\t\tcase '-': stack.push(a - b); break;\n\t\tcase '*': stack.push(a * b); break;\n\t\tcase '/': stack.push(a / b); break;\n\t\tdefault: break;\n\t\t}", "str[i]", "str", "i", "case '+':", "'+'", "case '+':", "stack.push(a + b)", "stack.push", "stack", "a + b", "a", "b", "break;", "case '-':", "'-'", "case '-':", "stack.push(a - b)", "stack.push", "stack", "a - b", "a", "b", "break;", "case '*':", "'*'", "case '*':", "stack.push(a * b)", "stack.push", "stack", "a * b", "a", "b", "break;", "case '/':", "'/'", "case '/':", "stack.push(a / b)", "stack.push", "stack", "a / b", "a", "b", "break;", "default:", "default:", "break;", "System.out.println((int)stack.pop())", "System.out.println", "System.out", "System", "System.out", "(int)stack.pop()", "stack.pop", "stack", "String[] args", "args", "class Stack{\n private int top = 0;\n private int[] S = new int[200]; \n private static final int MAX = 10;\n public void initialize(){\n\ttop = 0;\n }\n public boolean isEmpty(){\n\treturn top == 0;\n }\n public boolean isFull(){\n \treturn top >= MAX - 1;\n }\n public void push(int x){\n \t/*if(isFull()){\n\t System.out.println(\"Stack over flow\");\n \t}*/\n \ttop++;\n \tS[top] = x;\n }\n public int pop(){\n\t/*if(isEmpty()){\n\t throw new RuntimeException(\"Stack under flow\");\n\t}*/\n\ttop--;\n\treturn S[top + 1];\n\t\n }\n \n}", "Stack", "private int top = 0;", "top", "0", "private int[] S = new int[200];", "S", "new int[200]", "200", "private static final int MAX = 10;", "MAX", "10", "public void initialize(){\n\ttop = 0;\n }", "initialize", "{\n\ttop = 0;\n }", "top = 0", "top", "0", "public boolean isEmpty(){\n\treturn top == 0;\n }", "isEmpty", "{\n\treturn top == 0;\n }", "return top == 0;", "top == 0", "top", "0", "public boolean isFull(){\n \treturn top >= MAX - 1;\n }", "isFull", "{\n \treturn top >= MAX - 1;\n }", "return top >= MAX - 1;", "top >= MAX - 1", "top", "MAX - 1", "MAX", "1", "public void push(int x){\n \t/*if(isFull()){\n\t System.out.println(\"Stack over flow\");\n \t}*/\n \ttop++;\n \tS[top] = x;\n }", "push", "{\n \t/*if(isFull()){\n\t System.out.println(\"Stack over flow\");\n \t}*/\n \ttop++;\n \tS[top] = x;\n }", "top++", "top", "S[top] = x", "S[top]", "S", "top", "x", "int x", "x", "public int pop(){\n\t/*if(isEmpty()){\n\t throw new RuntimeException(\"Stack under flow\");\n\t}*/\n\ttop--;\n\treturn S[top + 1];\n\t\n }", "pop", "{\n\t/*if(isEmpty()){\n\t throw new RuntimeException(\"Stack under flow\");\n\t}*/\n\ttop--;\n\treturn S[top + 1];\n\t\n }", "top--", "top", "return S[top + 1];", "S[top + 1]", "S", "top + 1", "top", "1" ]
import java.util.StringTokenizer; import java.io.BufferedReader; import java.io.InputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x; String s; Stack stack = new Stack(); s = sc.nextLine(); char[] str = s.toCharArray(); int len = s.length(); int num = 0; for(int i = 0;i < len;i++){ num = 0; boolean f = false; while(i < len && str[i] <= '9' && str[i] >= '0'){ num *= 10; num += str[i] - '0'; i++; f = true; } if(f){ i--; stack.push(num); }else if(str[i]=='+' || str[i]=='-' || str[i]=='*' || str[i]=='/'){ int b = (int)stack.pop(); int a = (int)stack.pop(); switch(str[i]) { case '+': stack.push(a + b); break; case '-': stack.push(a - b); break; case '*': stack.push(a * b); break; case '/': stack.push(a / b); break; default: break; } } } System.out.println((int)stack.pop()); } } class Stack{ private int top = 0; private int[] S = new int[200]; private static final int MAX = 10; public void initialize(){ top = 0; } public boolean isEmpty(){ return top == 0; } public boolean isFull(){ return top >= MAX - 1; } public void push(int x){ /*if(isFull()){ System.out.println("Stack over flow"); }*/ top++; S[top] = x; } public int pop(){ /*if(isEmpty()){ throw new RuntimeException("Stack under flow"); }*/ top--; return S[top + 1]; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 29, 17, 30, 4, 18, 13, 13, 29, 17, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 17, 42, 2, 13, 18, 13, 13, 30, 14, 4, 13, 18, 13, 13, 30, 41, 13, 4, 18, 13, 18, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 0, 13, 17, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 187, 8 ], [ 187, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 12, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 18, 23 ], [ 23, 24 ], [ 9, 25 ], [ 25, 26 ], [ 187, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 35, 40 ], [ 29, 41 ], [ 41, 42 ], [ 41, 43 ], [ 29, 44 ], [ 44, 45 ], [ 44, 46 ], [ 29, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 47, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 54, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 60, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 54, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 73, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 80, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 73, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 97, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 104, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 104, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 118, 120 ], [ 97, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 121, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 128, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 128, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 142, 143 ], [ 142, 144 ], [ 121, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 146, 151 ], [ 145, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 152, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 152, 163 ], [ 163, 164 ], [ 164, 165 ], [ 163, 166 ], [ 166, 167 ], [ 166, 168 ], [ 53, 169 ], [ 169, 170 ], [ 169, 171 ], [ 29, 172 ], [ 172, 173 ], [ 173, 174 ], [ 29, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 175, 180 ], [ 180, 181 ], [ 181, 182 ], [ 180, 183 ], [ 27, 184 ], [ 184, 185 ], [ 0, 186 ], [ 186, 187 ], [ 186, 188 ] ]
[ "\nimport java.util.Scanner;\nimport java.util.*;\n\npublic class Main {\n\t\n\tpublic static Boolean isNumeric(String number) {\n\t\ttry {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] opArray = sc.nextLine().split(\" \");\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tint i = 0;\n\t\twhile (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\t\n\n\t\tsc.close();\n\t\tSystem.out.println(st.get(0));\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.*;", "util.*", "java", "public class Main {\n\t\n\tpublic static Boolean isNumeric(String number) {\n\t\ttry {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] opArray = sc.nextLine().split(\" \");\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tint i = 0;\n\t\twhile (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\t\n\n\t\tsc.close();\n\t\tSystem.out.println(st.get(0));\n\t}\n}", "Main", "public static Boolean isNumeric(String number) {\n\t\ttry {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t}", "isNumeric", "{\n\t\ttry {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t}", "try {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}", "catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}", "NumberFormatException e", "{\n\t\t\treturn false;\n\t\t}", "return false;", "false", "{\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}", "Double.parseDouble(number)", "Double.parseDouble", "Double", "number", "return true;", "true", "String number", "number", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] opArray = sc.nextLine().split(\" \");\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tint i = 0;\n\t\twhile (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\t\n\n\t\tsc.close();\n\t\tSystem.out.println(st.get(0));\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] opArray = sc.nextLine().split(\" \");\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tint i = 0;\n\t\twhile (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\t\n\n\t\tsc.close();\n\t\tSystem.out.println(st.get(0));\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String[] opArray = sc.nextLine().split(\" \");", "opArray", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "Stack<Integer> st = new Stack<Integer>();", "st", "new Stack<Integer>()", "int i = 0;", "i", "0", "while (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}", "i < opArray.length", "i", "opArray.length", "opArray", "opArray.length", "{\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}", "if(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}", "isNumeric(opArray[i])", "isNumeric", "opArray[i]", "opArray", "i", "{\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}", "int inputInt = Integer.parseInt(opArray[i]);", "inputInt", "Integer.parseInt(opArray[i])", "Integer.parseInt", "Integer", "opArray[i]", "opArray", "i", "st.push(inputInt)", "st.push", "st", "inputInt", "if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}", "opArray[i].equals(\"+\")", "opArray[i].equals", "opArray[i]", "opArray", "i", "\"+\"", "{\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}", "int r1 = st.pop();", "r1", "st.pop()", "st.pop", "st", "int r2 = st.pop();", "r2", "st.pop()", "st.pop", "st", "st.push(r2 + r1)", "st.push", "st", "r2 + r1", "r2", "r1", "if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}", "opArray[i].equals(\"-\")", "opArray[i].equals", "opArray[i]", "opArray", "i", "\"-\"", "{\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}", "int r1 = st.pop();", "r1", "st.pop()", "st.pop", "st", "int r2 = st.pop();", "r2", "st.pop()", "st.pop", "st", "st.push(r2 - r1)", "st.push", "st", "r2 - r1", "r2", "r1", "if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}", "opArray[i].equals(\"*\")", "opArray[i].equals", "opArray[i]", "opArray", "i", "\"*\"", "{\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}", "int r1 = st.pop();", "r1", "st.pop()", "st.pop", "st", "int r2 = st.pop();", "r2", "st.pop()", "st.pop", "st", "st.push(r2 * r1)", "st.push", "st", "r2 * r1", "r2", "r1", "if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}", "opArray[i].equals(\"/\")", "opArray[i].equals", "opArray[i]", "opArray", "i", "\"/\"", "{\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}", "int r1 = st.pop();", "r1", "st.pop()", "st.pop", "st", "int r2 = st.pop();", "r2", "st.pop()", "st.pop", "st", "st.push(r2 / r1)", "st.push", "st", "r2 / r1", "r2", "r1", "i += 1", "i", "1", "sc.close()", "sc.close", "sc", "System.out.println(st.get(0))", "System.out.println", "System.out", "System", "System.out", "st.get(0)", "st.get", "st", "0", "String[] args", "args", "public class Main {\n\t\n\tpublic static Boolean isNumeric(String number) {\n\t\ttry {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] opArray = sc.nextLine().split(\" \");\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tint i = 0;\n\t\twhile (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\t\n\n\t\tsc.close();\n\t\tSystem.out.println(st.get(0));\n\t}\n}", "public class Main {\n\t\n\tpublic static Boolean isNumeric(String number) {\n\t\ttry {\n\t\t\tDouble.parseDouble(number);\n\t\t\treturn true;\n\t\t}catch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString[] opArray = sc.nextLine().split(\" \");\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tint i = 0;\n\t\twhile (i < opArray.length) {\n\t\t\t//System.out.println(opArray[i]);\n\t\t\tif(isNumeric(opArray[i])) {\n\t\t\t\tint inputInt = Integer.parseInt(opArray[i]);\n\t\t\t\tst.push(inputInt);\n\t\t\t}else if (opArray[i].equals(\"+\")){\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\t\n\t\t\t\tst.push(r2 + r1);\n\t\t\t\t\n\t\t\t}else if (opArray[i].equals(\"-\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 - r1);\n\t\t\t}else if(opArray[i].equals(\"*\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 * r1);\n\t\t\t}else if(opArray[i].equals(\"/\")) {\n\t\t\t\tint r1 = st.pop();\n\t\t\t\t\n\t\t\t\tint r2 = st.pop();\n\t\t\t\tst.push(r2 / r1);\n\t\t\t}\n\t\t\ti += 1;\n\t\t}\n\t\t\n\n\t\tsc.close();\n\t\tSystem.out.println(st.get(0));\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.*; public class Main { public static Boolean isNumeric(String number) { try { Double.parseDouble(number); return true; }catch(NumberFormatException e){ return false; } } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] opArray = sc.nextLine().split(" "); Stack<Integer> st = new Stack<Integer>(); int i = 0; while (i < opArray.length) { //System.out.println(opArray[i]); if(isNumeric(opArray[i])) { int inputInt = Integer.parseInt(opArray[i]); st.push(inputInt); }else if (opArray[i].equals("+")){ int r1 = st.pop(); int r2 = st.pop(); st.push(r2 + r1); }else if (opArray[i].equals("-")) { int r1 = st.pop(); int r2 = st.pop(); st.push(r2 - r1); }else if(opArray[i].equals("*")) { int r1 = st.pop(); int r2 = st.pop(); st.push(r2 * r1); }else if(opArray[i].equals("/")) { int r1 = st.pop(); int r2 = st.pop(); st.push(r2 / r1); } i += 1; } sc.close(); System.out.println(st.get(0)); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 35, 18, 13, 13, 34, 17, 1, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 4, 18, 13, 40, 2, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 4, 18, 13, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 121, 8 ], [ 121, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 9, 26 ], [ 26, 27 ], [ 121, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 34, 44 ], [ 44, 45 ], [ 45, 46 ], [ 34, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 59, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 49, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 69, 81 ], [ 49, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 91, 95 ], [ 95, 96 ], [ 96, 97 ], [ 84, 98 ], [ 49, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 30, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 116, 117 ], [ 28, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] values = scanner.nextLine().split(\" \");\n calcurate(values);\n }\n\n private static void calcurate(String[] values) {\n Stack<Long> stack = new Stack<>();\n\n for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }\n\n System.out.println(stack.pop());\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] values = scanner.nextLine().split(\" \");\n calcurate(values);\n }\n\n private static void calcurate(String[] values) {\n Stack<Long> stack = new Stack<>();\n\n for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] values = scanner.nextLine().split(\" \");\n calcurate(values);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n String[] values = scanner.nextLine().split(\" \");\n calcurate(values);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "String[] values = scanner.nextLine().split(\" \");", "values", "scanner.nextLine().split(\" \")", "scanner.nextLine().split", "scanner.nextLine()", "scanner.nextLine", "scanner", "\" \"", "calcurate(values)", "calcurate", "values", "String[] args", "args", "private static void calcurate(String[] values) {\n Stack<Long> stack = new Stack<>();\n\n for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }\n\n System.out.println(stack.pop());\n }", "calcurate", "{\n Stack<Long> stack = new Stack<>();\n\n for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }\n\n System.out.println(stack.pop());\n }", "Stack<Long> stack = new Stack<>();", "stack", "new Stack<>()", "for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < values.length", "i", "values.length", "values", "values.length", "i++", "i++", "i", "{\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }", "{\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }", "switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }", "values[i]", "values", "i", "case \"+\":", "\"+\"", "case \"+\":", "stack.push(stack.pop() + stack.pop())", "stack.push", "stack", "stack.pop() + stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "break;", "case \"-\":", "\"-\"", "case \"-\":", "stack.push(-(stack.pop() - stack.pop()))", "stack.push", "stack", "-(stack.pop() - stack.pop())", "(stack.pop() - stack.pop())", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "break;", "case \"*\":", "\"*\"", "case \"*\":", "stack.push(Long.valueOf(stack.pop() * stack.pop()))", "stack.push", "stack", "Long.valueOf(stack.pop() * stack.pop())", "Long.valueOf", "Long", "stack.pop() * stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "break;", "default:", "default:", "stack.push(Long.parseLong(values[i]))", "stack.push", "stack", "Long.parseLong(values[i])", "Long.parseLong", "Long", "values[i]", "values", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] values", "values", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] values = scanner.nextLine().split(\" \");\n calcurate(values);\n }\n\n private static void calcurate(String[] values) {\n Stack<Long> stack = new Stack<>();\n\n for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String[] values = scanner.nextLine().split(\" \");\n calcurate(values);\n }\n\n private static void calcurate(String[] values) {\n Stack<Long> stack = new Stack<>();\n\n for (int i = 0; i < values.length; i++) {\n switch (values[i]) {\n case \"+\":\n stack.push(stack.pop() + stack.pop());\n break;\n case \"-\":\n stack.push(-(stack.pop() - stack.pop()));\n break;\n case \"*\":\n stack.push(Long.valueOf(stack.pop() * stack.pop()));\n break;\n default:\n stack.push(Long.parseLong(values[i]));\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String[] values = scanner.nextLine().split(" "); calcurate(values); } private static void calcurate(String[] values) { Stack<Long> stack = new Stack<>(); for (int i = 0; i < values.length; i++) { switch (values[i]) { case "+": stack.push(stack.pop() + stack.pop()); break; case "-": stack.push(-(stack.pop() - stack.pop())); break; case "*": stack.push(Long.valueOf(stack.pop() * stack.pop())); break; default: stack.push(Long.parseLong(values[i])); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 39, 17, 17, 17, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 13, 12, 13, 30, 41, 13, 2, 17, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 13, 12, 13, 30, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 13, 12, 13, 30, 4, 18, 13, 20, 23, 13, 12, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 28, 13, 13, 30, 30, 35, 13, 34, 17, 1, 4, 13, 3, 34, 17, 1, 4, 13, 3, 34, 17, 1, 4, 13, 3, 34, 1, 4, 13, 13, 42, 40, 4, 18, 13, 30, 4, 18, 18, 13, 13, 4, 18, 13, 14, 40, 4, 18, 13, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 11, 13 ], [ 11, 14 ], [ 7, 15 ], [ 15, 16 ], [ 15, 17 ], [ 7, 18 ], [ 18, 19 ], [ 18, 20 ], [ 7, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 23, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 7, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 40, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 40, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 7, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 7, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 74, 81 ], [ 81, 82 ], [ 7, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 88, 93 ], [ 85, 94 ], [ 94, 95 ], [ 94, 96 ], [ 94, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 99, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 99, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 99, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 85, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 124, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 136, 137 ], [ 129, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 138, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 143, 148 ], [ 85, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 83, 154 ], [ 154, 155 ] ]
[ "import java.util.*;\nimport java.io.*;\n\nclass Main{\n static final String[] operator = {\"+\", \"-\", \"*\"};\n static Stack<Integer> stack = new Stack<Integer>();\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n static void doPlus(){\n int a=stack.pop();\n a += stack.pop();\n stack.push(a);\n }\n static void doMinus(){\n int a = 0 - stack.pop();\n a += stack.pop();\n stack.push(a);\n }\n static void doMul(){\n int a=stack.pop();\n a *= stack.pop();\n stack.push(a);\n }\n static void doPop(String i){\n stack.push(new Integer(i));\n }\n public static void main(String[] args) throws IOException{\n String[] elements = br.readLine().split(\" \");\n for(String e : elements){\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }\n while(!stack.empty()){\n System.out.print(stack.pop());\n if(!stack.empty())\n System.out.print(\" \");\n }\n System.out.println();\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "class Main{\n static final String[] operator = {\"+\", \"-\", \"*\"};\n static Stack<Integer> stack = new Stack<Integer>();\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n static void doPlus(){\n int a=stack.pop();\n a += stack.pop();\n stack.push(a);\n }\n static void doMinus(){\n int a = 0 - stack.pop();\n a += stack.pop();\n stack.push(a);\n }\n static void doMul(){\n int a=stack.pop();\n a *= stack.pop();\n stack.push(a);\n }\n static void doPop(String i){\n stack.push(new Integer(i));\n }\n public static void main(String[] args) throws IOException{\n String[] elements = br.readLine().split(\" \");\n for(String e : elements){\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }\n while(!stack.empty()){\n System.out.print(stack.pop());\n if(!stack.empty())\n System.out.print(\" \");\n }\n System.out.println();\n }\n}", "Main", "static final String[] operator = {\"+\", \"-\", \"*\"};", "operator", "{\"+\", \"-\", \"*\"}", "\"+\"", "\"-\"", "\"*\"", "static Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "static void doPlus(){\n int a=stack.pop();\n a += stack.pop();\n stack.push(a);\n }", "doPlus", "{\n int a=stack.pop();\n a += stack.pop();\n stack.push(a);\n }", "int a=stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "a += stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a)", "stack.push", "stack", "a", "static void doMinus(){\n int a = 0 - stack.pop();\n a += stack.pop();\n stack.push(a);\n }", "doMinus", "{\n int a = 0 - stack.pop();\n a += stack.pop();\n stack.push(a);\n }", "int a = 0 - stack.pop();", "a", "0 - stack.pop()", "0", "stack.pop()", "stack.pop", "stack", "a += stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a)", "stack.push", "stack", "a", "static void doMul(){\n int a=stack.pop();\n a *= stack.pop();\n stack.push(a);\n }", "doMul", "{\n int a=stack.pop();\n a *= stack.pop();\n stack.push(a);\n }", "int a=stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "a *= stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a)", "stack.push", "stack", "a", "static void doPop(String i){\n stack.push(new Integer(i));\n }", "doPop", "{\n stack.push(new Integer(i));\n }", "stack.push(new Integer(i))", "stack.push", "stack", "new Integer(i)", "String i", "i", "public static void main(String[] args) throws IOException{\n String[] elements = br.readLine().split(\" \");\n for(String e : elements){\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }\n while(!stack.empty()){\n System.out.print(stack.pop());\n if(!stack.empty())\n System.out.print(\" \");\n }\n System.out.println();\n }", "main", "{\n String[] elements = br.readLine().split(\" \");\n for(String e : elements){\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }\n while(!stack.empty()){\n System.out.print(stack.pop());\n if(!stack.empty())\n System.out.print(\" \");\n }\n System.out.println();\n }", "String[] elements = br.readLine().split(\" \");", "elements", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "for(String e : elements){\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }", "String e", "elements", "{\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }", "{\n switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }\n }", "switch (e){\n case \"+\":\n doPlus();\n break;\n case \"-\":\n doMinus();\n break;\n case \"*\":\n doMul();\n break;\n default:\n doPop(e);\n }", "e", "case \"+\":", "\"+\"", "case \"+\":", "doPlus()", "doPlus", "break;", "case \"-\":", "\"-\"", "case \"-\":", "doMinus()", "doMinus", "break;", "case \"*\":", "\"*\"", "case \"*\":", "doMul()", "doMul", "break;", "default:", "default:", "doPop(e)", "doPop", "e", "while(!stack.empty()){\n System.out.print(stack.pop());\n if(!stack.empty())\n System.out.print(\" \");\n }", "!stack.empty()", "stack.empty()", "stack.empty", "stack", "{\n System.out.print(stack.pop());\n if(!stack.empty())\n System.out.print(\" \");\n }", "System.out.print(stack.pop())", "System.out.print", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "if(!stack.empty())\n System.out.print(\" \");", "!stack.empty()", "stack.empty()", "stack.empty", "stack", "System.out.print(\" \")", "System.out.print", "System.out", "System", "System.out", "\" \"", "System.out.println()", "System.out.println", "System.out", "System", "System.out", "String[] args", "args" ]
import java.util.*; import java.io.*; class Main{ static final String[] operator = {"+", "-", "*"}; static Stack<Integer> stack = new Stack<Integer>(); static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static void doPlus(){ int a=stack.pop(); a += stack.pop(); stack.push(a); } static void doMinus(){ int a = 0 - stack.pop(); a += stack.pop(); stack.push(a); } static void doMul(){ int a=stack.pop(); a *= stack.pop(); stack.push(a); } static void doPop(String i){ stack.push(new Integer(i)); } public static void main(String[] args) throws IOException{ String[] elements = br.readLine().split(" "); for(String e : elements){ switch (e){ case "+": doPlus(); break; case "-": doMinus(); break; case "*": doMul(); break; default: doPop(e); } } while(!stack.empty()){ System.out.print(stack.pop()); if(!stack.empty()) System.out.print(" "); } System.out.println(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 28, 13, 13, 30, 30, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 10, 17 ], [ 17, 18 ], [ 17, 19 ], [ 10, 20 ], [ 20, 21 ], [ 20, 22 ], [ 10, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 25, 30 ], [ 10, 31 ], [ 31, 32 ], [ 31, 33 ], [ 31, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 36, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 41, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 55, 57 ], [ 36, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 58, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 63, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 58, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 80, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 85, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 85, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 80, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 10, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 116, 117 ], [ 6, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }\n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }\n }\n}", "Main", "public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }\n }", "main", "{\n try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }\n }", "try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }", "{\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }", "Scanner sc = new Scanner(System.in)", "Scanner sc = new Scanner(System.in)", "new Scanner(System.in)", "Deque<Integer> stack = new ArrayDeque<>();", "stack", "new ArrayDeque<>()", "int tmpA = 0", "tmpA", "0", "tmpB = 0;", "tmpB", "0", "String[] str = sc.nextLine().split(\"\\\\s\");", "str", "sc.nextLine().split(\"\\\\s\")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\"\\\\s\"", "for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }", "String s", "str", "{\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }", "{\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }", "if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n }", "tmpA = stack.pop()", "tmpA", "stack.pop()", "stack.pop", "stack", "tmpB = stack.pop()", "tmpB", "stack.pop()", "stack.pop", "stack", "stack.push(tmpA + tmpB)", "stack.push", "stack", "tmpA + tmpB", "tmpA", "tmpB", "if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n }", "tmpA = stack.pop()", "tmpA", "stack.pop()", "stack.pop", "stack", "tmpB = stack.pop()", "tmpB", "stack.pop()", "stack.pop", "stack", "stack.push(tmpB - tmpA)", "stack.push", "stack", "tmpB - tmpA", "tmpB", "tmpA", "if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n }", "tmpA = stack.pop()", "tmpA", "stack.pop()", "stack.pop", "stack", "tmpB = stack.pop()", "tmpB", "stack.pop()", "stack.pop", "stack", "stack.push(tmpA * tmpB)", "stack.push", "stack", "tmpA * tmpB", "tmpA", "tmpB", "{\n stack.push(Integer.valueOf(s));\n }", "stack.push(Integer.valueOf(s))", "stack.push", "stack", "Integer.valueOf(s)", "Integer.valueOf", "Integer", "s", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n Deque<Integer> stack = new ArrayDeque<>();\n int tmpA = 0, tmpB = 0;\n String[] str = sc.nextLine().split(\"\\\\s\");\n\n for (String s : str) {\n if (s.equals(\"+\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA + tmpB);\n } else if (s.equals(\"-\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpB - tmpA);\n } else if (s.equals(\"*\")) {\n tmpA = stack.pop();\n tmpB = stack.pop();\n stack.push(tmpA * tmpB);\n } else {\n stack.push(Integer.valueOf(s));\n }\n }\n\n System.out.println(stack.pop());\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { try (Scanner sc = new Scanner(System.in)) { Deque<Integer> stack = new ArrayDeque<>(); int tmpA = 0, tmpB = 0; String[] str = sc.nextLine().split("\\s"); for (String s : str) { if (s.equals("+")) { tmpA = stack.pop(); tmpB = stack.pop(); stack.push(tmpA + tmpB); } else if (s.equals("-")) { tmpA = stack.pop(); tmpB = stack.pop(); stack.push(tmpB - tmpA); } else if (s.equals("*")) { tmpA = stack.pop(); tmpB = stack.pop(); stack.push(tmpA * tmpB); } else { stack.push(Integer.valueOf(s)); } } System.out.println(stack.pop()); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 34, 17, 1, 34, 17, 1, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 2, 2, 13, 13, 17, 3, 34, 17, 1, 4, 18, 13, 2, 2, 40, 13, 13, 17, 3, 34, 17, 1, 4, 18, 13, 2, 2, 13, 13, 17, 3, 3, 34, 1, 4, 18, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 113, 8 ], [ 113, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 45, 46 ], [ 38, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 53, 54 ], [ 38, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 64, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 59, 68 ], [ 55, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 76, 80 ], [ 71, 81 ], [ 55, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 84, 93 ], [ 38, 94 ], [ 28, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 96, 101 ], [ 11, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 108, 109 ], [ 9, 110 ], [ 110, 111 ], [ 0, 112 ], [ 112, 113 ], [ 112, 114 ] ]
[ "\nimport java.util.LinkedList;\nimport java.util.Scanner;\n\n/**\n * Created by sd on 2016/11/22.\n */\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n LinkedList<String> stack = new LinkedList<>();\n while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }\n System.out.println(stack.pop());\n\n }\n}", "import java.util.LinkedList;", "LinkedList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n LinkedList<String> stack = new LinkedList<>();\n while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }\n System.out.println(stack.pop());\n\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n LinkedList<String> stack = new LinkedList<>();\n while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }\n System.out.println(stack.pop());\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n LinkedList<String> stack = new LinkedList<>();\n while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }\n System.out.println(stack.pop());\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "LinkedList<String> stack = new LinkedList<>();", "stack", "new LinkedList<>()", "while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }", "String c = sc.next();", "c", "sc.next()", "sc.next", "sc", "switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }", "c", "case \"+\":", "\"+\"", "case \"+\":", "case \"-\":", "\"-\"", "case \"-\":", "case \"*\":", "\"*\"", "case \"*\":", "int a = Integer.parseInt(stack.pop())", "a", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "b = Integer.parseInt(stack.pop());", "b", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }", "c", "case \"+\":", "\"+\"", "case \"+\":", "stack.push(a+b+\"\")", "stack.push", "stack", "a+b+\"\"", "a+b+\"\"", "a", "b", "\"\"", "break;", "case \"-\":", "\"-\"", "case \"-\":", "stack.push(-a+b+\"\")", "stack.push", "stack", "-a+b+\"\"", "-a+b+\"\"", "-a", "a", "b", "\"\"", "break;", "case \"*\":", "\"*\"", "case \"*\":", "stack.push(a*b+\"\")", "stack.push", "stack", "a*b+\"\"", "a*b", "a", "b", "\"\"", "break;", "break;", "default:", "default:", "stack.push(c)", "stack.push", "stack", "c", "break;", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n LinkedList<String> stack = new LinkedList<>();\n while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }\n System.out.println(stack.pop());\n\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n LinkedList<String> stack = new LinkedList<>();\n while(sc.hasNext()){\n String c = sc.next();\n\n switch(c){\n case \"+\":\n case \"-\":\n case \"*\":\n int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop());\n switch(c) {\n case \"+\":\n stack.push(a+b+\"\");\n break;\n case \"-\":\n stack.push(-a+b+\"\");\n break;\n case \"*\":\n stack.push(a*b+\"\");\n break;\n }\n break;\n default:\n stack.push(c);\n break;\n }\n//\n// for(int i=0; i<stack.size(); i++){\n// System.out.print(stack.get(i)+\", \");\n// }\n// System.out.println();\n\n }\n System.out.println(stack.pop());\n\n }\n}", "Main" ]
import java.util.LinkedList; import java.util.Scanner; /** * Created by sd on 2016/11/22. */ public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); LinkedList<String> stack = new LinkedList<>(); while(sc.hasNext()){ String c = sc.next(); switch(c){ case "+": case "-": case "*": int a = Integer.parseInt(stack.pop()), b = Integer.parseInt(stack.pop()); switch(c) { case "+": stack.push(a+b+""); break; case "-": stack.push(-a+b+""); break; case "*": stack.push(a*b+""); break; } break; default: stack.push(c); break; } // // for(int i=0; i<stack.size(); i++){ // System.out.print(stack.get(i)+", "); // } // System.out.println(); } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 14, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 4, 18, 4, 18, 13, 17, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 1, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 23, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 34, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 46, 51 ], [ 45, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 54, 61 ], [ 45, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 45, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 78, 80 ], [ 74, 81 ], [ 45, 82 ], [ 82, 83 ], [ 83, 84 ], [ 11, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 91, 92 ], [ 9, 93 ], [ 93, 94 ] ]
[ "import java.util.ArrayDeque;\nimport java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n \tArrayDeque<Integer> a = new ArrayDeque<Integer>();\n \tScanner sc = new Scanner(System.in);\n \t\n \twhile(sc.hasNext()){\n \t\tif(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.println(a.pop());\n\n }\n \n}", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n \tArrayDeque<Integer> a = new ArrayDeque<Integer>();\n \tScanner sc = new Scanner(System.in);\n \t\n \twhile(sc.hasNext()){\n \t\tif(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.println(a.pop());\n\n }\n \n}", "Main", "public static void main(String[] args) {\n \tArrayDeque<Integer> a = new ArrayDeque<Integer>();\n \tScanner sc = new Scanner(System.in);\n \t\n \twhile(sc.hasNext()){\n \t\tif(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.println(a.pop());\n\n }", "main", "{\n \tArrayDeque<Integer> a = new ArrayDeque<Integer>();\n \tScanner sc = new Scanner(System.in);\n \t\n \twhile(sc.hasNext()){\n \t\tif(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.println(a.pop());\n\n }", "ArrayDeque<Integer> a = new ArrayDeque<Integer>();", "a", "new ArrayDeque<Integer>()", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(sc.hasNext()){\n \t\tif(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n \t\tif(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}", "if(sc.hasNextInt()){\n\t\t\ta.push(sc.nextInt());\n \t\t}else{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}", "sc.hasNextInt()", "sc.hasNextInt", "sc", "{\n\t\t\ta.push(sc.nextInt());\n \t\t}", "a.push(sc.nextInt())", "a.push", "a", "sc.nextInt()", "sc.nextInt", "sc", "{\n \t\t\tint o1 = a.pop();\n \t\t\tint o2 = a.pop();\n \t\t\tswitch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}\n \t\t}", "int o1 = a.pop();", "o1", "a.pop()", "a.pop", "a", "int o2 = a.pop();", "o2", "a.pop()", "a.pop", "a", "switch(sc.next().charAt(0)){\n\t \t\t\tcase '+':\n\t\t \t\t\ta.push(o1 + o2);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '-':\n\t\t \t\t\ta.push(o2 - o1);\n\t\t \t\t\tbreak;\n\t\t \t\tcase '*':\n\t\t \t\t\ta.push(o1 * o2);\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n \t\t\t}", "sc.next().charAt(0)", "sc.next().charAt", "sc.next()", "sc.next", "sc", "0", "case '+':", "'+'", "case '+':", "a.push(o1 + o2)", "a.push", "a", "o1 + o2", "o1", "o2", "break;", "case '-':", "'-'", "case '-':", "a.push(o2 - o1)", "a.push", "a", "o2 - o1", "o2", "o1", "break;", "case '*':", "'*'", "case '*':", "a.push(o1 * o2)", "a.push", "a", "o1 * o2", "o1", "o2", "break;", "default:", "default:", "break;", "System.out.println(a.pop())", "System.out.println", "System.out", "System", "System.out", "a.pop()", "a.pop", "a", "String[] args", "args" ]
import java.util.ArrayDeque; import java.util.Scanner; class Main { public static void main(String[] args) { ArrayDeque<Integer> a = new ArrayDeque<Integer>(); Scanner sc = new Scanner(System.in); while(sc.hasNext()){ if(sc.hasNextInt()){ a.push(sc.nextInt()); }else{ int o1 = a.pop(); int o2 = a.pop(); switch(sc.next().charAt(0)){ case '+': a.push(o1 + o2); break; case '-': a.push(o2 - o1); break; case '*': a.push(o1 * o2); break; default: break; } } } System.out.println(a.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 14, 40, 4, 18, 13, 13, 30, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 0, 13, 4, 18, 13, 4, 18, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 4, 18, 13, 4, 18, 4, 18, 13, 4, 18, 18, 13, 13, 4, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 167, 11 ], [ 167, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 14, 24 ], [ 24, 25 ], [ 24, 26 ], [ 24, 27 ], [ 28, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 29, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 29, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 43, 46 ], [ 46, 47 ], [ 47, 48 ], [ 40, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 55, 56 ], [ 40, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 40, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 63, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 77, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 91, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 116, 118 ], [ 14, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 125, 126 ], [ 14, 127 ], [ 127, 128 ], [ 12, 129 ], [ 129, 130 ], [ 167, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 137, 138 ], [ 137, 139 ], [ 133, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 140, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 133, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 153, 158 ], [ 158, 159 ], [ 158, 160 ], [ 133, 161 ], [ 161, 162 ], [ 162, 163 ], [ 131, 164 ], [ 164, 165 ], [ 0, 166 ], [ 166, 167 ], [ 166, 168 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\t\n\tpublic static int RPN(ArrayList<String> in) {\n\t\tint output = 0;\n\t\tString ops = \"+-/*\";\n\t\tStack<String> nums = new Stack<>();\n\t\t\n\t\tfor (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\toutput = Integer.parseInt(nums.pop());\n\t\t\n\t\treturn output;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> input = new ArrayList<>();\n\t\t\n\t\twhile (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}\n\t\tSystem.out.println(RPN(input));\n\t\t\n\t\tin.close();\n\t}\n}\n", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\t\n\tpublic static int RPN(ArrayList<String> in) {\n\t\tint output = 0;\n\t\tString ops = \"+-/*\";\n\t\tStack<String> nums = new Stack<>();\n\t\t\n\t\tfor (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\toutput = Integer.parseInt(nums.pop());\n\t\t\n\t\treturn output;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> input = new ArrayList<>();\n\t\t\n\t\twhile (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}\n\t\tSystem.out.println(RPN(input));\n\t\t\n\t\tin.close();\n\t}\n}", "Main", "public static int RPN(ArrayList<String> in) {\n\t\tint output = 0;\n\t\tString ops = \"+-/*\";\n\t\tStack<String> nums = new Stack<>();\n\t\t\n\t\tfor (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\toutput = Integer.parseInt(nums.pop());\n\t\t\n\t\treturn output;\n\t}", "RPN", "{\n\t\tint output = 0;\n\t\tString ops = \"+-/*\";\n\t\tStack<String> nums = new Stack<>();\n\t\t\n\t\tfor (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\toutput = Integer.parseInt(nums.pop());\n\t\t\n\t\treturn output;\n\t}", "int output = 0;", "output", "0", "String ops = \"+-/*\";", "ops", "\"+-/*\"", "Stack<String> nums = new Stack<>();", "nums", "new Stack<>()", "for (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "String s", "in", "{\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "{\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "if (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "!ops.contains(s)", "ops.contains(s)", "ops.contains", "ops", "s", "{\n\t\t\t\tnums.push(s);\n\t\t\t}", "nums.push(s)", "nums.push", "nums", "s", "{\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "int b = Integer.parseInt(nums.pop());", "b", "Integer.parseInt(nums.pop())", "Integer.parseInt", "Integer", "nums.pop()", "nums.pop", "nums", "int a = Integer.parseInt(nums.pop());", "a", "Integer.parseInt(nums.pop())", "Integer.parseInt", "Integer", "nums.pop()", "nums.pop", "nums", "int op = ops.indexOf(s);", "op", "ops.indexOf(s)", "ops.indexOf", "ops", "s", "if (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}", "op == 0", "op", "0", "{\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t}", "nums.push(String.valueOf(a + b))", "nums.push", "nums", "String.valueOf(a + b)", "String.valueOf", "String", "a + b", "a", "b", "if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}", "op == 1", "op", "1", "{\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t}", "nums.push(String.valueOf(a - b))", "nums.push", "nums", "String.valueOf(a - b)", "String.valueOf", "String", "a - b", "a", "b", "if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}", "op == 2", "op", "2", "{\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t}", "nums.push(String.valueOf(a / b))", "nums.push", "nums", "String.valueOf(a / b)", "String.valueOf", "String", "a / b", "a", "b", "if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}", "op == 3", "op", "3", "{\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}", "nums.push(String.valueOf(a * b))", "nums.push", "nums", "String.valueOf(a * b)", "String.valueOf", "String", "a * b", "a", "b", "output = Integer.parseInt(nums.pop())", "output", "Integer.parseInt(nums.pop())", "Integer.parseInt", "Integer", "nums.pop()", "nums.pop", "nums", "return output;", "output", "ArrayList<String> in", "in", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> input = new ArrayList<>();\n\t\t\n\t\twhile (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}\n\t\tSystem.out.println(RPN(input));\n\t\t\n\t\tin.close();\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> input = new ArrayList<>();\n\t\t\n\t\twhile (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}\n\t\tSystem.out.println(RPN(input));\n\t\t\n\t\tin.close();\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "ArrayList<String> input = new ArrayList<>();", "input", "new ArrayList<>()", "while (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}", "in.hasNext()", "in.hasNext", "in", "{\n\t\t\tinput.add(in.next().trim());\n\t\t}", "input.add(in.next().trim())", "input.add", "input", "in.next().trim()", "in.next().trim", "in.next()", "in.next", "in", "System.out.println(RPN(input))", "System.out.println", "System.out", "System", "System.out", "RPN(input)", "RPN", "input", "in.close()", "in.close", "in", "String[] args", "args", "public class Main {\n\t\n\tpublic static int RPN(ArrayList<String> in) {\n\t\tint output = 0;\n\t\tString ops = \"+-/*\";\n\t\tStack<String> nums = new Stack<>();\n\t\t\n\t\tfor (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\toutput = Integer.parseInt(nums.pop());\n\t\t\n\t\treturn output;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> input = new ArrayList<>();\n\t\t\n\t\twhile (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}\n\t\tSystem.out.println(RPN(input));\n\t\t\n\t\tin.close();\n\t}\n}", "public class Main {\n\t\n\tpublic static int RPN(ArrayList<String> in) {\n\t\tint output = 0;\n\t\tString ops = \"+-/*\";\n\t\tStack<String> nums = new Stack<>();\n\t\t\n\t\tfor (String s : in) {\n\t\t\tif (!ops.contains(s)) {\n\t\t\t\tnums.push(s);\n\t\t\t} else {\n\t\t\t\tint b = Integer.parseInt(nums.pop());\n\t\t\t\tint a = Integer.parseInt(nums.pop());\n\t\t\t\tint op = ops.indexOf(s);\n\t\t\t\tif (op == 0) {\n\t\t\t\t\tnums.push(String.valueOf(a + b));\n\t\t\t\t} else if (op == 1) {\n\t\t\t\t\tnums.push(String.valueOf(a - b));\n\t\t\t\t} else if (op == 2) {\n\t\t\t\t\tnums.push(String.valueOf(a / b));\n\t\t\t\t} else if (op == 3) {\n\t\t\t\t\tnums.push(String.valueOf(a * b));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\toutput = Integer.parseInt(nums.pop());\n\t\t\n\t\treturn output;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tArrayList<String> input = new ArrayList<>();\n\t\t\n\t\twhile (in.hasNext()) {\n\t\t\tinput.add(in.next().trim());\n\t\t}\n\t\tSystem.out.println(RPN(input));\n\t\t\n\t\tin.close();\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; import java.util.Stack; public class Main { public static int RPN(ArrayList<String> in) { int output = 0; String ops = "+-/*"; Stack<String> nums = new Stack<>(); for (String s : in) { if (!ops.contains(s)) { nums.push(s); } else { int b = Integer.parseInt(nums.pop()); int a = Integer.parseInt(nums.pop()); int op = ops.indexOf(s); if (op == 0) { nums.push(String.valueOf(a + b)); } else if (op == 1) { nums.push(String.valueOf(a - b)); } else if (op == 2) { nums.push(String.valueOf(a / b)); } else if (op == 3) { nums.push(String.valueOf(a * b)); } } } output = Integer.parseInt(nums.pop()); return output; } public static void main(String[] args) { Scanner in = new Scanner(System.in); ArrayList<String> input = new ArrayList<>(); while (in.hasNext()) { input.add(in.next().trim()); } System.out.println(RPN(input)); in.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 18, 13, 13, 41, 13, 20, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 4, 18, 13, 0, 13, 4, 18, 4, 18, 13, 0, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 4, 18, 13, 0, 13, 4, 18, 4, 18, 13, 0, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 4, 18, 13, 0, 13, 4, 18, 4, 18, 13, 0, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 25, 27 ], [ 11, 28 ], [ 28, 29 ], [ 28, 30 ], [ 11, 32 ], [ 32, 33 ], [ 32, 34 ], [ 11, 35 ], [ 35, 36 ], [ 11, 37 ], [ 37, 38 ], [ 11, 39 ], [ 39, 40 ], [ 11, 41 ], [ 41, 42 ], [ 11, 43 ], [ 43, 44 ], [ 43, 45 ], [ 11, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 59, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 66, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 66, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 66, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 59, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 93, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 100, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 100, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 120, 122 ], [ 100, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 93, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 127, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 134, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 134, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 154, 155 ], [ 154, 156 ], [ 134, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 127, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 166, 167 ], [ 165, 168 ], [ 168, 169 ], [ 168, 170 ], [ 11, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 173, 175 ], [ 171, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 9, 181 ], [ 181, 182 ] ]
[ "import java.util.*;\nimport java.lang.*;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n String[] line = sc.nextLine().split(\" \");\n int n = line.length;\n int[] arr = new int[n];\n int count = 0;\n int temp;\n\n int v1;\n int v2;\n Integer ans;\n ArrayDeque<Integer> stk = new ArrayDeque<Integer>();\n for(int i = 0; i < n; i++){\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }\n System.out.println(stk.pop().intValue());\n \n \n\n\n\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n String[] line = sc.nextLine().split(\" \");\n int n = line.length;\n int[] arr = new int[n];\n int count = 0;\n int temp;\n\n int v1;\n int v2;\n Integer ans;\n ArrayDeque<Integer> stk = new ArrayDeque<Integer>();\n for(int i = 0; i < n; i++){\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }\n System.out.println(stk.pop().intValue());\n \n \n\n\n\n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n String[] line = sc.nextLine().split(\" \");\n int n = line.length;\n int[] arr = new int[n];\n int count = 0;\n int temp;\n\n int v1;\n int v2;\n Integer ans;\n ArrayDeque<Integer> stk = new ArrayDeque<Integer>();\n for(int i = 0; i < n; i++){\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }\n System.out.println(stk.pop().intValue());\n \n \n\n\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n String[] line = sc.nextLine().split(\" \");\n int n = line.length;\n int[] arr = new int[n];\n int count = 0;\n int temp;\n\n int v1;\n int v2;\n Integer ans;\n ArrayDeque<Integer> stk = new ArrayDeque<Integer>();\n for(int i = 0; i < n; i++){\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }\n System.out.println(stk.pop().intValue());\n \n \n\n\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String[] line = sc.nextLine().split(\" \");", "line", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "int n = line.length;", "n", "line.length", "line", "line.length", "int[] arr = new int[n];", "arr", "new int[n]", "n", "int count = 0;", "count", "0", "int temp;", "temp", "int v1;", "v1", "int v2;", "v2", "Integer ans;", "ans", "ArrayDeque<Integer> stk = new ArrayDeque<Integer>();", "stk", "new ArrayDeque<Integer>()", "for(int i = 0; i < n; i++){\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }", "{\n if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }\n }", "if(line[i].equals(\"+\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }else if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }", "line[i].equals(\"+\")", "line[i].equals", "line[i]", "line", "i", "\"+\"", "{\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 + v2);\n stk.push(ans);\n }", "v1 = stk.pop().intValue()", "v1", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "v2 = stk.pop().intValue()", "v2", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "ans = Integer.valueOf(v1 + v2)", "ans", "Integer.valueOf(v1 + v2)", "Integer.valueOf", "Integer", "v1 + v2", "v1", "v2", "stk.push(ans)", "stk.push", "stk", "ans", "if(line[i].equals(\"-\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }else if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }", "line[i].equals(\"-\")", "line[i].equals", "line[i]", "line", "i", "\"-\"", "{\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v2 - v1);\n stk.push(ans);\n }", "v1 = stk.pop().intValue()", "v1", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "v2 = stk.pop().intValue()", "v2", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "ans = Integer.valueOf(v2 - v1)", "ans", "Integer.valueOf(v2 - v1)", "Integer.valueOf", "Integer", "v2 - v1", "v2", "v1", "stk.push(ans)", "stk.push", "stk", "ans", "if(line[i].equals(\"*\")){\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }else{\n stk.push(Integer.valueOf(line[i]));\n }", "line[i].equals(\"*\")", "line[i].equals", "line[i]", "line", "i", "\"*\"", "{\n v1 = stk.pop().intValue();\n v2 = stk.pop().intValue();\n ans = Integer.valueOf(v1 * v2);\n stk.push(ans);\n }", "v1 = stk.pop().intValue()", "v1", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "v2 = stk.pop().intValue()", "v2", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "ans = Integer.valueOf(v1 * v2)", "ans", "Integer.valueOf(v1 * v2)", "Integer.valueOf", "Integer", "v1 * v2", "v1", "v2", "stk.push(ans)", "stk.push", "stk", "ans", "{\n stk.push(Integer.valueOf(line[i]));\n }", "stk.push(Integer.valueOf(line[i]))", "stk.push", "stk", "Integer.valueOf(line[i])", "Integer.valueOf", "Integer", "line[i]", "line", "i", "System.out.println(stk.pop().intValue())", "System.out.println", "System.out", "System", "System.out", "stk.pop().intValue()", "stk.pop().intValue", "stk.pop()", "stk.pop", "stk", "String args[]", "args" ]
import java.util.*; import java.lang.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); String[] line = sc.nextLine().split(" "); int n = line.length; int[] arr = new int[n]; int count = 0; int temp; int v1; int v2; Integer ans; ArrayDeque<Integer> stk = new ArrayDeque<Integer>(); for(int i = 0; i < n; i++){ if(line[i].equals("+")){ v1 = stk.pop().intValue(); v2 = stk.pop().intValue(); ans = Integer.valueOf(v1 + v2); stk.push(ans); }else if(line[i].equals("-")){ v1 = stk.pop().intValue(); v2 = stk.pop().intValue(); ans = Integer.valueOf(v2 - v1); stk.push(ans); }else if(line[i].equals("*")){ v1 = stk.pop().intValue(); v2 = stk.pop().intValue(); ans = Integer.valueOf(v1 * v2); stk.push(ans); }else{ stk.push(Integer.valueOf(line[i])); } } System.out.println(stk.pop().intValue()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 147, 8 ], [ 147, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 11, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 33, 38 ], [ 32, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 39, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 53, 55 ], [ 32, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 57, 62 ], [ 56, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 63, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 56, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 81, 86 ], [ 80, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 87, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 87, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 80, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 105, 110 ], [ 104, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 111, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 111, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 125, 126 ], [ 125, 127 ], [ 104, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 11, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 136, 141 ], [ 141, 142 ], [ 142, 143 ], [ 9, 144 ], [ 144, 145 ], [ 0, 146 ], [ 146, 147 ], [ 146, 148 ] ]
[ "\nimport java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(myStack.pop());\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(myStack.pop());\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(myStack.pop());\n\t}", "main", "{\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(myStack.pop());\n\t}", "Stack<Integer> myStack = new Stack<Integer>();", "myStack", "new Stack<Integer>()", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a", "a", "b;", "b", "while (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "if (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}", "str.charAt(0) == '+'", "str.charAt(0)", "str.charAt", "str", "0", "'+'", "{\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}", "a = myStack.pop()", "a", "myStack.pop()", "myStack.pop", "myStack", "b = myStack.pop()", "b", "myStack.pop()", "myStack.pop", "myStack", "myStack.push(b + a)", "myStack.push", "myStack", "b + a", "b", "a", "if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}", "str.charAt(0) == '-'", "str.charAt(0)", "str.charAt", "str", "0", "'-'", "{\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}", "a = myStack.pop()", "a", "myStack.pop()", "myStack.pop", "myStack", "b = myStack.pop()", "b", "myStack.pop()", "myStack.pop", "myStack", "myStack.push(b - a)", "myStack.push", "myStack", "b - a", "b", "a", "if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}", "str.charAt(0) == '*'", "str.charAt(0)", "str.charAt", "str", "0", "'*'", "{\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}", "a = myStack.pop()", "a", "myStack.pop()", "myStack.pop", "myStack", "b = myStack.pop()", "b", "myStack.pop()", "myStack.pop", "myStack", "myStack.push(b * a)", "myStack.push", "myStack", "b * a", "b", "a", "if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}", "str.charAt(0) == '/'", "str.charAt(0)", "str.charAt", "str", "0", "'/'", "{\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}", "a = myStack.pop()", "a", "myStack.pop()", "myStack.pop", "myStack", "b = myStack.pop()", "b", "myStack.pop()", "myStack.pop", "myStack", "myStack.push(b / a)", "myStack.push", "myStack", "b / a", "b", "a", "{\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}", "myStack.push(Integer.parseInt(str))", "myStack.push", "myStack", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "System.out.println(myStack.pop())", "System.out.println", "System.out", "System", "System.out", "myStack.pop()", "myStack.pop", "myStack", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(myStack.pop());\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tString str = sc.next();\n\t\t\tif (str.charAt(0) == '+') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b + a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '-') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b - a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '*') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b * a);\n\t\t\t}\n\t\t\telse if (str.charAt(0) == '/') {\n\t\t\t\ta = myStack.pop();\n\t\t\t\tb = myStack.pop();\n\t\t\t\tmyStack.push(b / a);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmyStack.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(myStack.pop());\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Stack<Integer> myStack = new Stack<Integer>(); Scanner sc = new Scanner(System.in); int a, b; while (sc.hasNext()) { String str = sc.next(); if (str.charAt(0) == '+') { a = myStack.pop(); b = myStack.pop(); myStack.push(b + a); } else if (str.charAt(0) == '-') { a = myStack.pop(); b = myStack.pop(); myStack.push(b - a); } else if (str.charAt(0) == '*') { a = myStack.pop(); b = myStack.pop(); myStack.push(b * a); } else if (str.charAt(0) == '/') { a = myStack.pop(); b = myStack.pop(); myStack.push(b / a); } else { myStack.push(Integer.parseInt(str)); } } System.out.println(myStack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 42, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 4, 18, 4, 18, 13, 13, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 4, 18, 13, 13, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 4, 18, 13, 13, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 195, 5 ], [ 195, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 19, 20 ], [ 18, 21 ], [ 8, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 8, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 8, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 54, 55 ], [ 8, 56 ], [ 56, 57 ], [ 57, 58 ], [ 8, 59 ], [ 59, 60 ], [ 60, 61 ], [ 8, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 62, 72 ], [ 72, 73 ], [ 73, 74 ], [ 62, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 77, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 77, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 101, 102 ], [ 94, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 109, 110 ], [ 94, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 112, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 111, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 129, 131 ], [ 111, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 133, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 132, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 144, 147 ], [ 147, 148 ], [ 148, 149 ], [ 147, 150 ], [ 150, 151 ], [ 150, 152 ], [ 132, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 156, 159 ], [ 154, 160 ], [ 160, 161 ], [ 161, 162 ], [ 160, 163 ], [ 153, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 165, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 171, 172 ], [ 171, 173 ], [ 153, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 175, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 181, 182 ], [ 181, 183 ], [ 8, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 184, 189 ], [ 189, 190 ], [ 190, 191 ], [ 6, 192 ], [ 192, 193 ], [ 0, 194 ], [ 194, 195 ], [ 194, 196 ] ]
[ "import java.util.*;\npublic class Main\n{\t\n\tpublic static void main(String[] args)\n\t{\n\t\tStack<String> stack = new Stack<String>();\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tArrayList<String> operators = new ArrayList<String>();\n\t\toperators.add(\"*\"); \n\t\toperators.add(\"/\"); \n\t\toperators.add(\"-\"); \n\t\toperators.add(\"+\");\n\t\t//////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it\n\t\tScanner in = new Scanner(System.in);\n\t\tString bug = in.nextLine();\n\t\tScanner real = new Scanner(bug);\n\t\t////////////////////////////////////////\n\t\twhile(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}\n\t\tin.close();\n\t\treal.close();\n\t\t////////////////////////////////////////\n\t\tfor(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main\n{\t\n\tpublic static void main(String[] args)\n\t{\n\t\tStack<String> stack = new Stack<String>();\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tArrayList<String> operators = new ArrayList<String>();\n\t\toperators.add(\"*\"); \n\t\toperators.add(\"/\"); \n\t\toperators.add(\"-\"); \n\t\toperators.add(\"+\");\n\t\t//////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it\n\t\tScanner in = new Scanner(System.in);\n\t\tString bug = in.nextLine();\n\t\tScanner real = new Scanner(bug);\n\t\t////////////////////////////////////////\n\t\twhile(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}\n\t\tin.close();\n\t\treal.close();\n\t\t////////////////////////////////////////\n\t\tfor(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args)\n\t{\n\t\tStack<String> stack = new Stack<String>();\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tArrayList<String> operators = new ArrayList<String>();\n\t\toperators.add(\"*\"); \n\t\toperators.add(\"/\"); \n\t\toperators.add(\"-\"); \n\t\toperators.add(\"+\");\n\t\t//////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it\n\t\tScanner in = new Scanner(System.in);\n\t\tString bug = in.nextLine();\n\t\tScanner real = new Scanner(bug);\n\t\t////////////////////////////////////////\n\t\twhile(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}\n\t\tin.close();\n\t\treal.close();\n\t\t////////////////////////////////////////\n\t\tfor(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\tStack<String> stack = new Stack<String>();\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tArrayList<String> operators = new ArrayList<String>();\n\t\toperators.add(\"*\"); \n\t\toperators.add(\"/\"); \n\t\toperators.add(\"-\"); \n\t\toperators.add(\"+\");\n\t\t//////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it\n\t\tScanner in = new Scanner(System.in);\n\t\tString bug = in.nextLine();\n\t\tScanner real = new Scanner(bug);\n\t\t////////////////////////////////////////\n\t\twhile(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}\n\t\tin.close();\n\t\treal.close();\n\t\t////////////////////////////////////////\n\t\tfor(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "Stack<String> stack = new Stack<String>();", "stack", "new Stack<String>()", "ArrayList<String> list = new ArrayList<String>();", "list", "new ArrayList<String>()", "ArrayList<String> operators = new ArrayList<String>();", "operators", "new ArrayList<String>()", "operators.add(\"*\")", "operators.add", "operators", "\"*\"", "operators.add(\"/\")", "operators.add", "operators", "\"/\"", "operators.add(\"-\")", "operators.add", "operators", "\"-\"", "operators.add(\"+\")", "operators.add", "operators", "\"+\"", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "String bug = in.nextLine();", "bug", "in.nextLine()", "in.nextLine", "in", "Scanner real = new Scanner(bug);", "real", "new Scanner(bug)", "while(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}", "real.hasNext()", "real.hasNext", "real", "{\n\t\t\tlist.add(real.next());\n\t\t}", "list.add(real.next())", "list.add", "list", "real.next()", "real.next", "real", "in.close()", "in.close", "in", "real.close()", "real.close", "real", "for(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i =0;", "int i =0;", "i", "0", "i<list.size()", "i", "list.size()", "list.size", "list", "i++", "i++", "i", "{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}", "!operators.contains(list.get(i))", "operators.contains(list.get(i))", "operators.contains", "operators", "list.get(i)", "list.get", "list", "i", "{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}", "stack.push(list.get(i))", "stack.push", "stack", "list.get(i)", "list.get", "list", "i", "{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}", "int n2 = Integer.valueOf(stack.pop());", "n2", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "int n1 = Integer.valueOf(stack.pop());", "n1", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "if(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}", "list.get(i).equals(operators.get(0))", "list.get(i).equals", "list.get(i)", "list.get", "list", "i", "operators.get(0)", "operators.get", "operators", "0", "{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}", "stack.push(String.valueOf(n1*n2))", "stack.push", "stack", "String.valueOf(n1*n2)", "String.valueOf", "String", "n1*n2", "n1", "n2", "if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}", "list.get(i).equals(operators.get(1))", "list.get(i).equals", "list.get(i)", "list.get", "list", "i", "operators.get(1)", "operators.get", "operators", "1", "{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}", "stack.push(String.valueOf(n1/n2))", "stack.push", "stack", "String.valueOf(n1/n2)", "String.valueOf", "String", "n1/n2", "n1", "n2", "if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}", "list.get(i).equals(operators.get(2))", "list.get(i).equals", "list.get(i)", "list.get", "list", "i", "operators.get(2)", "operators.get", "operators", "2", "{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}", "stack.push(String.valueOf(n1-n2))", "stack.push", "stack", "String.valueOf(n1-n2)", "String.valueOf", "String", "n1-n2", "n1", "n2", "{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}", "stack.push(String.valueOf(n1+n2))", "stack.push", "stack", "String.valueOf(n1+n2)", "String.valueOf", "String", "n1+n2", "n1", "n2", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main\n{\t\n\tpublic static void main(String[] args)\n\t{\n\t\tStack<String> stack = new Stack<String>();\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tArrayList<String> operators = new ArrayList<String>();\n\t\toperators.add(\"*\"); \n\t\toperators.add(\"/\"); \n\t\toperators.add(\"-\"); \n\t\toperators.add(\"+\");\n\t\t//////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it\n\t\tScanner in = new Scanner(System.in);\n\t\tString bug = in.nextLine();\n\t\tScanner real = new Scanner(bug);\n\t\t////////////////////////////////////////\n\t\twhile(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}\n\t\tin.close();\n\t\treal.close();\n\t\t////////////////////////////////////////\n\t\tfor(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "public class Main\n{\t\n\tpublic static void main(String[] args)\n\t{\n\t\tStack<String> stack = new Stack<String>();\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tArrayList<String> operators = new ArrayList<String>();\n\t\toperators.add(\"*\"); \n\t\toperators.add(\"/\"); \n\t\toperators.add(\"-\"); \n\t\toperators.add(\"+\");\n\t\t//////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it\n\t\tScanner in = new Scanner(System.in);\n\t\tString bug = in.nextLine();\n\t\tScanner real = new Scanner(bug);\n\t\t////////////////////////////////////////\n\t\twhile(real.hasNext())\n\t\t{\n\t\t\tlist.add(real.next());\n\t\t}\n\t\tin.close();\n\t\treal.close();\n\t\t////////////////////////////////////////\n\t\tfor(int i =0;i<list.size();i++)\n\t\t{\n\t\t\tif(!operators.contains(list.get(i)))\n\t\t\t{\n\t\t\t\tstack.push(list.get(i));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sets the values for the numbers that are to be computed\n\t\t\t\tint n2 = Integer.valueOf(stack.pop());\n\t\t\t\tint n1 = Integer.valueOf(stack.pop());\n\t\t\t\t//checks what the next operator is\n\t\t\t\tif(list.get(i).equals(operators.get(0)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1*n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(1)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1/n2));\n\t\t\t\t}\n\t\t\t\telse if(list.get(i).equals(operators.get(2)))\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1-n2));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tstack.push(String.valueOf(n1+n2));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Stack<String> stack = new Stack<String>(); ArrayList<String> list = new ArrayList<String>(); ArrayList<String> operators = new ArrayList<String>(); operators.add("*"); operators.add("/"); operators.add("-"); operators.add("+"); //////////////////////////////////////// apparently there's a Scanner bug and having 2 scanners fixes it Scanner in = new Scanner(System.in); String bug = in.nextLine(); Scanner real = new Scanner(bug); //////////////////////////////////////// while(real.hasNext()) { list.add(real.next()); } in.close(); real.close(); //////////////////////////////////////// for(int i =0;i<list.size();i++) { if(!operators.contains(list.get(i))) { stack.push(list.get(i)); } else { //sets the values for the numbers that are to be computed int n2 = Integer.valueOf(stack.pop()); int n1 = Integer.valueOf(stack.pop()); //checks what the next operator is if(list.get(i).equals(operators.get(0))) { stack.push(String.valueOf(n1*n2)); } else if(list.get(i).equals(operators.get(1))) { stack.push(String.valueOf(n1/n2)); } else if(list.get(i).equals(operators.get(2))) { stack.push(String.valueOf(n1-n2)); } else { stack.push(String.valueOf(n1+n2)); } } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 40, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 13, 40, 13, 0, 13, 4, 18, 13, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 13, 40, 13, 0, 13, 4, 18, 13, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 13, 40, 13, 0, 13, 4, 18, 13, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 13, 40, 13, 4, 18, 18, 13, 13, 4, 18, 4, 18, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 11, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 11, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 46, 53 ], [ 53, 54 ], [ 46, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 46, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 46, 67 ], [ 42, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 70, 77 ], [ 77, 78 ], [ 70, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 70, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 70, 91 ], [ 42, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 94, 101 ], [ 101, 102 ], [ 94, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 94, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 94, 115 ], [ 42, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 117, 125 ], [ 125, 126 ], [ 11, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 9, 138 ], [ 138, 139 ] ]
[ "import java.util.LinkedList;\nimport java.util.Scanner;\n\n/**\n * @author kawakami\n *\n */\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\t\n\t\tint a,b;\n\t\tint top = -1;\n\t\tString st = \"\";\n\t\t\n\t\twhile(as.hasNext()){\n\t\t\t\n\t\t\tst = as.next();\n\t\t\tswitch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(list.get(0).toString());\n\n\t}\n\n}", "import java.util.LinkedList;", "LinkedList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\t\n\t\tint a,b;\n\t\tint top = -1;\n\t\tString st = \"\";\n\t\t\n\t\twhile(as.hasNext()){\n\t\t\t\n\t\t\tst = as.next();\n\t\t\tswitch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(list.get(0).toString());\n\n\t}\n\n}", "Main", "/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\t\n\t\tint a,b;\n\t\tint top = -1;\n\t\tString st = \"\";\n\t\t\n\t\twhile(as.hasNext()){\n\t\t\t\n\t\t\tst = as.next();\n\t\t\tswitch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(list.get(0).toString());\n\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tStringBuilder sb = new StringBuilder();\n\t\tScanner as = new Scanner(System.in);\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\t\n\t\tint a,b;\n\t\tint top = -1;\n\t\tString st = \"\";\n\t\t\n\t\twhile(as.hasNext()){\n\t\t\t\n\t\t\tst = as.next();\n\t\t\tswitch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(list.get(0).toString());\n\n\t}", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "Scanner as = new Scanner(System.in);", "as", "new Scanner(System.in)", "LinkedList<Integer> list = new LinkedList<Integer>();", "list", "new LinkedList<Integer>()", "int a", "a", "b;", "b", "int top = -1;", "top", "-1", "1", "String st = \"\";", "st", "\"\"", "while(as.hasNext()){\n\t\t\t\n\t\t\tst = as.next();\n\t\t\tswitch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "as.hasNext()", "as.hasNext", "as", "{\n\t\t\t\n\t\t\tst = as.next();\n\t\t\tswitch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}", "st = as.next()", "st", "as.next()", "as.next", "as", "switch (st){\n\t\t\tcase \"+\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b+a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"-\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b-a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"*\":\n\t\t\t\ta = list.remove(top);\n\t\t\t\ttop--;\n\t\t\t\tb = list.remove(top);\n\t\t\t\tlist.add(b*a);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault :\n\t\t\t\tlist.add(Integer.parseInt(st));\n\t\t\t\ttop++;\n\t\t\t\n\t\t\t}", "st", "case \"+\":", "\"+\"", "case \"+\":", "a = list.remove(top)", "a", "list.remove(top)", "list.remove", "list", "top", "top--", "top", "b = list.remove(top)", "b", "list.remove(top)", "list.remove", "list", "top", "list.add(b+a)", "list.add", "list", "b+a", "b", "a", "break;", "case \"-\":", "\"-\"", "case \"-\":", "a = list.remove(top)", "a", "list.remove(top)", "list.remove", "list", "top", "top--", "top", "b = list.remove(top)", "b", "list.remove(top)", "list.remove", "list", "top", "list.add(b-a)", "list.add", "list", "b-a", "b", "a", "break;", "case \"*\":", "\"*\"", "case \"*\":", "a = list.remove(top)", "a", "list.remove(top)", "list.remove", "list", "top", "top--", "top", "b = list.remove(top)", "b", "list.remove(top)", "list.remove", "list", "top", "list.add(b*a)", "list.add", "list", "b*a", "b", "a", "break;", "default :", "default :", "list.add(Integer.parseInt(st))", "list.add", "list", "Integer.parseInt(st)", "Integer.parseInt", "Integer", "st", "top++", "top", "System.out.println(list.get(0).toString())", "System.out.println", "System.out", "System", "System.out", "list.get(0).toString()", "list.get(0).toString", "list.get(0)", "list.get", "list", "0", "String[] args", "args" ]
import java.util.LinkedList; import java.util.Scanner; /** * @author kawakami * */ class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub StringBuilder sb = new StringBuilder(); Scanner as = new Scanner(System.in); LinkedList<Integer> list = new LinkedList<Integer>(); int a,b; int top = -1; String st = ""; while(as.hasNext()){ st = as.next(); switch (st){ case "+": a = list.remove(top); top--; b = list.remove(top); list.add(b+a); break; case "-": a = list.remove(top); top--; b = list.remove(top); list.add(b-a); break; case "*": a = list.remove(top); top--; b = list.remove(top); list.add(b*a); break; default : list.add(Integer.parseInt(st)); top++; } } System.out.println(list.get(0).toString()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 41, 13, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 13, 3, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 186, 8 ], [ 186, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 22, 30 ], [ 30, 31 ], [ 22, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 43, 44 ], [ 36, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 51, 52 ], [ 36, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 59, 61 ], [ 36, 62 ], [ 32, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 72, 73 ], [ 65, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 65, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 65, 91 ], [ 32, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 101, 102 ], [ 94, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 109, 110 ], [ 94, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 117, 119 ], [ 94, 120 ], [ 32, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 130, 131 ], [ 123, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 138, 139 ], [ 123, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 144, 145 ], [ 143, 146 ], [ 146, 147 ], [ 146, 148 ], [ 123, 149 ], [ 32, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 152, 155 ], [ 151, 156 ], [ 11, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 159, 162 ], [ 162, 163 ], [ 163, 164 ], [ 11, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 172, 174 ], [ 170, 175 ], [ 165, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 177, 182 ], [ 9, 183 ], [ 183, 184 ], [ 0, 185 ], [ 185, 186 ], [ 185, 187 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n\n while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main\n{\n public static void main(String[] args)\n {\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n\n while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }\n }\n}", "Main", "public static void main(String[] args)\n {\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n\n while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }\n }", "main", "{\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n\n while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }\n }", "Deque<String> formula = new ArrayDeque<String>();", "formula", "new ArrayDeque<String>()", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }", "scan.hasNext()", "scan.hasNext", "scan", "{\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }", "String input = scan.next();", "input", "scan.next()", "scan.next", "scan", "double num2", "num2", "num1;", "num1", "switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }", "input", "case \"+\":", "\"+\"", "case \"+\":", "num2 = Double.parseDouble(formula.poll())", "num2", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "num1 = Double.parseDouble(formula.poll())", "num1", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "formula.push(String.valueOf(num1+num2))", "formula.push", "formula", "String.valueOf(num1+num2)", "String.valueOf", "String", "num1+num2", "num1", "num2", "break;", "case \"-\":", "\"-\"", "case \"-\":", "num2 = Double.parseDouble(formula.poll())", "num2", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "num1 = Double.parseDouble(formula.poll())", "num1", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "formula.push(String.valueOf(num1-num2))", "formula.push", "formula", "String.valueOf(num1-num2)", "String.valueOf", "String", "num1-num2", "num1", "num2", "break;", "case \"/\":", "\"/\"", "case \"/\":", "num2 = Double.parseDouble(formula.poll())", "num2", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "num1 = Double.parseDouble(formula.poll())", "num1", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "formula.push(String.valueOf(num1/num2))", "formula.push", "formula", "String.valueOf(num1/num2)", "String.valueOf", "String", "num1/num2", "num1", "num2", "break;", "case \"*\":", "\"*\"", "case \"*\":", "num2 = Double.parseDouble(formula.poll())", "num2", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "num1 = Double.parseDouble(formula.poll())", "num1", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "formula.push(String.valueOf(num1*num2))", "formula.push", "formula", "String.valueOf(num1*num2)", "String.valueOf", "String", "num1*num2", "num1", "num2", "break;", "default:", "default:", "formula.push(input)", "formula.push", "formula", "input", "break;", "double ans = Double.parseDouble(formula.poll());", "ans", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }", "ans==(int)ans", "ans", "(int)ans", "{\n System.out.println((int)ans);\n }", "System.out.println((int)ans)", "System.out.println", "System.out", "System", "System.out", "(int)ans", "{\n System.out.println(ans);\n }", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main\n{\n public static void main(String[] args)\n {\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n\n while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }\n }\n}", "public class Main\n{\n public static void main(String[] args)\n {\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n\n while(scan.hasNext())\n {\n String input = scan.next();\n double num2,num1;\n switch(input)\n {\n case \"+\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1+num2));\n break;\n case \"-\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1-num2));\n break;\n case \"/\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1/num2));\n break;\n case \"*\":\n num2 = Double.parseDouble(formula.poll());\n num1 = Double.parseDouble(formula.poll());\n formula.push(String.valueOf(num1*num2));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans)\n {\n System.out.println((int)ans);\n }\n else\n {\n System.out.println(ans);\n }\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) { Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()) { String input = scan.next(); double num2,num1; switch(input) { case "+": num2 = Double.parseDouble(formula.poll()); num1 = Double.parseDouble(formula.poll()); formula.push(String.valueOf(num1+num2)); break; case "-": num2 = Double.parseDouble(formula.poll()); num1 = Double.parseDouble(formula.poll()); formula.push(String.valueOf(num1-num2)); break; case "/": num2 = Double.parseDouble(formula.poll()); num1 = Double.parseDouble(formula.poll()); formula.push(String.valueOf(num1/num2)); break; case "*": num2 = Double.parseDouble(formula.poll()); num1 = Double.parseDouble(formula.poll()); formula.push(String.valueOf(num1*num2)); break; default: formula.push(input); break; } } double ans = Double.parseDouble(formula.poll()); if(ans==(int)ans) { System.out.println((int)ans); } else { System.out.println(ans); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 41, 13, 35, 4, 18, 13, 17, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 138, 26 ], [ 138, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 29, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 43, 49 ], [ 49, 50 ], [ 43, 51 ], [ 51, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 60, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 60, 77 ], [ 53, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 80, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 80, 97 ], [ 53, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 100, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 100, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 100, 117 ], [ 53, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 119, 126 ], [ 29, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 133, 134 ], [ 27, 135 ], [ 135, 136 ], [ 0, 137 ], [ 137, 138 ], [ 137, 139 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.StringTokenizer;\n\nimport static java.lang.Integer.decode;\nimport static java.lang.Integer.parseInt;\n\n/**\n * Elementary data structures - Stack\n */\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t} //end main\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import static java.lang.Integer.decode;", "import static java.lang.Integer.decode;", "import static java.lang.Integer.decode;", "import static java.lang.Integer.parseInt;", "import static java.lang.Integer.parseInt;", "import static java.lang.Integer.parseInt;", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t} //end main\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t} //end main", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "Deque<Integer> stack = new ArrayDeque<Integer>();", "stack", "new ArrayDeque<Integer>()", "StringTokenizer st = new StringTokenizer(br.readLine());", "st", "new StringTokenizer(br.readLine())", "while (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "String str = st.nextToken();", "str", "st.nextToken()", "st.nextToken", "st", "int a", "a", "b;", "b", "switch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}", "str.charAt(0)", "str.charAt", "str", "0", "case '+':", "'+'", "case '+':", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a + b)", "stack.push", "stack", "a + b", "a", "b", "break;", "case '-':", "'-'", "case '-':", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a - b)", "stack.push", "stack", "a - b", "a", "b", "break;", "case '*':", "'*'", "case '*':", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a * b)", "stack.push", "stack", "a * b", "a", "b", "break;", "default:", "default:", "stack.push(parseInt(str))", "stack.push", "stack", "parseInt(str)", "parseInt", "str", "break;", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t} //end main\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tString str = st.nextToken();\n\t\t\tint a, b;\n\t\t\tswitch (str.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tb = stack.pop();\n\t\t\t\t\ta = stack.pop();\n\t\t\t\t\tstack.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(parseInt(str));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t} //end main\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; import java.util.StringTokenizer; import static java.lang.Integer.decode; import static java.lang.Integer.parseInt; /** * Elementary data structures - Stack */ public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Deque<Integer> stack = new ArrayDeque<Integer>(); StringTokenizer st = new StringTokenizer(br.readLine()); while (st.hasMoreTokens()) { String str = st.nextToken(); int a, b; switch (str.charAt(0)) { case '+': b = stack.pop(); a = stack.pop(); stack.push(a + b); break; case '-': b = stack.pop(); a = stack.pop(); stack.push(a - b); break; case '*': b = stack.pop(); a = stack.pop(); stack.push(a * b); break; default: stack.push(parseInt(str)); break; } } System.out.println(stack.pop()); } //end main }
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 20, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 28, 13, 13, 30, 30, 41, 13, 4, 18, 13, 17, 14, 2, 2, 17, 13, 2, 13, 17, 30, 0, 18, 18, 36, 13, 18, 36, 13, 4, 18, 13, 13, 40, 18, 36, 13, 30, 35, 13, 34, 17, 1, 0, 18, 18, 36, 13, 2, 13, 17, 18, 18, 36, 13, 2, 13, 17, 0, 18, 18, 36, 13, 13, 17, 40, 18, 36, 13, 3, 34, 17, 1, 0, 18, 18, 36, 13, 2, 13, 17, 18, 18, 36, 13, 2, 13, 17, 0, 18, 18, 36, 13, 13, 17, 40, 18, 36, 13, 3, 34, 17, 1, 0, 18, 18, 36, 13, 2, 13, 17, 18, 18, 36, 13, 2, 13, 17, 0, 18, 18, 36, 13, 13, 17, 40, 18, 36, 13, 3, 4, 18, 13, 4, 18, 18, 13, 13, 18, 18, 36, 13, 2, 13, 17, 12, 13, 30, 41, 13, 20, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 186, 5 ], [ 186, 6 ], [ 6, 7 ], [ 6, 8 ], [ 186, 9 ], [ 9, 10 ], [ 9, 11 ], [ 186, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 15, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 15, 30 ], [ 30, 31 ], [ 30, 32 ], [ 30, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 34, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 49, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 41, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 73, 77 ], [ 77, 78 ], [ 77, 79 ], [ 72, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 71, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 87, 93 ], [ 71, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 71, 98 ], [ 67, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 114, 116 ], [ 101, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 117, 123 ], [ 101, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 101, 128 ], [ 67, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 137, 138 ], [ 137, 139 ], [ 132, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 144, 145 ], [ 144, 146 ], [ 131, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 147, 153 ], [ 131, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 131, 158 ], [ 15, 159 ], [ 159, 160 ], [ 160, 161 ], [ 15, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 162, 167 ], [ 167, 168 ], [ 168, 169 ], [ 168, 170 ], [ 167, 171 ], [ 171, 172 ], [ 171, 173 ], [ 186, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 180, 181 ], [ 181, 182 ], [ 174, 183 ], [ 183, 184 ], [ 0, 185 ], [ 185, 186 ], [ 185, 187 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n int current = 0;\n int[] stack = new int[101];\n\n public void go() {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] strs = line.split(\" \");\n for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }\n sc.close();\n System.out.println(this.stack[current - 1]);\n }\n\n public static void main(String[] args) {\n Main cui = new Main();\n cui.go();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n int current = 0;\n int[] stack = new int[101];\n\n public void go() {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] strs = line.split(\" \");\n for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }\n sc.close();\n System.out.println(this.stack[current - 1]);\n }\n\n public static void main(String[] args) {\n Main cui = new Main();\n cui.go();\n }\n}", "Main", "int current = 0;", "current", "0", "int[] stack = new int[101];", "stack", "new int[101]", "101", "public void go() {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] strs = line.split(\" \");\n for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }\n sc.close();\n System.out.println(this.stack[current - 1]);\n }", "go", "{\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] strs = line.split(\" \");\n for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }\n sc.close();\n System.out.println(this.stack[current - 1]);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] strs = line.split(\" \");", "strs", "line.split(\" \")", "line.split", "line", "\" \"", "for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }", "String str", "strs", "{\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }", "{\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }", "char ch = str.charAt(0);", "ch", "str.charAt(0)", "str.charAt", "str", "0", "if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }", "'0' <= ch && ch <= '9'", "'0' <= ch", "'0'", "ch", "ch <= '9'", "ch", "'9'", "{\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n }", "this.stack[this.current] = Integer.parseInt(str)", "this.stack[this.current]", "this.stack", "this", "this.stack", "this.current", "this", "this.current", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "this.current++", "this.current", "this", "this.current", "{\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }", "switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }", "ch", "case '+':", "'+'", "case '+':", "this.stack[current - 2] += this.stack[current - 1]", "this.stack[current - 2]", "this.stack", "this", "this.stack", "current - 2", "current", "2", "this.stack[current - 1]", "this.stack", "this", "this.stack", "current - 1", "current", "1", "this.stack[current] = 0", "this.stack[current]", "this.stack", "this", "this.stack", "current", "0", "this.current--", "this.current", "this", "this.current", "break;", "case '-':", "'-'", "case '-':", "this.stack[current - 2] -= this.stack[current - 1]", "this.stack[current - 2]", "this.stack", "this", "this.stack", "current - 2", "current", "2", "this.stack[current - 1]", "this.stack", "this", "this.stack", "current - 1", "current", "1", "this.stack[current] = 0", "this.stack[current]", "this.stack", "this", "this.stack", "current", "0", "this.current--", "this.current", "this", "this.current", "break;", "case '*':", "'*'", "case '*':", "this.stack[current - 2] *= this.stack[current - 1]", "this.stack[current - 2]", "this.stack", "this", "this.stack", "current - 2", "current", "2", "this.stack[current - 1]", "this.stack", "this", "this.stack", "current - 1", "current", "1", "this.stack[current] = 0", "this.stack[current]", "this.stack", "this", "this.stack", "current", "0", "this.current--", "this.current", "this", "this.current", "break;", "sc.close()", "sc.close", "sc", "System.out.println(this.stack[current - 1])", "System.out.println", "System.out", "System", "System.out", "this.stack[current - 1]", "this.stack", "this", "this.stack", "current - 1", "current", "1", "public static void main(String[] args) {\n Main cui = new Main();\n cui.go();\n }", "main", "{\n Main cui = new Main();\n cui.go();\n }", "Main cui = new Main();", "cui", "new Main()", "cui.go()", "cui.go", "cui", "String[] args", "args", "public class Main {\n\n int current = 0;\n int[] stack = new int[101];\n\n public void go() {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] strs = line.split(\" \");\n for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }\n sc.close();\n System.out.println(this.stack[current - 1]);\n }\n\n public static void main(String[] args) {\n Main cui = new Main();\n cui.go();\n }\n}", "public class Main {\n\n int current = 0;\n int[] stack = new int[101];\n\n public void go() {\n\n Scanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] strs = line.split(\" \");\n for (String str : strs) {\n char ch = str.charAt(0);\n if ('0' <= ch && ch <= '9') {\n this.stack[this.current] = Integer.parseInt(str);\n this.current++;\n } else {\n switch (ch) {\n case '+':\n this.stack[current - 2] += this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '-':\n this.stack[current - 2] -= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n case '*':\n this.stack[current - 2] *= this.stack[current - 1];\n this.stack[current] = 0;\n this.current--;\n break;\n }\n }\n }\n sc.close();\n System.out.println(this.stack[current - 1]);\n }\n\n public static void main(String[] args) {\n Main cui = new Main();\n cui.go();\n }\n}", "Main" ]
import java.util.Scanner; public class Main { int current = 0; int[] stack = new int[101]; public void go() { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] strs = line.split(" "); for (String str : strs) { char ch = str.charAt(0); if ('0' <= ch && ch <= '9') { this.stack[this.current] = Integer.parseInt(str); this.current++; } else { switch (ch) { case '+': this.stack[current - 2] += this.stack[current - 1]; this.stack[current] = 0; this.current--; break; case '-': this.stack[current - 2] -= this.stack[current - 1]; this.stack[current] = 0; this.current--; break; case '*': this.stack[current - 2] *= this.stack[current - 1]; this.stack[current] = 0; this.current--; break; } } } sc.close(); System.out.println(this.stack[current - 1]); } public static void main(String[] args) { Main cui = new Main(); cui.go(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 41, 13, 41, 13, 28, 13, 13, 30, 30, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 160, 8 ], [ 160, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 9, 14 ], [ 14, 15 ], [ 160, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 18, 27 ], [ 27, 28 ], [ 28, 29 ], [ 18, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 32, 35 ], [ 18, 36 ], [ 36, 37 ], [ 36, 38 ], [ 18, 39 ], [ 39, 40 ], [ 18, 41 ], [ 41, 42 ], [ 18, 43 ], [ 43, 44 ], [ 43, 45 ], [ 43, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 52, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 52, 69 ], [ 48, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 72, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 72, 89 ], [ 48, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 92, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 92, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 106, 108 ], [ 92, 109 ], [ 48, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 18, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 127, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 127, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 137, 144 ], [ 144, 145 ], [ 127, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 148, 154 ], [ 154, 155 ], [ 155, 156 ], [ 148, 157 ], [ 157, 158 ], [ 0, 159 ], [ 159, 160 ], [ 159, 161 ] ]
[ "import java.util.LinkedList;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tsolve();\n\t}\n\n\tprivate static void solve() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tsc.close();\n\n\t\tString[] items = line.split(\" \");\n\t\tStack stack = new Stack();\n\n\t\tint op1;\n\t\tint op2;\n\t\tfor (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}\n\nclass Stack {\n\tprivate LinkedList<Integer> stack;\n\tpublic Stack() {\n\t\tstack = new LinkedList<Integer>();\n\t}\n\tpublic void push(int item) {\n\t\tstack.addLast(item);\n\t}\n\tpublic int pop() {\n\t\tint ret = stack.getLast();\n\t\tstack.removeLast();\n\t\treturn ret;\n\t}\n}", "import java.util.LinkedList;", "LinkedList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tsolve();\n\t}\n\n\tprivate static void solve() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tsc.close();\n\n\t\tString[] items = line.split(\" \");\n\t\tStack stack = new Stack();\n\n\t\tint op1;\n\t\tint op2;\n\t\tfor (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tsolve();\n\t}", "main", "{\n\t\tsolve();\n\t}", "solve()", "solve", "String[] args", "args", "private static void solve() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tsc.close();\n\n\t\tString[] items = line.split(\" \");\n\t\tStack stack = new Stack();\n\n\t\tint op1;\n\t\tint op2;\n\t\tfor (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "solve", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tsc.close();\n\n\t\tString[] items = line.split(\" \");\n\t\tStack stack = new Stack();\n\n\t\tint op1;\n\t\tint op2;\n\t\tfor (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "sc.close()", "sc.close", "sc", "String[] items = line.split(\" \");", "items", "line.split(\" \")", "line.split", "line", "\" \"", "Stack stack = new Stack();", "stack", "new Stack()", "int op1;", "op1", "int op2;", "op2", "for (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}", "String item", "items", "{\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}", "{\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}", "switch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}", "item", "case \"+\":", "\"+\"", "case \"+\":", "op2 = stack.pop()", "op2", "stack.pop()", "stack.pop", "stack", "op1 = stack.pop()", "op1", "stack.pop()", "stack.pop", "stack", "stack.push(op1 + op2)", "stack.push", "stack", "op1 + op2", "op1", "op2", "break;", "case \"-\":", "\"-\"", "case \"-\":", "op2 = stack.pop()", "op2", "stack.pop()", "stack.pop", "stack", "op1 = stack.pop()", "op1", "stack.pop()", "stack.pop", "stack", "stack.push(op1 - op2)", "stack.push", "stack", "op1 - op2", "op1", "op2", "break;", "case \"*\":", "\"*\"", "case \"*\":", "op2 = stack.pop()", "op2", "stack.pop()", "stack.pop", "stack", "op1 = stack.pop()", "op1", "stack.pop()", "stack.pop", "stack", "stack.push(op1 * op2)", "stack.push", "stack", "op1 * op2", "op1", "op2", "break;", "default:", "default:", "stack.push(Integer.parseInt(item))", "stack.push", "stack", "Integer.parseInt(item)", "Integer.parseInt", "Integer", "item", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "class Stack {\n\tprivate LinkedList<Integer> stack;\n\tpublic Stack() {\n\t\tstack = new LinkedList<Integer>();\n\t}\n\tpublic void push(int item) {\n\t\tstack.addLast(item);\n\t}\n\tpublic int pop() {\n\t\tint ret = stack.getLast();\n\t\tstack.removeLast();\n\t\treturn ret;\n\t}\n}", "Stack", "private LinkedList<Integer> stack;", "stack", "public Stack() {\n\t\tstack = new LinkedList<Integer>();\n\t}", "Stack", "{\n\t\tstack = new LinkedList<Integer>();\n\t}", "stack = new LinkedList<Integer>()", "stack", "new LinkedList<Integer>()", "public void push(int item) {\n\t\tstack.addLast(item);\n\t}", "push", "{\n\t\tstack.addLast(item);\n\t}", "stack.addLast(item)", "stack.addLast", "stack", "item", "int item", "item", "public int pop() {\n\t\tint ret = stack.getLast();\n\t\tstack.removeLast();\n\t\treturn ret;\n\t}", "pop", "{\n\t\tint ret = stack.getLast();\n\t\tstack.removeLast();\n\t\treturn ret;\n\t}", "int ret = stack.getLast();", "ret", "stack.getLast()", "stack.getLast", "stack", "stack.removeLast()", "stack.removeLast", "stack", "return ret;", "ret", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tsolve();\n\t}\n\n\tprivate static void solve() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tsc.close();\n\n\t\tString[] items = line.split(\" \");\n\t\tStack stack = new Stack();\n\n\t\tint op1;\n\t\tint op2;\n\t\tfor (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tsolve();\n\t}\n\n\tprivate static void solve() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tsc.close();\n\n\t\tString[] items = line.split(\" \");\n\t\tStack stack = new Stack();\n\n\t\tint op1;\n\t\tint op2;\n\t\tfor (String item : items) {\n\t\t\tswitch (item) {\n\t\t\tcase \"+\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 + op2);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 - op2);\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\top2 = stack.pop();\n\t\t\t\top1 = stack.pop();\n\t\t\t\tstack.push(op1 * op2);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tstack.push(Integer.parseInt(item));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main" ]
import java.util.LinkedList; import java.util.Scanner; public class Main { public static void main(String[] args) { solve(); } private static void solve() { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); sc.close(); String[] items = line.split(" "); Stack stack = new Stack(); int op1; int op2; for (String item : items) { switch (item) { case "+": op2 = stack.pop(); op1 = stack.pop(); stack.push(op1 + op2); break; case "-": op2 = stack.pop(); op1 = stack.pop(); stack.push(op1 - op2); break; case "*": op2 = stack.pop(); op1 = stack.pop(); stack.push(op1 * op2); break; default: stack.push(Integer.parseInt(item)); } } System.out.println(stack.pop()); } } class Stack { private LinkedList<Integer> stack; public Stack() { stack = new LinkedList<Integer>(); } public void push(int item) { stack.addLast(item); } public int pop() { int ret = stack.getLast(); stack.removeLast(); return ret; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 121, 11 ], [ 121, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 29, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 43, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 57, 59 ], [ 43, 60 ], [ 39, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 63, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 77, 79 ], [ 63, 80 ], [ 39, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 83, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 83, 100 ], [ 39, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 14, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 116, 117 ], [ 12, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tDeque<Integer> numbers = new ArrayDeque<>();\n\t\tString str;\n\t\tint a = 0;\n\t\tint b = 0;\n\n\t\twhile(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(numbers.peek());\n\n\t}\n}\n", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tDeque<Integer> numbers = new ArrayDeque<>();\n\t\tString str;\n\t\tint a = 0;\n\t\tint b = 0;\n\n\t\twhile(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(numbers.peek());\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tDeque<Integer> numbers = new ArrayDeque<>();\n\t\tString str;\n\t\tint a = 0;\n\t\tint b = 0;\n\n\t\twhile(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(numbers.peek());\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tDeque<Integer> numbers = new ArrayDeque<>();\n\t\tString str;\n\t\tint a = 0;\n\t\tint b = 0;\n\n\t\twhile(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(numbers.peek());\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "Deque<Integer> numbers = new ArrayDeque<>();", "numbers", "new ArrayDeque<>()", "String str;", "str", "int a = 0;", "a", "0", "int b = 0;", "b", "0", "while(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}", "scan.hasNext()", "scan.hasNext", "scan", "{\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}", "str = scan.next()", "str", "scan.next()", "scan.next", "scan", "switch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}", "str", "case \"+\":", "\"+\"", "case \"+\":", "a = numbers.pop()", "a", "numbers.pop()", "numbers.pop", "numbers", "b = numbers.pop()", "b", "numbers.pop()", "numbers.pop", "numbers", "numbers.push(a + b)", "numbers.push", "numbers", "a + b", "a", "b", "break;", "case \"-\":", "\"-\"", "case \"-\":", "b = numbers.pop()", "b", "numbers.pop()", "numbers.pop", "numbers", "a = numbers.pop()", "a", "numbers.pop()", "numbers.pop", "numbers", "numbers.push(a - b)", "numbers.push", "numbers", "a - b", "a", "b", "break;", "case \"*\":", "\"*\"", "case \"*\":", "a = numbers.pop()", "a", "numbers.pop()", "numbers.pop", "numbers", "b = numbers.pop()", "b", "numbers.pop()", "numbers.pop", "numbers", "numbers.push(a * b)", "numbers.push", "numbers", "a * b", "a", "b", "break;", "default:", "default:", "numbers.push(Integer.parseInt(str))", "numbers.push", "numbers", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "System.out.println(numbers.peek())", "System.out.println", "System.out", "System", "System.out", "numbers.peek()", "numbers.peek", "numbers", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tDeque<Integer> numbers = new ArrayDeque<>();\n\t\tString str;\n\t\tint a = 0;\n\t\tint b = 0;\n\n\t\twhile(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(numbers.peek());\n\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tDeque<Integer> numbers = new ArrayDeque<>();\n\t\tString str;\n\t\tint a = 0;\n\t\tint b = 0;\n\n\t\twhile(scan.hasNext()) {\n\t\t\tstr = scan.next();\n\t\t\tswitch(str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a + b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"-\":\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tnumbers.push(a - b);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\ta = numbers.pop();\n\t\t\t\t\tb = numbers.pop();\n\t\t\t\t\tnumbers.push(a * b);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tnumbers.push(Integer.parseInt(str));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(numbers.peek());\n\n\t}\n}", "Main" ]
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); Deque<Integer> numbers = new ArrayDeque<>(); String str; int a = 0; int b = 0; while(scan.hasNext()) { str = scan.next(); switch(str) { case "+": a = numbers.pop(); b = numbers.pop(); numbers.push(a + b); break; case "-": b = numbers.pop(); a = numbers.pop(); numbers.push(a - b); break; case "*": a = numbers.pop(); b = numbers.pop(); numbers.push(a * b); break; default: numbers.push(Integer.parseInt(str)); } } System.out.println(numbers.peek()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 140, 8 ], [ 140, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 11, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 11, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 47, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 54, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 47, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 68, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 78, 82 ], [ 82, 83 ], [ 83, 84 ], [ 75, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 68, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 96, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 96, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 96, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 89, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 11, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 11, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 9, 137 ], [ 137, 138 ], [ 0, 139 ], [ 139, 140 ], [ 139, 141 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint result = 0;\n\t\tStack<Integer> stack = new Stack<Integer>(); \n\t\tScanner in = new Scanner(System.in);\n\t\tString stringIn = in.nextLine();\n\t\tString[] lineString = stringIn.split(\" \");\n\t\tfor(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}\n\t\tresult = stack.pop();\n\t\tSystem.out.println(result);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint result = 0;\n\t\tStack<Integer> stack = new Stack<Integer>(); \n\t\tScanner in = new Scanner(System.in);\n\t\tString stringIn = in.nextLine();\n\t\tString[] lineString = stringIn.split(\" \");\n\t\tfor(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}\n\t\tresult = stack.pop();\n\t\tSystem.out.println(result);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tint result = 0;\n\t\tStack<Integer> stack = new Stack<Integer>(); \n\t\tScanner in = new Scanner(System.in);\n\t\tString stringIn = in.nextLine();\n\t\tString[] lineString = stringIn.split(\" \");\n\t\tfor(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}\n\t\tresult = stack.pop();\n\t\tSystem.out.println(result);\n\t}", "main", "{\n\t\tint result = 0;\n\t\tStack<Integer> stack = new Stack<Integer>(); \n\t\tScanner in = new Scanner(System.in);\n\t\tString stringIn = in.nextLine();\n\t\tString[] lineString = stringIn.split(\" \");\n\t\tfor(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}\n\t\tresult = stack.pop();\n\t\tSystem.out.println(result);\n\t}", "int result = 0;", "result", "0", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "String stringIn = in.nextLine();", "stringIn", "in.nextLine()", "in.nextLine", "in", "String[] lineString = stringIn.split(\" \");", "lineString", "stringIn.split(\" \")", "stringIn.split", "stringIn", "\" \"", "for(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i<lineString.length", "i", "lineString.length", "lineString", "lineString.length", "i++", "i++", "i", "{\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}", "{\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}", "if(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t}", "lineString[i].equals(\"*\")", "lineString[i].equals", "lineString[i]", "lineString", "i", "\"*\"", "{\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}", "int n = stack.pop()*stack.pop();", "n", "stack.pop()*stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "stack.push(n)", "stack.push", "stack", "n", "if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t}", "lineString[i].equals(\"+\")", "lineString[i].equals", "lineString[i]", "lineString", "i", "\"+\"", "{\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}", "int n = stack.pop()+stack.pop();", "n", "stack.pop()+stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "stack.push(n)", "stack.push", "stack", "n", "if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t}", "lineString[i].equals(\"-\")", "lineString[i].equals", "lineString[i]", "lineString", "i", "\"-\"", "{\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}", "int n1 = stack.pop();", "n1", "stack.pop()", "stack.pop", "stack", "int n2 = stack.pop();", "n2", "stack.pop()", "stack.pop", "stack", "int n = n2-n1;", "n", "n2-n1", "n2", "n1", "stack.push(n)", "stack.push", "stack", "n", "{\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t}", "stack.push(Integer.parseInt(lineString[i]))", "stack.push", "stack", "Integer.parseInt(lineString[i])", "Integer.parseInt", "Integer", "lineString[i]", "lineString", "i", "result = stack.pop()", "result", "stack.pop()", "stack.pop", "stack", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint result = 0;\n\t\tStack<Integer> stack = new Stack<Integer>(); \n\t\tScanner in = new Scanner(System.in);\n\t\tString stringIn = in.nextLine();\n\t\tString[] lineString = stringIn.split(\" \");\n\t\tfor(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}\n\t\tresult = stack.pop();\n\t\tSystem.out.println(result);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint result = 0;\n\t\tStack<Integer> stack = new Stack<Integer>(); \n\t\tScanner in = new Scanner(System.in);\n\t\tString stringIn = in.nextLine();\n\t\tString[] lineString = stringIn.split(\" \");\n\t\tfor(int i = 0; i<lineString.length;i++) {\n\t\t\tif(lineString[i].equals(\"*\")) {\n\t\t\t\tint n = stack.pop()*stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"+\")) {\n\t\t\t\tint n = stack.pop()+stack.pop();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse if(lineString[i].equals(\"-\")) {\n\t\t\t\tint n1 = stack.pop();\n\t\t\t\tint n2 = stack.pop();\n\t\t\t\tint n = n2-n1;\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\telse {\n\t\t\tstack.push(Integer.parseInt(lineString[i]));\t\n\t\t\t} \n\t\t\t//System.out.println(stack.toString());\n\t\t\t\n\t\t}\n\t\tresult = stack.pop();\n\t\tSystem.out.println(result);\n\t}\n\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { int result = 0; Stack<Integer> stack = new Stack<Integer>(); Scanner in = new Scanner(System.in); String stringIn = in.nextLine(); String[] lineString = stringIn.split(" "); for(int i = 0; i<lineString.length;i++) { if(lineString[i].equals("*")) { int n = stack.pop()*stack.pop(); stack.push(n); } else if(lineString[i].equals("+")) { int n = stack.pop()+stack.pop(); stack.push(n); } else if(lineString[i].equals("-")) { int n1 = stack.pop(); int n2 = stack.pop(); int n = n2-n1; stack.push(n); } else { stack.push(Integer.parseInt(lineString[i])); } //System.out.println(stack.toString()); } result = stack.pop(); System.out.println(result); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 4, 13, 41, 13, 4, 18, 13, 4, 13, 0, 13, 4, 13, 18, 13, 13, 13, 13, 4, 13, 4, 18, 13, 13, 30, 4, 13, 18, 13, 13, 4, 18, 18, 13, 13, 13, 12, 13, 30, 40, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 35, 13, 34, 17, 1, 0, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 2, 13, 13, 3, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 4, 18, 20, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 206, 11 ], [ 206, 12 ], [ 12, 13 ], [ 12, 14 ], [ 206, 16 ], [ 16, 17 ], [ 16, 18 ], [ 206, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 21, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 27, 32 ], [ 21, 33 ], [ 33, 34 ], [ 33, 35 ], [ 21, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 36, 46 ], [ 46, 47 ], [ 47, 48 ], [ 36, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 54, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 54, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 53, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 54, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 51, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 79, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 79, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 96, 102 ], [ 79, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 51, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 21, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 115, 120 ], [ 206, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 121, 131 ], [ 131, 132 ], [ 206, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 138, 140 ], [ 135, 141 ], [ 141, 142 ], [ 135, 143 ], [ 143, 144 ], [ 206, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 158, 160 ], [ 155, 161 ], [ 151, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 167, 169 ], [ 164, 170 ], [ 151, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 176, 178 ], [ 173, 179 ], [ 151, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 185, 187 ], [ 182, 188 ], [ 147, 189 ], [ 189, 190 ], [ 145, 191 ], [ 191, 192 ], [ 145, 193 ], [ 193, 194 ], [ 145, 195 ], [ 195, 196 ], [ 206, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 201, 202 ], [ 197, 203 ], [ 203, 204 ], [ 0, 205 ], [ 205, 206 ], [ 205, 207 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\t\n\tString[] stack = new String[1000000];\n\tint top = 0;\n\t\n\tvoid run() throws IOException {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] stringArray = br.readLine().split(\" \");\n\t\tint result = 0;\n\t\tfor (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\t\n\tvoid push(String x) {\n\t\ttop++;\n\t\tstack[top] = x;\n\t}\n\t\n\tString pop() {\n\t\tString x = stack[top];\n\t\ttop--;\n\t\treturn x;\n\t}\n\t\n\tint calc(String optor, int x , int y) {\n\n\t\tint result = 0;\n\t\tswitch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main().run();\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\t\n\tString[] stack = new String[1000000];\n\tint top = 0;\n\t\n\tvoid run() throws IOException {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] stringArray = br.readLine().split(\" \");\n\t\tint result = 0;\n\t\tfor (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\t\n\tvoid push(String x) {\n\t\ttop++;\n\t\tstack[top] = x;\n\t}\n\t\n\tString pop() {\n\t\tString x = stack[top];\n\t\ttop--;\n\t\treturn x;\n\t}\n\t\n\tint calc(String optor, int x , int y) {\n\n\t\tint result = 0;\n\t\tswitch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main().run();\n\t}\n}", "Main", "String[] stack = new String[1000000];", "stack", "new String[1000000]", "1000000", "int top = 0;", "top", "0", "void run() throws IOException {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] stringArray = br.readLine().split(\" \");\n\t\tint result = 0;\n\t\tfor (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "run", "{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] stringArray = br.readLine().split(\" \");\n\t\tint result = 0;\n\t\tfor (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] stringArray = br.readLine().split(\" \");", "stringArray", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int result = 0;", "result", "0", "for (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < stringArray.length", "i", "stringArray.length", "stringArray", "stringArray.length", "i++", "i++", "i", "{\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}", "{\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}", "if (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}", "stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")", "stringArray[i].equals(\"*\")", "stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")", "stringArray[i].equals(\"+\")", "stringArray[i].equals", "stringArray[i]", "stringArray", "i", "\"+\"", "stringArray[i].equals(\"-\")", "stringArray[i].equals", "stringArray[i]", "stringArray", "i", "\"-\"", "stringArray[i].equals(\"*\")", "stringArray[i].equals", "stringArray[i]", "stringArray", "i", "\"*\"", "stringArray[i].equals(\"/\")", "stringArray[i].equals", "stringArray[i]", "stringArray", "i", "\"/\"", "{\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t}", "int x = Integer.parseInt(pop());", "x", "Integer.parseInt(pop())", "Integer.parseInt", "Integer", "pop()", "pop", "int y = Integer.parseInt(pop());", "y", "Integer.parseInt(pop())", "Integer.parseInt", "Integer", "pop()", "pop", "result = calc(stringArray[i], y ,x)", "result", "calc(stringArray[i], y ,x)", "calc", "stringArray[i]", "stringArray", "i", "y", "x", "push(String.valueOf(result))", "push", "String.valueOf(result)", "String.valueOf", "String", "result", "{\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}", "push(stringArray[i])", "push", "stringArray[i]", "stringArray", "i", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "void push(String x) {\n\t\ttop++;\n\t\tstack[top] = x;\n\t}", "push", "{\n\t\ttop++;\n\t\tstack[top] = x;\n\t}", "top++", "top", "stack[top] = x", "stack[top]", "stack", "top", "x", "String x", "x", "String pop() {\n\t\tString x = stack[top];\n\t\ttop--;\n\t\treturn x;\n\t}", "pop", "{\n\t\tString x = stack[top];\n\t\ttop--;\n\t\treturn x;\n\t}", "String x = stack[top];", "x", "stack[top]", "stack", "top", "top--", "top", "return x;", "x", "int calc(String optor, int x , int y) {\n\n\t\tint result = 0;\n\t\tswitch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}", "calc", "{\n\n\t\tint result = 0;\n\t\tswitch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}", "int result = 0;", "result", "0", "switch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}", "optor", "case \"+\" :", "\"+\"", "case \"+\" :", "result = x + y", "result", "x + y", "x", "y", "break;", "case \"-\":", "\"-\"", "case \"-\":", "result = x - y", "result", "x - y", "x", "y", "break;", "case \"*\":", "\"*\"", "case \"*\":", "result = x * y", "result", "x * y", "x", "y", "break;", "case \"/\":", "\"/\"", "case \"/\":", "result = x / y", "result", "x / y", "x", "y", "break;", "return result;", "result", "String optor", "optor", "int x", "x", "int y", "y", "public static void main(String[] args) throws IOException {\n\t\tnew Main().run();\n\t}", "main", "{\n\t\tnew Main().run();\n\t}", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "public class Main {\n\t\n\tString[] stack = new String[1000000];\n\tint top = 0;\n\t\n\tvoid run() throws IOException {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] stringArray = br.readLine().split(\" \");\n\t\tint result = 0;\n\t\tfor (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\t\n\tvoid push(String x) {\n\t\ttop++;\n\t\tstack[top] = x;\n\t}\n\t\n\tString pop() {\n\t\tString x = stack[top];\n\t\ttop--;\n\t\treturn x;\n\t}\n\t\n\tint calc(String optor, int x , int y) {\n\n\t\tint result = 0;\n\t\tswitch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main().run();\n\t}\n}", "public class Main {\n\t\n\tString[] stack = new String[1000000];\n\tint top = 0;\n\t\n\tvoid run() throws IOException {\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] stringArray = br.readLine().split(\" \");\n\t\tint result = 0;\n\t\tfor (int i = 0; i < stringArray.length; i++) {\n\t\t\t\n\t\t\tif (stringArray[i].equals(\"+\") ||\n\t\t\t\tstringArray[i].equals(\"-\") ||\t\n\t\t\t\tstringArray[i].equals(\"*\") ||\n\t\t\t\tstringArray[i].equals(\"/\")) {\n\t\t\t\t\n\t\t\t\tint x = Integer.parseInt(pop());\n\t\t\t\tint y = Integer.parseInt(pop());\n\t\t\t\tresult = calc(stringArray[i], y ,x);\n\t\t\t\tpush(String.valueOf(result));\n\t\t\t} else {\n\t\t\t\tpush(stringArray[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\t\n\tvoid push(String x) {\n\t\ttop++;\n\t\tstack[top] = x;\n\t}\n\t\n\tString pop() {\n\t\tString x = stack[top];\n\t\ttop--;\n\t\treturn x;\n\t}\n\t\n\tint calc(String optor, int x , int y) {\n\n\t\tint result = 0;\n\t\tswitch (optor) {\n\t\t\tcase \"+\" :\n\t\t\t\tresult = x + y;\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tresult = x - y;\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tresult = x * y;\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tresult = x / y;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn result;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main().run();\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { String[] stack = new String[1000000]; int top = 0; void run() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] stringArray = br.readLine().split(" "); int result = 0; for (int i = 0; i < stringArray.length; i++) { if (stringArray[i].equals("+") || stringArray[i].equals("-") || stringArray[i].equals("*") || stringArray[i].equals("/")) { int x = Integer.parseInt(pop()); int y = Integer.parseInt(pop()); result = calc(stringArray[i], y ,x); push(String.valueOf(result)); } else { push(stringArray[i]); } } System.out.println(result); } void push(String x) { top++; stack[top] = x; } String pop() { String x = stack[top]; top--; return x; } int calc(String optor, int x , int y) { int result = 0; switch (optor) { case "+" : result = x + y; break; case "-": result = x - y; break; case "*": result = x * y; break; case "/": result = x / y; break; } return result; } public static void main(String[] args) throws IOException { new Main().run(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 11, 1, 4, 18, 13, 30, 30, 14, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 35, 13, 34, 17, 1, 0, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 2, 13, 13, 3, 34, 1, 0, 13, 40, 17, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 110, 8 ], [ 110, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 18, 23 ], [ 24, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 25, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 33, 34 ], [ 34, 35 ], [ 25, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 39, 44 ], [ 36, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 36, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 36, 55 ], [ 55, 56 ], [ 36, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 61, 67 ], [ 57, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 70, 76 ], [ 57, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 79, 85 ], [ 57, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 36, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 11, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 101, 102 ], [ 102, 103 ], [ 11, 104 ], [ 104, 105 ], [ 105, 106 ], [ 9, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}\n\t\t\n \tSystem.out.println(stack.pop());\n \t\n sc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}\n\t\t\n \tSystem.out.println(stack.pop());\n \t\n sc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}\n\t\t\n \tSystem.out.println(stack.pop());\n \t\n sc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}\n\t\t\n \tSystem.out.println(stack.pop());\n \t\n sc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "for (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}", ";", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}", "{\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}", "if (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}", "sc.hasNextInt()", "sc.hasNextInt", "sc", "{\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t}", "stack.push(sc.nextInt())", "stack.push", "stack", "sc.nextInt()", "sc.nextInt", "sc", "{\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}", "char op = sc.next().charAt(0);", "op", "sc.next().charAt(0)", "sc.next().charAt", "sc.next()", "sc.next", "sc", "0", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int result;", "result", "switch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}", "op", "case '+':", "'+'", "case '+':", "result = a + b", "result", "a + b", "a", "b", "break;", "case '-':", "'-'", "case '-':", "result = a - b", "result", "a - b", "a", "b", "break;", "case '*':", "'*'", "case '*':", "result = a * b", "result", "a * b", "a", "b", "break;", "default:", "default:", "result = -1", "result", "-1", "1", "stack.push(result)", "stack.push", "stack", "result", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}\n\t\t\n \tSystem.out.println(stack.pop());\n \t\n sc.close();\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor (; sc.hasNext(); ) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tstack.push(sc.nextInt());\n\t\t\t} else {\n\t\t\t\tchar op = sc.next().charAt(0);\n\t\t\t\tint b = stack.pop();\n\t\t\t\tint a = stack.pop();\n\t\t\t\tint result;\n\t\t\t\tswitch (op) {\n\t\t\t\tcase '+':\n\t\t\t\t\tresult = a + b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tresult = a - b;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\tresult = a * b;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tresult = -1;\n\t\t\t\t}\n\t\t\t\tstack.push(result);\n\t\t\t}\n\t\t}\n\t\t\n \tSystem.out.println(stack.pop());\n \t\n sc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Stack<Integer> stack = new Stack<Integer>(); for (; sc.hasNext(); ) { if (sc.hasNextInt()) { stack.push(sc.nextInt()); } else { char op = sc.next().charAt(0); int b = stack.pop(); int a = stack.pop(); int result; switch (op) { case '+': result = a + b; break; case '-': result = a - b; break; case '*': result = a * b; break; default: result = -1; } stack.push(result); } } System.out.println(stack.pop()); sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 14, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 4, 18, 13, 17, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 108, 14 ], [ 108, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 32, 34 ], [ 32, 35 ], [ 36, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 37, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 52, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 63, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 63, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 17, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 103, 104 ], [ 15, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tString[] strs = reader.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tString[] strs = reader.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tString[] strs = reader.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tString[] strs = reader.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "BufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));", "reader", "new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in))", "String[] strs = reader.readLine().split(\" \");", "strs", "reader.readLine().split(\" \")", "reader.readLine().split", "reader.readLine()", "reader.readLine", "reader", "\" \"", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "for (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}", "String s", "strs", "{\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}", "{\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}", "if (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "Character.isDigit(s.charAt(0))", "Character.isDigit", "Character", "s.charAt(0)", "s.charAt", "s", "0", "stack.push(Integer.parseInt(s))", "stack.push", "stack", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "{\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "int pop1 = stack.pop();", "pop1", "stack.pop()", "stack.pop", "stack", "int pop2 = stack.pop();", "pop2", "stack.pop()", "stack.pop", "stack", "switch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "s.charAt(0)", "s.charAt", "s", "0", "case '+':", "'+'", "case '+':", "stack.push(pop2 + pop1)", "stack.push", "stack", "pop2 + pop1", "pop2", "pop1", "break;", "case '-':", "'-'", "case '-':", "stack.push(pop2 - pop1)", "stack.push", "stack", "pop2 - pop1", "pop2", "pop1", "break;", "default:", "default:", "stack.push(pop2 * pop1)", "stack.push", "stack", "pop2 * pop1", "pop2", "pop1", "break;", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tString[] strs = reader.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws NumberFormatException,\n\t\t\tIOException {\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\n\t\tString[] strs = reader.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\n\t\tfor (String s : strs) {\n\t\t\tif (Character.isDigit(s.charAt(0)))\n\t\t\t\tstack.push(Integer.parseInt(s));\n\t\t\telse {\n\t\t\t\tint pop1 = stack.pop();\n\t\t\t\tint pop2 = stack.pop();\n\t\t\t\tswitch (s.charAt(0)) {\n\t\t\t\tcase '+':\n\t\t\t\t\tstack.push(pop2 + pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tstack.push(pop2 - pop1);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstack.push(pop2 * pop1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*System.out.println(stack.stream().map(String::valueOf)\n\t\t\t\t\t.collect(Collectors.joining(\", \", \"[\", \"]\")));*/\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader reader = new BufferedReader(new InputStreamReader( System.in)); String[] strs = reader.readLine().split(" "); Stack<Integer> stack = new Stack<Integer>(); for (String s : strs) { if (Character.isDigit(s.charAt(0))) stack.push(Integer.parseInt(s)); else { int pop1 = stack.pop(); int pop2 = stack.pop(); switch (s.charAt(0)) { case '+': stack.push(pop2 + pop1); break; case '-': stack.push(pop2 - pop1); break; default: stack.push(pop2 * pop1); break; } } /*System.out.println(stack.stream().map(String::valueOf) .collect(Collectors.joining(", ", "[", "]")));*/ } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 17, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 29, 18, 13, 40, 13, 12, 13, 30, 0, 13, 20, 17, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 28, 13, 13, 30, 30, 35, 13, 34, 17, 30, 30, 41, 13, 4, 13, 41, 13, 4, 13, 4, 13, 2, 13, 13, 3, 34, 17, 30, 30, 41, 13, 4, 13, 41, 13, 4, 13, 4, 13, 2, 13, 13, 3, 34, 17, 30, 30, 41, 13, 4, 13, 41, 13, 4, 13, 4, 13, 2, 13, 13, 3, 34, 1, 4, 13, 4, 18, 13, 13, 3, 4, 18, 18, 13, 13, 4, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 128, 5 ], [ 128, 6 ], [ 6, 7 ], [ 128, 8 ], [ 8, 9 ], [ 8, 10 ], [ 128, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 14, 19 ], [ 11, 20 ], [ 20, 21 ], [ 128, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 128, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 42, 47 ], [ 32, 48 ], [ 48, 49 ], [ 48, 50 ], [ 48, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 58, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 58, 72 ], [ 53, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 76, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 76, 90 ], [ 53, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 94, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 105, 107 ], [ 94, 108 ], [ 53, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 110, 117 ], [ 32, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 30, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n private static int[] stack;\n private static int top=0;\n private static void push(int num){\n stack[++top]=num;\n }\n private static int pop(){\n return stack[top--];\n }\n public static void main(String[] args) {\n stack = new int[205];\n Scanner sc = new Scanner(System.in);\n String[] ss = sc.nextLine().split(\" \");\n for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }\n System.out.println(pop());\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n private static int[] stack;\n private static int top=0;\n private static void push(int num){\n stack[++top]=num;\n }\n private static int pop(){\n return stack[top--];\n }\n public static void main(String[] args) {\n stack = new int[205];\n Scanner sc = new Scanner(System.in);\n String[] ss = sc.nextLine().split(\" \");\n for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }\n System.out.println(pop());\n }\n}", "Main", "private static int[] stack;", "stack", "private static int top=0;", "top", "0", "private static void push(int num){\n stack[++top]=num;\n }", "push", "{\n stack[++top]=num;\n }", "stack[++top]=num", "stack[++top]", "stack", "++top", "top", "num", "int num", "num", "private static int pop(){\n return stack[top--];\n }", "pop", "{\n return stack[top--];\n }", "return stack[top--];", "stack[top--]", "stack", "top--", "top", "public static void main(String[] args) {\n stack = new int[205];\n Scanner sc = new Scanner(System.in);\n String[] ss = sc.nextLine().split(\" \");\n for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }\n System.out.println(pop());\n }", "main", "{\n stack = new int[205];\n Scanner sc = new Scanner(System.in);\n String[] ss = sc.nextLine().split(\" \");\n for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }\n System.out.println(pop());\n }", "stack = new int[205]", "stack", "new int[205]", "205", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String[] ss = sc.nextLine().split(\" \");", "ss", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }", "String s", "ss", "{\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }", "{\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }", "switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }", "s", "case \"+\":", "\"+\"", "case \"+\":", "{\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }", "int b = pop();", "b", "pop()", "pop", "int a = pop();", "a", "pop()", "pop", "push(a + b)", "push", "a + b", "a", "b", "break;", "case \"-\":", "\"-\"", "case \"-\":", "{\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }", "int b = pop();", "b", "pop()", "pop", "int a = pop();", "a", "pop()", "pop", "push(a - b)", "push", "a - b", "a", "b", "break;", "case \"*\":", "\"*\"", "case \"*\":", "{\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }", "int b = pop();", "b", "pop()", "pop", "int a = pop();", "a", "pop()", "pop", "push(a * b)", "push", "a * b", "a", "b", "break;", "default:", "default:", "push(Integer.parseInt(s))", "push", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "break;", "System.out.println(pop())", "System.out.println", "System.out", "System", "System.out", "pop()", "pop", "String[] args", "args", "public class Main {\n private static int[] stack;\n private static int top=0;\n private static void push(int num){\n stack[++top]=num;\n }\n private static int pop(){\n return stack[top--];\n }\n public static void main(String[] args) {\n stack = new int[205];\n Scanner sc = new Scanner(System.in);\n String[] ss = sc.nextLine().split(\" \");\n for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }\n System.out.println(pop());\n }\n}", "public class Main {\n private static int[] stack;\n private static int top=0;\n private static void push(int num){\n stack[++top]=num;\n }\n private static int pop(){\n return stack[top--];\n }\n public static void main(String[] args) {\n stack = new int[205];\n Scanner sc = new Scanner(System.in);\n String[] ss = sc.nextLine().split(\" \");\n for (String s : ss) {\n switch (s) {\n case \"+\": {\n int b = pop();\n int a = pop();\n push(a + b);\n break;\n }\n case \"-\": {\n int b = pop();\n int a = pop();\n push(a - b);\n break;\n }\n case \"*\": {\n int b = pop();\n int a = pop();\n push(a * b);\n break;\n }\n default:\n push(Integer.parseInt(s));\n break;\n }\n }\n System.out.println(pop());\n }\n}", "Main" ]
import java.util.Scanner; public class Main { private static int[] stack; private static int top=0; private static void push(int num){ stack[++top]=num; } private static int pop(){ return stack[top--]; } public static void main(String[] args) { stack = new int[205]; Scanner sc = new Scanner(System.in); String[] ss = sc.nextLine().split(" "); for (String s : ss) { switch (s) { case "+": { int b = pop(); int a = pop(); push(a + b); break; } case "-": { int b = pop(); int a = pop(); push(a - b); break; } case "*": { int b = pop(); int a = pop(); push(a * b); break; } default: push(Integer.parseInt(s)); break; } } System.out.println(pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 2, 2, 17, 4, 18, 13, 17, 2, 4, 18, 13, 17, 17, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 14, 2, 17, 4, 18, 13, 17, 30, 0, 13, 2, 13, 13, 14, 2, 17, 4, 18, 13, 17, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 110, 5 ], [ 110, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 26, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 33, 38 ], [ 25, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 39, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 25, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 50, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 61, 62 ], [ 50, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 63, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 63, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 76, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 76, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 92, 94 ], [ 50, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 8, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 105, 106 ], [ 6, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n LinkedList<Integer> stack = new LinkedList<Integer>();\n while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n LinkedList<Integer> stack = new LinkedList<Integer>();\n while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n LinkedList<Integer> stack = new LinkedList<Integer>();\n while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }\n\n System.out.println(stack.pop());\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n LinkedList<Integer> stack = new LinkedList<Integer>();\n while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }\n\n System.out.println(stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "LinkedList<Integer> stack = new LinkedList<Integer>();", "stack", "new LinkedList<Integer>()", "while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }", "String inp = sc.next();", "inp", "sc.next()", "sc.next", "sc", "if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }", "'0' <= inp.charAt(0) && inp.charAt(0) <= '9'", "'0' <= inp.charAt(0)", "'0'", "inp.charAt(0)", "inp.charAt", "inp", "0", "inp.charAt(0) <= '9'", "inp.charAt(0)", "inp.charAt", "inp", "0", "'9'", "{\n int num = Integer.parseInt(inp);\n stack.push(num);\n }", "int num = Integer.parseInt(inp);", "num", "Integer.parseInt(inp)", "Integer.parseInt", "Integer", "inp", "stack.push(num)", "stack.push", "stack", "num", "{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int c;", "c", "if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }", "'+' == inp.charAt(0)", "'+'", "inp.charAt(0)", "inp.charAt", "inp", "0", "{\n c = a + b;\n }", "c = a + b", "c", "a + b", "a", "b", "if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }", "'*' == inp.charAt(0)", "'*'", "inp.charAt(0)", "inp.charAt", "inp", "0", "{\n c = a * b;\n }", "c = a * b", "c", "a * b", "a", "b", "{\n c = a - b;\n }", "c = a - b", "c", "a - b", "a", "b", "stack.push(c)", "stack.push", "stack", "c", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n LinkedList<Integer> stack = new LinkedList<Integer>();\n while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n LinkedList<Integer> stack = new LinkedList<Integer>();\n while(sc.hasNext()){\n String inp = sc.next();\n if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){\n int num = Integer.parseInt(inp);\n stack.push(num);\n }else{\n int b = stack.pop();\n int a = stack.pop();\n int c;\n if('+' == inp.charAt(0)){\n c = a + b;\n }else if('*' == inp.charAt(0)){\n c = a * b;\n }else{\n c = a - b;\n }\n stack.push(c);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); LinkedList<Integer> stack = new LinkedList<Integer>(); while(sc.hasNext()){ String inp = sc.next(); if('0' <= inp.charAt(0) && inp.charAt(0) <= '9'){ int num = Integer.parseInt(inp); stack.push(num); }else{ int b = stack.pop(); int a = stack.pop(); int c; if('+' == inp.charAt(0)){ c = a + b; }else if('*' == inp.charAt(0)){ c = a * b; }else{ c = a - b; } stack.push(c); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 11, 1, 41, 13, 17, 4, 18, 13, 1, 0, 13, 17, 30, 30, 0, 13, 4, 18, 13, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 17, 23, 13, 12, 13, 30, 0, 18, 18, 36, 13, 13, 13, 40, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 17, 40, 13, 29, 18, 18, 36, 13, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 12, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 12, 21 ], [ 21, 22 ], [ 21, 23 ], [ 12, 24 ], [ 24, 25 ], [ 24, 26 ], [ 12, 27 ], [ 27, 28 ], [ 12, 29 ], [ 29, 30 ], [ 12, 31 ], [ 31, 32 ], [ 12, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 39, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 33, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 46, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 56, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 56, 73 ], [ 52, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 76, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 76, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 76, 93 ], [ 52, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 96, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 96, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 110, 112 ], [ 96, 113 ], [ 52, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 115, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 12, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 132, 133 ], [ 10, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 136, 140 ], [ 140, 141 ], [ 136, 142 ], [ 142, 143 ], [ 136, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 146, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 152, 156 ], [ 146, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 158, 162 ], [ 144, 163 ], [ 163, 164 ], [ 136, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 169, 173 ], [ 168, 174 ], [ 167, 175 ], [ 175, 176 ], [ 165, 177 ], [ 177, 178 ], [ 136, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 182, 186 ], [ 186, 187 ], [ 181, 188 ], [ 188, 189 ], [ 181, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 191, 195 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n\n static intStack stack;\n static Scanner scan;\n \n public static void main(String[] args) {\n\t// get from Std in\n\tscan = new Scanner(System.in);\n String input = scan.nextLine();\n\n\t// scan: input string\n\tscan = new Scanner(input);\n\n\t// create: stack\n\tintStack s = new intStack(100);\n\n\t// start: calc.\n\tString c; // token\n\tint a, b; // number: use in calc\n\tfor(int i = 0; scan.hasNext(); i += 2) {\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}\n\tSystem.out.println(s.pop());\n\t\n }\n}\n\nclass intStack {\n private static int length;\n private static int[] Stack;\n private static int current;\n\n public intStack(int length) {\n\tthis.length = length;\n\tthis.Stack = new int[length];\n\tthis.current = 0;\n }\n\n public void push(int data) {\n\tthis.Stack[current] = data;\n\tcurrent++;\n }\n\n public int pop() {\n\tif (current == 0) return 0;\n\tcurrent--;\n\treturn this.Stack[current];\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\n static intStack stack;\n static Scanner scan;\n \n public static void main(String[] args) {\n\t// get from Std in\n\tscan = new Scanner(System.in);\n String input = scan.nextLine();\n\n\t// scan: input string\n\tscan = new Scanner(input);\n\n\t// create: stack\n\tintStack s = new intStack(100);\n\n\t// start: calc.\n\tString c; // token\n\tint a, b; // number: use in calc\n\tfor(int i = 0; scan.hasNext(); i += 2) {\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}\n\tSystem.out.println(s.pop());\n\t\n }\n}", "Main", "static intStack stack;", "stack", "static Scanner scan;", "scan", "public static void main(String[] args) {\n\t// get from Std in\n\tscan = new Scanner(System.in);\n String input = scan.nextLine();\n\n\t// scan: input string\n\tscan = new Scanner(input);\n\n\t// create: stack\n\tintStack s = new intStack(100);\n\n\t// start: calc.\n\tString c; // token\n\tint a, b; // number: use in calc\n\tfor(int i = 0; scan.hasNext(); i += 2) {\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}\n\tSystem.out.println(s.pop());\n\t\n }", "main", "{\n\t// get from Std in\n\tscan = new Scanner(System.in);\n String input = scan.nextLine();\n\n\t// scan: input string\n\tscan = new Scanner(input);\n\n\t// create: stack\n\tintStack s = new intStack(100);\n\n\t// start: calc.\n\tString c; // token\n\tint a, b; // number: use in calc\n\tfor(int i = 0; scan.hasNext(); i += 2) {\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}\n\tSystem.out.println(s.pop());\n\t\n }", "scan = new Scanner(System.in)", "scan", "new Scanner(System.in)", "String input = scan.nextLine();", "input", "scan.nextLine()", "scan.nextLine", "scan", "scan = new Scanner(input)", "scan", "new Scanner(input)", "intStack s = new intStack(100);", "s", "new intStack(100)", "String c;", "c", "int a", "a", "b;", "b", "for(int i = 0; scan.hasNext(); i += 2) {\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}", "int i = 0;", "int i = 0;", "i", "0", "scan.hasNext()", "scan.hasNext", "scan", "i += 2", "i += 2", "i", "2", "{\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}", "{\n\t c = scan.next();\n\t switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }\n\t}", "c = scan.next()", "c", "scan.next()", "scan.next", "scan", "switch (c) {\n\t case \"+\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t s.push(b + a);\n\t\tbreak;\n\t case \"-\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b - a);\n\t\tbreak;\n\t case \"*\":\n\t\ta = s.pop();\n\t\tb = s.pop();\n\t\ts.push(b * a);\n\t\tbreak;\n\t default:\n\t\tint n = Integer.parseInt(c);\n\t\ts.push(n);\n\t }", "c", "case \"+\":", "\"+\"", "case \"+\":", "a = s.pop()", "a", "s.pop()", "s.pop", "s", "b = s.pop()", "b", "s.pop()", "s.pop", "s", "s.push(b + a)", "s.push", "s", "b + a", "b", "a", "break;", "case \"-\":", "\"-\"", "case \"-\":", "a = s.pop()", "a", "s.pop()", "s.pop", "s", "b = s.pop()", "b", "s.pop()", "s.pop", "s", "s.push(b - a)", "s.push", "s", "b - a", "b", "a", "break;", "case \"*\":", "\"*\"", "case \"*\":", "a = s.pop()", "a", "s.pop()", "s.pop", "s", "b = s.pop()", "b", "s.pop()", "s.pop", "s", "s.push(b * a)", "s.push", "s", "b * a", "b", "a", "break;", "default:", "default:", "int n = Integer.parseInt(c);", "n", "Integer.parseInt(c)", "Integer.parseInt", "Integer", "c", "s.push(n)", "s.push", "s", "n", "System.out.println(s.pop())", "System.out.println", "System.out", "System", "System.out", "s.pop()", "s.pop", "s", "String[] args", "args", "class intStack {\n private static int length;\n private static int[] Stack;\n private static int current;\n\n public intStack(int length) {\n\tthis.length = length;\n\tthis.Stack = new int[length];\n\tthis.current = 0;\n }\n\n public void push(int data) {\n\tthis.Stack[current] = data;\n\tcurrent++;\n }\n\n public int pop() {\n\tif (current == 0) return 0;\n\tcurrent--;\n\treturn this.Stack[current];\n }\n}", "intStack", "private static int length;", "length", "private static int[] Stack;", "Stack", "private static int current;", "current", "public intStack(int length) {\n\tthis.length = length;\n\tthis.Stack = new int[length];\n\tthis.current = 0;\n }", "intStack", "{\n\tthis.length = length;\n\tthis.Stack = new int[length];\n\tthis.current = 0;\n }", "this.length = length", "this.length", "this", "this.length", "length", "this.Stack = new int[length]", "this.Stack", "this", "this.Stack", "new int[length]", "length", "this.current = 0", "this.current", "this", "this.current", "0", "int length", "length", "public void push(int data) {\n\tthis.Stack[current] = data;\n\tcurrent++;\n }", "push", "{\n\tthis.Stack[current] = data;\n\tcurrent++;\n }", "this.Stack[current] = data", "this.Stack[current]", "this.Stack", "this", "this.Stack", "current", "data", "current++", "current", "int data", "data", "public int pop() {\n\tif (current == 0) return 0;\n\tcurrent--;\n\treturn this.Stack[current];\n }", "pop", "{\n\tif (current == 0) return 0;\n\tcurrent--;\n\treturn this.Stack[current];\n }", "if (current == 0) return 0;", "current == 0", "current", "0", "return 0;", "0", "current--", "current", "return this.Stack[current];", "this.Stack[current]", "this.Stack", "this", "this.Stack", "current" ]
import java.util.Scanner; class Main { static intStack stack; static Scanner scan; public static void main(String[] args) { // get from Std in scan = new Scanner(System.in); String input = scan.nextLine(); // scan: input string scan = new Scanner(input); // create: stack intStack s = new intStack(100); // start: calc. String c; // token int a, b; // number: use in calc for(int i = 0; scan.hasNext(); i += 2) { c = scan.next(); switch (c) { case "+": a = s.pop(); b = s.pop(); s.push(b + a); break; case "-": a = s.pop(); b = s.pop(); s.push(b - a); break; case "*": a = s.pop(); b = s.pop(); s.push(b * a); break; default: int n = Integer.parseInt(c); s.push(n); } } System.out.println(s.pop()); } } class intStack { private static int length; private static int[] Stack; private static int current; public intStack(int length) { this.length = length; this.Stack = new int[length]; this.current = 0; } public void push(int data) { this.Stack[current] = data; current++; } public int pop() { if (current == 0) return 0; current--; return this.Stack[current]; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 17, 0, 13, 40, 17, 12, 13, 30, 38, 5, 13, 30, 41, 13, 4, 18, 13, 17, 35, 13, 34, 17, 1, 41, 13, 2, 18, 13, 2, 13, 17, 18, 13, 13, 0, 18, 13, 2, 13, 17, 13, 40, 13, 3, 34, 17, 1, 41, 13, 2, 18, 13, 2, 13, 17, 18, 13, 13, 0, 18, 13, 40, 13, 13, 3, 34, 17, 1, 41, 13, 2, 18, 13, 2, 13, 17, 18, 13, 13, 0, 18, 13, 40, 13, 13, 3, 30, 41, 13, 4, 18, 13, 13, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 29, 18, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 157, 5 ], [ 157, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 32, 33 ], [ 6, 34 ], [ 34, 35 ], [ 157, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 36, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 36, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 59, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 70, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 82, 88 ], [ 70, 89 ], [ 89, 90 ], [ 70, 91 ], [ 66, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 97, 103 ], [ 103, 104 ], [ 103, 105 ], [ 94, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 106, 111 ], [ 94, 112 ], [ 66, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 118, 124 ], [ 124, 125 ], [ 124, 126 ], [ 115, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 127, 132 ], [ 115, 133 ], [ 56, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 134, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 141, 146 ], [ 53, 147 ], [ 147, 148 ], [ 36, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 0, 156 ], [ 156, 157 ], [ 156, 158 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMyStack stack = new MyStack();\n\n\t\twhile(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}\n\n\t\tSystem.out.println(stack.peek());\n\t}\n\n\tstatic class MyStack{\n\t\tlong[] arr;\n\t\tint tail;\n\n\t\tMyStack() {\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}\n\n\t\tvoid push(String str) {\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong peek() {\n\t\t\treturn arr[tail];\n\t\t}\n\t}\n\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMyStack stack = new MyStack();\n\n\t\twhile(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}\n\n\t\tSystem.out.println(stack.peek());\n\t}\n\n\tstatic class MyStack{\n\t\tlong[] arr;\n\t\tint tail;\n\n\t\tMyStack() {\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}\n\n\t\tvoid push(String str) {\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong peek() {\n\t\t\treturn arr[tail];\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMyStack stack = new MyStack();\n\n\t\twhile(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}\n\n\t\tSystem.out.println(stack.peek());\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tMyStack stack = new MyStack();\n\n\t\twhile(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}\n\n\t\tSystem.out.println(stack.peek());\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "MyStack stack = new MyStack();", "stack", "new MyStack()", "while(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}", "in.hasNext()", "in.hasNext", "in", "{\n\t\t\tstack.push(in.next());\n\t\t}", "stack.push(in.next())", "stack.push", "stack", "in.next()", "in.next", "in", "System.out.println(stack.peek())", "System.out.println", "System.out", "System", "System.out", "stack.peek()", "stack.peek", "stack", "String[] args", "args", "static class MyStack{\n\t\tlong[] arr;\n\t\tint tail;\n\n\t\tMyStack() {\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}\n\n\t\tvoid push(String str) {\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong peek() {\n\t\t\treturn arr[tail];\n\t\t}\n\t}", "MyStack", "long[] arr;", "arr", "int tail;", "tail", "MyStack() {\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}", "MyStack", "{\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}", "arr = new long[100]", "arr", "new long[100]", "100", "tail = -1", "tail", "-1", "1", "void push(String str) {\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "push", "{\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "try {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "Exception e", "{\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "char op = str.charAt(0);", "op", "str.charAt(0)", "str.charAt", "str", "0", "switch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}", "op", "case '+':", "'+'", "case '+':", "long eq1 = arr[tail - 1] + arr[tail];", "eq1", "arr[tail - 1] + arr[tail]", "arr[tail - 1]", "arr", "tail - 1", "tail", "1", "arr[tail]", "arr", "tail", "arr[tail - 1] = eq1", "arr[tail - 1]", "arr", "tail - 1", "tail", "1", "eq1", "tail--", "tail", "break;", "case '-':", "'-'", "case '-':", "long eq2 = arr[tail - 1] - arr[tail];", "eq2", "arr[tail - 1] - arr[tail]", "arr[tail - 1]", "arr", "tail - 1", "tail", "1", "arr[tail]", "arr", "tail", "arr[--tail] = eq2", "arr[--tail]", "arr", "--tail", "tail", "eq2", "break;", "case '*':", "'*'", "case '*':", "long eq3 = arr[tail - 1] * arr[tail];", "eq3", "arr[tail - 1] * arr[tail]", "arr[tail - 1]", "arr", "tail - 1", "tail", "1", "arr[tail]", "arr", "tail", "arr[--tail] = eq3", "arr[--tail]", "arr", "--tail", "tail", "eq3", "break;", "{\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}", "long v = Long.parseLong(str);", "v", "Long.parseLong(str)", "Long.parseLong", "Long", "str", "arr[++tail] = v", "arr[++tail]", "arr", "++tail", "tail", "v", "String str", "str", "long peek() {\n\t\t\treturn arr[tail];\n\t\t}", "peek", "{\n\t\t\treturn arr[tail];\n\t\t}", "return arr[tail];", "arr[tail]", "arr", "tail", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMyStack stack = new MyStack();\n\n\t\twhile(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}\n\n\t\tSystem.out.println(stack.peek());\n\t}\n\n\tstatic class MyStack{\n\t\tlong[] arr;\n\t\tint tail;\n\n\t\tMyStack() {\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}\n\n\t\tvoid push(String str) {\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong peek() {\n\t\t\treturn arr[tail];\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMyStack stack = new MyStack();\n\n\t\twhile(in.hasNext()) {\n\t\t\tstack.push(in.next());\n\t\t}\n\n\t\tSystem.out.println(stack.peek());\n\t}\n\n\tstatic class MyStack{\n\t\tlong[] arr;\n\t\tint tail;\n\n\t\tMyStack() {\n\t\t\tarr = new long[100];\n\t\t\ttail = -1;\n\t\t}\n\n\t\tvoid push(String str) {\n\n\t\t\ttry {\n\t\t\t\tlong v = Long.parseLong(str);\n\t\t\t\t//System.out.println(\"insert\" + v);\n arr[++tail] = v;\n //System.out.println(\"tail\" + tail);\n\t\t\t}catch(Exception e) {\n //System.out.println(\"calc operetion requested\");\n\t\t\t\tchar op = str.charAt(0);\n\n\t\t\t\tswitch(op) {\n\t\t\t\t\tcase '+': \n\t\t\t\t\t\tlong eq1 = arr[tail - 1] + arr[tail];\n arr[tail - 1] = eq1;\n tail--;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\tlong eq2 = arr[tail - 1] - arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq2;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\tlong eq3 = arr[tail - 1] * arr[tail];\n\t\t\t\t\t\tarr[--tail] = eq3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tlong peek() {\n\t\t\treturn arr[tail];\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); MyStack stack = new MyStack(); while(in.hasNext()) { stack.push(in.next()); } System.out.println(stack.peek()); } static class MyStack{ long[] arr; int tail; MyStack() { arr = new long[100]; tail = -1; } void push(String str) { try { long v = Long.parseLong(str); //System.out.println("insert" + v); arr[++tail] = v; //System.out.println("tail" + tail); }catch(Exception e) { //System.out.println("calc operetion requested"); char op = str.charAt(0); switch(op) { case '+': long eq1 = arr[tail - 1] + arr[tail]; arr[tail - 1] = eq1; tail--; break; case '-': long eq2 = arr[tail - 1] - arr[tail]; arr[--tail] = eq2; break; case '*': long eq3 = arr[tail - 1] * arr[tail]; arr[--tail] = eq3; break; } } } long peek() { return arr[tail]; } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 2, 40, 17, 4, 18, 13, 4, 18, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 4, 18, 13, 2, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 149, 14 ], [ 149, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 26, 31 ], [ 17, 32 ], [ 32, 33 ], [ 32, 34 ], [ 17, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 50, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 61, 65 ], [ 65, 66 ], [ 66, 67 ], [ 50, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 68, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 79, 86 ], [ 86, 87 ], [ 87, 88 ], [ 68, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 100, 104 ], [ 104, 105 ], [ 105, 106 ], [ 89, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 107, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 114, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 123, 127 ], [ 107, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 135, 136 ], [ 135, 137 ], [ 17, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 138, 143 ], [ 143, 144 ], [ 144, 145 ], [ 15, 146 ], [ 146, 147 ], [ 0, 148 ], [ 148, 149 ], [ 148, 150 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\npublic class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tString[] str = br.readLine().split(\" \");\n\t\tint a = 0 ;\n\t\tfor(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tString[] str = br.readLine().split(\" \");\n\t\tint a = 0 ;\n\t\tfor(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tString[] str = br.readLine().split(\" \");\n\t\tint a = 0 ;\n\t\tfor(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tString[] str = br.readLine().split(\" \");\n\t\tint a = 0 ;\n\t\tfor(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "String[] str = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int a = 0 ;", "a", "0", "for(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < str.length", "i", "str.length", "str", "str.length", "i ++", "i ++", "i", "{\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}", "{\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}", "if(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"+\")", "str[i].equals", "str[i]", "str", "i", "\"+\"", "{\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}", "stack.push(stack.pop()+stack.pop())", "stack.push", "stack", "stack.pop()+stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"-\")", "str[i].equals", "str[i]", "str", "i", "\"-\"", "{\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}", "stack.push(-1*stack.pop()+stack.pop())", "stack.push", "stack", "-1*stack.pop()+stack.pop()", "-1*stack.pop()", "-1", "1", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"*\")", "str[i].equals", "str[i]", "str", "i", "\"*\"", "{\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}", "stack.push(stack.pop()*stack.pop())", "stack.push", "stack", "stack.pop()*stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "str[i].equals(\"/\")", "str[i].equals", "str[i]", "str", "i", "\"/\"", "{\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push(stack.pop()/a)", "stack.push", "stack", "stack.pop()/a", "stack.pop()", "stack.pop", "stack", "a", "{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}", "stack.push(Integer.parseInt(str[i]))", "stack.push", "stack", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tString[] str = br.readLine().split(\" \");\n\t\tint a = 0 ;\n\t\tfor(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\tString[] str = br.readLine().split(\" \");\n\t\tint a = 0 ;\n\t\tfor(int i = 0 ; i < str.length ; i ++){\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tstack.push(stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"-\")){\n\t\t\t\tstack.push(-1*stack.pop()+stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"*\")){\n\t\t\t\tstack.push(stack.pop()*stack.pop());\n\t\t\t}\n\t\t\telse if(str[i].equals(\"/\")){\n\t\t\t\ta = stack.pop();\n\t\t\t\tstack.push(stack.pop()/a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//System.out.println(str[i]+\": push now\");\n\t\t\t\tstack.push(Integer.parseInt(str[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Stack<Integer> stack = new Stack<Integer>(); String[] str = br.readLine().split(" "); int a = 0 ; for(int i = 0 ; i < str.length ; i ++){ if(str[i].equals("+")){ stack.push(stack.pop()+stack.pop()); } else if(str[i].equals("-")){ stack.push(-1*stack.pop()+stack.pop()); } else if(str[i].equals("*")){ stack.push(stack.pop()*stack.pop()); } else if(str[i].equals("/")){ a = stack.pop(); stack.push(stack.pop()/a); } else{ //System.out.println(str[i]+": push now"); stack.push(Integer.parseInt(str[i])); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 17, 28, 13, 13, 30, 30, 14, 2, 13, 17, 30, 14, 2, 13, 17, 30, 0, 18, 13, 13, 13, 0, 13, 17, 40, 13, 0, 13, 17, 14, 2, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 14, 2, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 14, 2, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 30, 14, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 30, 0, 13, 2, 13, 17, 0, 13, 17, 4, 18, 18, 13, 13, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 170, 5 ], [ 170, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 28, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 35, 38 ], [ 39, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 49, 55 ], [ 55, 56 ], [ 55, 57 ], [ 49, 58 ], [ 58, 59 ], [ 49, 60 ], [ 60, 61 ], [ 60, 62 ], [ 40, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 68, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 74, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 67, 85 ], [ 85, 86 ], [ 63, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 98, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 91, 109 ], [ 109, 110 ], [ 87, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 116, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 122, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 130, 132 ], [ 115, 133 ], [ 133, 134 ], [ 111, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 143, 149 ], [ 136, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 135, 156 ], [ 156, 157 ], [ 156, 158 ], [ 8, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 159, 164 ], [ 164, 165 ], [ 164, 166 ], [ 6, 167 ], [ 167, 168 ], [ 0, 169 ], [ 169, 170 ], [ 169, 171 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n String po=s.nextLine();\n char a[]=po.toCharArray();\n int i=0,tmp=0,check=0;\n int b[]=new int[200];\n for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }\n System.out.println(b[0]);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n String po=s.nextLine();\n char a[]=po.toCharArray();\n int i=0,tmp=0,check=0;\n int b[]=new int[200];\n for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }\n System.out.println(b[0]);\n }\n}", "Main", "public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n String po=s.nextLine();\n char a[]=po.toCharArray();\n int i=0,tmp=0,check=0;\n int b[]=new int[200];\n for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }\n System.out.println(b[0]);\n }", "main", "{\n Scanner s=new Scanner(System.in);\n String po=s.nextLine();\n char a[]=po.toCharArray();\n int i=0,tmp=0,check=0;\n int b[]=new int[200];\n for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }\n System.out.println(b[0]);\n }", "Scanner s=new Scanner(System.in);", "s", "new Scanner(System.in)", "String po=s.nextLine();", "po", "s.nextLine()", "s.nextLine", "s", "char a[]=po.toCharArray();", "a", "po.toCharArray()", "po.toCharArray", "po", "int i=0", "i", "0", "tmp=0", "tmp", "0", "check=0;", "check", "0", "int b[]=new int[200];", "b", "new int[200]", "200", "for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }", "char a1", "a", "{\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }", "{\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }", "if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }", "a1==' '", "a1", "' '", "{\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }", "if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }", "check==1", "check", "1", "{\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }", "b[i]=tmp", "b[i]", "b", "i", "tmp", "check=0", "check", "0", "i++", "i", "tmp=0", "tmp", "0", "if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }", "a1=='+'", "a1", "'+'", "{ b[i-2]=b[i-2]+b[i-1]; i--;}", "b[i-2]=b[i-2]+b[i-1]", "b[i-2]", "b", "i-2", "i", "2", "b[i-2]+b[i-1]", "b[i-2]", "b", "i-2", "i", "2", "b[i-1]", "b", "i-1", "i", "1", "i--", "i", "if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }", "a1=='-'", "a1", "'-'", "{ b[i-2]=b[i-2]-b[i-1]; i--;}", "b[i-2]=b[i-2]-b[i-1]", "b[i-2]", "b", "i-2", "i", "2", "b[i-2]-b[i-1]", "b[i-2]", "b", "i-2", "i", "2", "b[i-1]", "b", "i-1", "i", "1", "i--", "i", "if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }", "a1=='*'", "a1", "'*'", "{ b[i-2]=b[i-2]*b[i-1]; i--;}", "b[i-2]=b[i-2]*b[i-1]", "b[i-2]", "b", "i-2", "i", "2", "b[i-2]*b[i-1]", "b[i-2]", "b", "i-2", "i", "2", "b[i-1]", "b", "i-1", "i", "1", "i--", "i", "{\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }", "if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }", "check==1", "check", "1", "{\n tmp=tmp*10+a1-'0';\n }", "tmp=tmp*10+a1-'0'", "tmp", "tmp*10+a1-'0'", "tmp*10+a1", "tmp*10", "tmp", "10", "a1", "'0'", "{\n tmp=a1-'0';\n }", "tmp=a1-'0'", "tmp", "a1-'0'", "a1", "'0'", "check=1", "check", "1", "System.out.println(b[0])", "System.out.println", "System.out", "System", "System.out", "b[0]", "b", "0", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n String po=s.nextLine();\n char a[]=po.toCharArray();\n int i=0,tmp=0,check=0;\n int b[]=new int[200];\n for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }\n System.out.println(b[0]);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n String po=s.nextLine();\n char a[]=po.toCharArray();\n int i=0,tmp=0,check=0;\n int b[]=new int[200];\n for(char a1 : a){\n //System.out.println(a1);\n if(a1==' '){\n if(check==1){\n b[i]=tmp;\n check=0;\n i++;\n tmp=0;\n }\n }\n else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;}\n else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;}\n else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;}\n else {\n if(check==1){\n tmp=tmp*10+a1-'0';\n }else{\n tmp=a1-'0';\n }\n check=1;\n }\n }\n System.out.println(b[0]);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s=new Scanner(System.in); String po=s.nextLine(); char a[]=po.toCharArray(); int i=0,tmp=0,check=0; int b[]=new int[200]; for(char a1 : a){ //System.out.println(a1); if(a1==' '){ if(check==1){ b[i]=tmp; check=0; i++; tmp=0; } } else if(a1=='+'){ b[i-2]=b[i-2]+b[i-1]; i--;} else if(a1=='-'){ b[i-2]=b[i-2]-b[i-1]; i--;} else if(a1=='*'){ b[i-2]=b[i-2]*b[i-1]; i--;} else { if(check==1){ tmp=tmp*10+a1-'0'; }else{ tmp=a1-'0'; } check=1; } } System.out.println(b[0]); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 17, 41, 13, 12, 13, 30, 0, 13, 20, 13, 0, 13, 40, 17, 12, 13, 30, 29, 18, 13, 40, 13, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 29, 18, 13, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 18, 13, 13, 17, 41, 13, 41, 13, 35, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 2, 17, 18, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 8, 10 ], [ 4, 11 ], [ 11, 12 ], [ 4, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 4, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 4, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 35, 40 ], [ 32, 41 ], [ 41, 42 ], [ 4, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 0, 50 ], [ 203, 51 ], [ 203, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 60, 65 ], [ 54, 66 ], [ 66, 67 ], [ 66, 68 ], [ 54, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 69, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 83, 92 ], [ 92, 93 ], [ 83, 94 ], [ 94, 95 ], [ 83, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 100, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 100, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 100, 117 ], [ 96, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 120, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 120, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 134, 136 ], [ 120, 137 ], [ 96, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 140, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 140, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 154, 155 ], [ 154, 156 ], [ 140, 157 ], [ 96, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 164, 165 ], [ 160, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 160, 171 ], [ 171, 172 ], [ 172, 173 ], [ 171, 174 ], [ 174, 175 ], [ 174, 176 ], [ 160, 177 ], [ 96, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 180, 183 ], [ 183, 184 ], [ 184, 185 ], [ 183, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 188, 190 ], [ 179, 191 ], [ 54, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 192, 197 ], [ 197, 198 ], [ 198, 199 ], [ 52, 200 ], [ 200, 201 ], [ 0, 202 ], [ 202, 203 ], [ 202, 204 ] ]
[ "import java.io.*;\n\nclass Stack{\n\tprivate int[] StackArray;\n\tprivate final int maxSize = 100;\n\tprivate int top;\n\t\n\tpublic Stack(){\n\t\tStackArray = new int[maxSize];\n\t\ttop = -1;\n\t}\n\tpublic int pop(){\n\t\treturn StackArray[top--];\n\t}\n\tpublic void push(int o){\n\t\tStackArray[++top] = o;\n\t}\n\tpublic int peak(){\n\t\treturn StackArray[top];\n\t}\n}\n\npublic class Main {\n\tpublic static void main(String[] args)throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] op = br.readLine().split(\" \");\n\t\tStack st = new Stack();\n\t\t\n\t\tfor(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.peak());\n\t}\n}", "import java.io.*;", "io.*", "java", "class Stack{\n\tprivate int[] StackArray;\n\tprivate final int maxSize = 100;\n\tprivate int top;\n\t\n\tpublic Stack(){\n\t\tStackArray = new int[maxSize];\n\t\ttop = -1;\n\t}\n\tpublic int pop(){\n\t\treturn StackArray[top--];\n\t}\n\tpublic void push(int o){\n\t\tStackArray[++top] = o;\n\t}\n\tpublic int peak(){\n\t\treturn StackArray[top];\n\t}\n}", "Stack", "private int[] StackArray;", "StackArray", "private final int maxSize = 100;", "maxSize", "100", "private int top;", "top", "public Stack(){\n\t\tStackArray = new int[maxSize];\n\t\ttop = -1;\n\t}", "Stack", "{\n\t\tStackArray = new int[maxSize];\n\t\ttop = -1;\n\t}", "StackArray = new int[maxSize]", "StackArray", "new int[maxSize]", "maxSize", "top = -1", "top", "-1", "1", "public int pop(){\n\t\treturn StackArray[top--];\n\t}", "pop", "{\n\t\treturn StackArray[top--];\n\t}", "return StackArray[top--];", "StackArray[top--]", "StackArray", "top--", "top", "public void push(int o){\n\t\tStackArray[++top] = o;\n\t}", "push", "{\n\t\tStackArray[++top] = o;\n\t}", "StackArray[++top] = o", "StackArray[++top]", "StackArray", "++top", "top", "o", "int o", "o", "public int peak(){\n\t\treturn StackArray[top];\n\t}", "peak", "{\n\t\treturn StackArray[top];\n\t}", "return StackArray[top];", "StackArray[top]", "StackArray", "top", "public class Main {\n\tpublic static void main(String[] args)throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] op = br.readLine().split(\" \");\n\t\tStack st = new Stack();\n\t\t\n\t\tfor(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.peak());\n\t}\n}", "Main", "public static void main(String[] args)throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] op = br.readLine().split(\" \");\n\t\tStack st = new Stack();\n\t\t\n\t\tfor(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.peak());\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] op = br.readLine().split(\" \");\n\t\tStack st = new Stack();\n\t\t\n\t\tfor(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.peak());\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] op = br.readLine().split(\" \");", "op", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Stack st = new Stack();", "st", "new Stack()", "for(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i<op.length", "i", "op.length", "op", "op.length", "i++", "i++", "i", "{\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "{\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "char ch = op[i].charAt(0);", "ch", "op[i].charAt(0)", "op[i].charAt", "op[i]", "op", "i", "0", "int a", "a", "b;", "b", "switch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}", "ch", "case '+':", "'+'", "case '+':", "a = st.pop()", "a", "st.pop()", "st.pop", "st", "b = st.pop()", "b", "st.pop()", "st.pop", "st", "st.push(b+a)", "st.push", "st", "b+a", "b", "a", "break;", "case '-':", "'-'", "case '-':", "a = st.pop()", "a", "st.pop()", "st.pop", "st", "b = st.pop()", "b", "st.pop()", "st.pop", "st", "st.push(b-a)", "st.push", "st", "b-a", "b", "a", "break;", "case '*':", "'*'", "case '*':", "a = st.pop()", "a", "st.pop()", "st.pop", "st", "b = st.pop()", "b", "st.pop()", "st.pop", "st", "st.push(b*a)", "st.push", "st", "b*a", "b", "a", "break;", "case '/':", "'/'", "case '/':", "a = st.pop()", "a", "st.pop()", "st.pop", "st", "b = st.pop()", "b", "st.pop()", "st.pop", "st", "st.push(b/a)", "st.push", "st", "b/a", "b", "a", "break;", "default:", "default:", "st.push(Integer.parseInt(\"\"+op[i]))", "st.push", "st", "Integer.parseInt(\"\"+op[i])", "Integer.parseInt", "Integer", "\"\"+op[i]", "\"\"", "op[i]", "op", "i", "break;", "System.out.println(st.peak())", "System.out.println", "System.out", "System", "System.out", "st.peak()", "st.peak", "st", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args)throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] op = br.readLine().split(\" \");\n\t\tStack st = new Stack();\n\t\t\n\t\tfor(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.peak());\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args)throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] op = br.readLine().split(\" \");\n\t\tStack st = new Stack();\n\t\t\n\t\tfor(int i = 0;i<op.length;i++){\n\t\t\tchar ch = op[i].charAt(0);\n\t\t\tint a,b;\n\t\t\tswitch(ch){\n\t\t\t\tcase '+':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b+a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b-a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b*a);\n\t\t\t\t\tbreak;\n\t\t\t\tcase '/':\n\t\t\t\t\ta = st.pop();\n\t\t\t\t\tb = st.pop();\n\t\t\t\t\tst.push(b/a);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tst.push(Integer.parseInt(\"\"+op[i]));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(st.peak());\n\t}\n}", "Main" ]
import java.io.*; class Stack{ private int[] StackArray; private final int maxSize = 100; private int top; public Stack(){ StackArray = new int[maxSize]; top = -1; } public int pop(){ return StackArray[top--]; } public void push(int o){ StackArray[++top] = o; } public int peak(){ return StackArray[top]; } } public class Main { public static void main(String[] args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] op = br.readLine().split(" "); Stack st = new Stack(); for(int i = 0;i<op.length;i++){ char ch = op[i].charAt(0); int a,b; switch(ch){ case '+': a = st.pop(); b = st.pop(); st.push(b+a); break; case '-': a = st.pop(); b = st.pop(); st.push(b-a); break; case '*': a = st.pop(); b = st.pop(); st.push(b*a); break; case '/': a = st.pop(); b = st.pop(); st.push(b/a); break; default: st.push(Integer.parseInt(""+op[i])); break; } } System.out.println(st.peak()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 40, 4, 18, 18, 13, 13, 17, 40, 4, 18, 18, 13, 13, 17, 40, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 20, 13, 0, 18, 36, 13, 17, 23, 13, 12, 13, 30, 0, 18, 18, 36, 13, 18, 36, 13, 13, 40, 18, 36, 13, 23, 13, 12, 13, 30, 40, 18, 36, 13, 41, 13, 18, 18, 36, 13, 18, 36, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 229, 11 ], [ 229, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 46, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 44, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 44, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 79, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 86, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 86, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 86, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 79, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 106, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 113, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 113, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 113, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 106, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 133, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 140, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 140, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 140, 156 ], [ 156, 157 ], [ 157, 158 ], [ 156, 159 ], [ 14, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 160, 165 ], [ 165, 166 ], [ 166, 167 ], [ 12, 168 ], [ 168, 169 ], [ 229, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 170, 174 ], [ 174, 175 ], [ 170, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 179, 183 ], [ 178, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 185, 189 ], [ 176, 190 ], [ 190, 191 ], [ 170, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 196, 200 ], [ 200, 201 ], [ 200, 202 ], [ 195, 203 ], [ 194, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 192, 208 ], [ 208, 209 ], [ 170, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 212, 217 ], [ 217, 218 ], [ 217, 219 ], [ 219, 220 ], [ 220, 221 ], [ 220, 222 ], [ 219, 223 ], [ 223, 224 ], [ 223, 225 ], [ 212, 226 ], [ 226, 227 ], [ 0, 228 ], [ 228, 229 ], [ 228, 230 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tprivate static class Stack {\n\n\t\tprivate int [] data;\n\t\tprivate int top;\n\n\t\t// ????????????Stack stack = new Stack(?????????????????????);???\n\t\tpublic Stack(int stackSize) {\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}\n\n\t\t// ?????????????????????????????????????????????\n\t\t// ????????????\n\t\t// stack.push(?????????);\n\t\tpublic void push(int pushData) {\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}\n\n\t\t// ??????????????????????????????????????????????????????\n\t\t// ????????????\n\t\t// int data = stack.pop();\n\t\tpublic int pop() {\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] formula = br.readLine().split(\" \");\n\n\t\tStack stack = new Stack(100);\n\n\t\tfor(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n\tprivate static class Stack {\n\n\t\tprivate int [] data;\n\t\tprivate int top;\n\n\t\t// ????????????Stack stack = new Stack(?????????????????????);???\n\t\tpublic Stack(int stackSize) {\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}\n\n\t\t// ?????????????????????????????????????????????\n\t\t// ????????????\n\t\t// stack.push(?????????);\n\t\tpublic void push(int pushData) {\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}\n\n\t\t// ??????????????????????????????????????????????????????\n\t\t// ????????????\n\t\t// int data = stack.pop();\n\t\tpublic int pop() {\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] formula = br.readLine().split(\" \");\n\n\t\tStack stack = new Stack(100);\n\n\t\tfor(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] formula = br.readLine().split(\" \");\n\n\t\tStack stack = new Stack(100);\n\n\t\tfor(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] formula = br.readLine().split(\" \");\n\n\t\tStack stack = new Stack(100);\n\n\t\tfor(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] formula = br.readLine().split(\" \");", "formula", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Stack stack = new Stack(100);", "stack", "new Stack(100)", "for(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < formula.length", "i", "formula.length", "formula", "formula.length", "i++", "i++", "i", "{\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}", "!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")", "!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")", "!formula[i].equals(\"+\")", "formula[i].equals(\"+\")", "formula[i].equals", "formula[i]", "formula", "i", "\"+\"", "!formula[i].equals(\"-\")", "formula[i].equals(\"-\")", "formula[i].equals", "formula[i]", "formula", "i", "\"-\"", "!formula[i].equals(\"*\")", "formula[i].equals(\"*\")", "formula[i].equals", "formula[i]", "formula", "i", "\"*\"", "{\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t}", "stack.push(Integer.parseInt(formula[i]))", "stack.push", "stack", "Integer.parseInt(formula[i])", "Integer.parseInt", "Integer", "formula[i]", "formula", "i", "{\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}", "if(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}", "formula[i].equals(\"+\")", "formula[i].equals", "formula[i]", "formula", "i", "\"+\"", "{\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}", "int popNum1 = stack.pop();", "popNum1", "stack.pop()", "stack.pop", "stack", "int popNum2 = stack.pop();", "popNum2", "stack.pop()", "stack.pop", "stack", "int formulaResult = popNum2 + popNum1;", "formulaResult", "popNum2 + popNum1", "popNum2", "popNum1", "stack.push(formulaResult)", "stack.push", "stack", "formulaResult", "if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}", "formula[i].equals(\"-\")", "formula[i].equals", "formula[i]", "formula", "i", "\"-\"", "{\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}", "int popNum1 = stack.pop();", "popNum1", "stack.pop()", "stack.pop", "stack", "int popNum2 = stack.pop();", "popNum2", "stack.pop()", "stack.pop", "stack", "int formulaResult = popNum2 - popNum1;", "formulaResult", "popNum2 - popNum1", "popNum2", "popNum1", "stack.push(formulaResult)", "stack.push", "stack", "formulaResult", "if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}", "formula[i].equals(\"*\")", "formula[i].equals", "formula[i]", "formula", "i", "\"*\"", "{\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}", "int popNum1 = stack.pop();", "popNum1", "stack.pop()", "stack.pop", "stack", "int popNum2 = stack.pop();", "popNum2", "stack.pop()", "stack.pop", "stack", "int formulaResult = popNum2 * popNum1;", "formulaResult", "popNum2 * popNum1", "popNum2", "popNum1", "stack.push(formulaResult)", "stack.push", "stack", "formulaResult", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "private static class Stack {\n\n\t\tprivate int [] data;\n\t\tprivate int top;\n\n\t\t// ????????????Stack stack = new Stack(?????????????????????);???\n\t\tpublic Stack(int stackSize) {\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}\n\n\t\t// ?????????????????????????????????????????????\n\t\t// ????????????\n\t\t// stack.push(?????????);\n\t\tpublic void push(int pushData) {\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}\n\n\t\t// ??????????????????????????????????????????????????????\n\t\t// ????????????\n\t\t// int data = stack.pop();\n\t\tpublic int pop() {\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}\n\t}", "Stack", "private int [] data;", "data", "private int top;", "top", "// ????????????Stack stack = new Stack(?????????????????????);???\n\t\tpublic Stack(int stackSize) {\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}", "Stack", "{\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}", "this.data = new int[stackSize]", "this.data", "this", "this.data", "new int[stackSize]", "stackSize", "this.top = 0", "this.top", "this", "this.top", "0", "int stackSize", "stackSize", "// ?????????????????????????????????????????????\n\t\t// ????????????\n\t\t// stack.push(?????????);\n\t\tpublic void push(int pushData) {\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}", "push", "{\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}", "this.data[this.top] = pushData", "this.data[this.top]", "this.data", "this", "this.data", "this.top", "this", "this.top", "pushData", "this.top++", "this.top", "this", "this.top", "int pushData", "pushData", "// ??????????????????????????????????????????????????????\n\t\t// ????????????\n\t\t// int data = stack.pop();\n\t\tpublic int pop() {\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}", "pop", "{\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}", "this.top--", "this.top", "this", "this.top", "int popData = this.data[this.top];", "popData", "this.data[this.top]", "this.data", "this", "this.data", "this.top", "this", "this.top", "return popData;", "popData", "public class Main {\n\n\tprivate static class Stack {\n\n\t\tprivate int [] data;\n\t\tprivate int top;\n\n\t\t// ????????????Stack stack = new Stack(?????????????????????);???\n\t\tpublic Stack(int stackSize) {\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}\n\n\t\t// ?????????????????????????????????????????????\n\t\t// ????????????\n\t\t// stack.push(?????????);\n\t\tpublic void push(int pushData) {\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}\n\n\t\t// ??????????????????????????????????????????????????????\n\t\t// ????????????\n\t\t// int data = stack.pop();\n\t\tpublic int pop() {\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] formula = br.readLine().split(\" \");\n\n\t\tStack stack = new Stack(100);\n\n\t\tfor(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "public class Main {\n\n\tprivate static class Stack {\n\n\t\tprivate int [] data;\n\t\tprivate int top;\n\n\t\t// ????????????Stack stack = new Stack(?????????????????????);???\n\t\tpublic Stack(int stackSize) {\n\t\t\tthis.data = new int[stackSize];\n\t\t\tthis.top = 0;\n\t\t}\n\n\t\t// ?????????????????????????????????????????????\n\t\t// ????????????\n\t\t// stack.push(?????????);\n\t\tpublic void push(int pushData) {\n\t\t\tthis.data[this.top] = pushData;\n\t\t\tthis.top++;\n\t\t}\n\n\t\t// ??????????????????????????????????????????????????????\n\t\t// ????????????\n\t\t// int data = stack.pop();\n\t\tpublic int pop() {\n\t\t\tthis.top--;\n\t\t\tint popData = this.data[this.top];\n\n\t\t\treturn popData;\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] formula = br.readLine().split(\" \");\n\n\t\tStack stack = new Stack(100);\n\n\t\tfor(int i = 0; i < formula.length; i++) {\n\t\t\tif(!formula[i].equals(\"+\") && !formula[i].equals(\"-\") && !formula[i].equals(\"*\")) {\n\t\t\t\tstack.push(Integer.parseInt(formula[i]));\n\t\t\t} else {\n\t\t\t\tif(formula[i].equals(\"+\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 + popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"-\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 - popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t} else if(formula[i].equals(\"*\")) {\n\t\t\t\t\tint popNum1 = stack.pop();\n\t\t\t\t\tint popNum2 = stack.pop();\n\n\t\t\t\t\tint formulaResult = popNum2 * popNum1;\n\n\t\t\t\t\tstack.push(formulaResult);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { private static class Stack { private int [] data; private int top; // ????????????Stack stack = new Stack(?????????????????????);??? public Stack(int stackSize) { this.data = new int[stackSize]; this.top = 0; } // ????????????????????????????????????????????? // ???????????? // stack.push(?????????); public void push(int pushData) { this.data[this.top] = pushData; this.top++; } // ?????????????????????????????????????????????????????? // ???????????? // int data = stack.pop(); public int pop() { this.top--; int popData = this.data[this.top]; return popData; } } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] formula = br.readLine().split(" "); Stack stack = new Stack(100); for(int i = 0; i < formula.length; i++) { if(!formula[i].equals("+") && !formula[i].equals("-") && !formula[i].equals("*")) { stack.push(Integer.parseInt(formula[i])); } else { if(formula[i].equals("+")) { int popNum1 = stack.pop(); int popNum2 = stack.pop(); int formulaResult = popNum2 + popNum1; stack.push(formulaResult); } else if(formula[i].equals("-")) { int popNum1 = stack.pop(); int popNum2 = stack.pop(); int formulaResult = popNum2 - popNum1; stack.push(formulaResult); } else if(formula[i].equals("*")) { int popNum1 = stack.pop(); int popNum2 = stack.pop(); int formulaResult = popNum2 * popNum1; stack.push(formulaResult); } } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 17, 0, 13, 2, 13, 17, 0, 13, 20, 13, 23, 13, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 13, 12, 13, 30, 14, 4, 13, 30, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 14, 4, 13, 30, 4, 18, 18, 13, 13, 17, 30, 40, 13, 29, 18, 13, 2, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 20, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 12, 27 ], [ 27, 28 ], [ 4, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 4, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 4, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 57, 62 ], [ 43, 63 ], [ 63, 64 ], [ 4, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 68, 78 ], [ 78, 79 ], [ 79, 80 ], [ 67, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 0, 87 ], [ 206, 88 ], [ 206, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 98, 99 ], [ 91, 100 ], [ 100, 101 ], [ 91, 102 ], [ 102, 103 ], [ 91, 104 ], [ 104, 105 ], [ 104, 106 ], [ 91, 108 ], [ 108, 109 ], [ 108, 110 ], [ 91, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 111, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 115, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 121, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 126, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 126, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 140, 141 ], [ 140, 142 ], [ 121, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 144, 147 ], [ 143, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 148, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 148, 159 ], [ 159, 160 ], [ 160, 161 ], [ 159, 162 ], [ 162, 163 ], [ 162, 164 ], [ 143, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 165, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 170, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 170, 181 ], [ 181, 182 ], [ 182, 183 ], [ 181, 184 ], [ 184, 185 ], [ 184, 186 ], [ 165, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 188, 191 ], [ 191, 192 ], [ 192, 193 ], [ 191, 194 ], [ 91, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 195, 200 ], [ 200, 201 ], [ 201, 202 ], [ 89, 203 ], [ 203, 204 ], [ 0, 205 ], [ 205, 206 ], [ 205, 207 ] ]
[ "import java.util.Scanner;\n\nclass Stack{\n int top,max;\n int[] arr;\n \n Stack(int num) {\n top = 0;\n max = num - 1;\n arr = new int[num]; \n }\n public boolean isEmpty() {\n return top == 0;\n }\n public boolean isFull() {\n return top >= max;\n }\n public void push(int x) {\n if(isFull()) {\n System.out.println(\"This stack is ovew flow\");\n } else {\n arr[++top] = x;\n }\n }\n public int pop() {\n if(isEmpty()) {\n System.out.println(\"This stack is empty\");\n } else {\n top--;\n }\n return arr[top+1];\n } \n}\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Stack stack = new Stack(101); \n \n int a,b;\n String str;\n \n String[] test = new String[101]; \n int i = 0;\n\n while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }\n System.out.println(stack.pop());\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Stack{\n int top,max;\n int[] arr;\n \n Stack(int num) {\n top = 0;\n max = num - 1;\n arr = new int[num]; \n }\n public boolean isEmpty() {\n return top == 0;\n }\n public boolean isFull() {\n return top >= max;\n }\n public void push(int x) {\n if(isFull()) {\n System.out.println(\"This stack is ovew flow\");\n } else {\n arr[++top] = x;\n }\n }\n public int pop() {\n if(isEmpty()) {\n System.out.println(\"This stack is empty\");\n } else {\n top--;\n }\n return arr[top+1];\n } \n}", "Stack", "int top", "top", "max;", "max", "int[] arr;", "arr", "Stack(int num) {\n top = 0;\n max = num - 1;\n arr = new int[num]; \n }", "Stack", "{\n top = 0;\n max = num - 1;\n arr = new int[num]; \n }", "top = 0", "top", "0", "max = num - 1", "max", "num - 1", "num", "1", "arr = new int[num]", "arr", "new int[num]", "num", "int num", "num", "public boolean isEmpty() {\n return top == 0;\n }", "isEmpty", "{\n return top == 0;\n }", "return top == 0;", "top == 0", "top", "0", "public boolean isFull() {\n return top >= max;\n }", "isFull", "{\n return top >= max;\n }", "return top >= max;", "top >= max", "top", "max", "public void push(int x) {\n if(isFull()) {\n System.out.println(\"This stack is ovew flow\");\n } else {\n arr[++top] = x;\n }\n }", "push", "{\n if(isFull()) {\n System.out.println(\"This stack is ovew flow\");\n } else {\n arr[++top] = x;\n }\n }", "if(isFull()) {\n System.out.println(\"This stack is ovew flow\");\n } else {\n arr[++top] = x;\n }", "isFull()", "isFull", "{\n System.out.println(\"This stack is ovew flow\");\n }", "System.out.println(\"This stack is ovew flow\")", "System.out.println", "System.out", "System", "System.out", "\"This stack is ovew flow\"", "{\n arr[++top] = x;\n }", "arr[++top] = x", "arr[++top]", "arr", "++top", "top", "x", "int x", "x", "public int pop() {\n if(isEmpty()) {\n System.out.println(\"This stack is empty\");\n } else {\n top--;\n }\n return arr[top+1];\n }", "pop", "{\n if(isEmpty()) {\n System.out.println(\"This stack is empty\");\n } else {\n top--;\n }\n return arr[top+1];\n }", "if(isEmpty()) {\n System.out.println(\"This stack is empty\");\n } else {\n top--;\n }", "isEmpty()", "isEmpty", "{\n System.out.println(\"This stack is empty\");\n }", "System.out.println(\"This stack is empty\")", "System.out.println", "System.out", "System", "System.out", "\"This stack is empty\"", "{\n top--;\n }", "top--", "top", "return arr[top+1];", "arr[top+1]", "arr", "top+1", "top", "1", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Stack stack = new Stack(101); \n \n int a,b;\n String str;\n \n String[] test = new String[101]; \n int i = 0;\n\n while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }\n System.out.println(stack.pop());\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Stack stack = new Stack(101); \n \n int a,b;\n String str;\n \n String[] test = new String[101]; \n int i = 0;\n\n while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }\n System.out.println(stack.pop());\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n Stack stack = new Stack(101); \n \n int a,b;\n String str;\n \n String[] test = new String[101]; \n int i = 0;\n\n while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }\n System.out.println(stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Stack stack = new Stack(101);", "stack", "new Stack(101)", "int a", "a", "b;", "b", "String str;", "str", "String[] test = new String[101];", "test", "new String[101]", "101", "int i = 0;", "i", "0", "while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }", "str = sc.next()", "str", "sc.next()", "sc.next", "sc", "if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }", "str.equals(\"+\")", "str.equals", "str", "\"+\"", "{\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n }", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "stack.push(b+a)", "stack.push", "stack", "b+a", "b", "a", "if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }", "str.equals(\"-\")", "str.equals", "str", "\"-\"", "{\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n }", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "stack.push(b-a)", "stack.push", "stack", "b-a", "b", "a", "if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }", "str.equals(\"*\")", "str.equals", "str", "\"*\"", "{\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n }", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "stack.push(b*a)", "stack.push", "stack", "b*a", "b", "a", "{\n stack.push(Integer.parseInt(str));\n }", "stack.push(Integer.parseInt(str))", "stack.push", "stack", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Stack stack = new Stack(101); \n \n int a,b;\n String str;\n \n String[] test = new String[101]; \n int i = 0;\n\n while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }\n System.out.println(stack.pop());\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n Stack stack = new Stack(101); \n \n int a,b;\n String str;\n \n String[] test = new String[101]; \n int i = 0;\n\n while(sc.hasNext()) {\n str = sc.next();\n \n if(str.equals(\"+\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b+a);\n } else if(str.equals(\"-\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b-a);\n } else if(str.equals(\"*\")) {\n a = stack.pop();\n b = stack.pop();\n stack.push(b*a);\n } else {\n stack.push(Integer.parseInt(str));\n }\n }\n System.out.println(stack.pop());\n }\n}", "Main" ]
import java.util.Scanner; class Stack{ int top,max; int[] arr; Stack(int num) { top = 0; max = num - 1; arr = new int[num]; } public boolean isEmpty() { return top == 0; } public boolean isFull() { return top >= max; } public void push(int x) { if(isFull()) { System.out.println("This stack is ovew flow"); } else { arr[++top] = x; } } public int pop() { if(isEmpty()) { System.out.println("This stack is empty"); } else { top--; } return arr[top+1]; } } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); Stack stack = new Stack(101); int a,b; String str; String[] test = new String[101]; int i = 0; while(sc.hasNext()) { str = sc.next(); if(str.equals("+")) { a = stack.pop(); b = stack.pop(); stack.push(b+a); } else if(str.equals("-")) { a = stack.pop(); b = stack.pop(); stack.push(b-a); } else if(str.equals("*")) { a = stack.pop(); b = stack.pop(); stack.push(b*a); } else { stack.push(Integer.parseInt(str)); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 17, 12, 13, 30, 41, 13, 4, 13, 41, 13, 4, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 18, 13, 13, 17, 17, 30, 4, 13, 2, 4, 13, 4, 13, 14, 2, 4, 18, 18, 13, 13, 17, 17, 30, 4, 13, 40, 2, 4, 13, 4, 13, 14, 2, 4, 18, 18, 13, 13, 17, 17, 30, 4, 13, 2, 4, 13, 4, 13, 30, 4, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 13, 23, 13, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 18, 13, 40, 13, 12, 13, 30, 29, 20, 12, 13, 30, 41, 13, 4, 18, 13, 29, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 29, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 17, 29, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 13, 29, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 14, 2, 13, 2, 13, 17, 30, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 17, 23, 13, 23, 13, 12, 13, 30, 4, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 2, 4, 18, 13, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 0, 13, 17, 30, 30, 14, 2, 2, 13, 13, 17, 30, 29, 17, 29, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 378, 8 ], [ 378, 9 ], [ 9, 10 ], [ 9, 11 ], [ 378, 13 ], [ 13, 14 ], [ 13, 15 ], [ 378, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 18, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 25, 27 ], [ 18, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 28, 38 ], [ 38, 39 ], [ 39, 40 ], [ 28, 41 ], [ 42, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 44, 51 ], [ 43, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 43, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 61, 68 ], [ 60, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 60, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 79, 86 ], [ 78, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 78, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 18, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 109, 110 ], [ 16, 111 ], [ 111, 112 ], [ 378, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 116, 121 ], [ 113, 122 ], [ 122, 123 ], [ 378, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 378, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 378, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 142, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 149, 152 ], [ 140, 153 ], [ 153, 154 ], [ 378, 155 ], [ 155, 156 ], [ 155, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 157, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 166, 167 ], [ 165, 168 ], [ 157, 169 ], [ 169, 170 ], [ 155, 171 ], [ 171, 172 ], [ 378, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 175, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 183, 186 ], [ 175, 187 ], [ 187, 188 ], [ 187, 189 ], [ 190, 191 ], [ 190, 192 ], [ 175, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 193, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 200, 202 ], [ 193, 203 ], [ 203, 204 ], [ 204, 205 ], [ 193, 206 ], [ 207, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 208, 212 ], [ 212, 213 ], [ 213, 214 ], [ 212, 215 ], [ 215, 216 ], [ 215, 217 ], [ 175, 218 ], [ 218, 219 ], [ 173, 220 ], [ 220, 221 ], [ 378, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 228, 229 ], [ 227, 230 ], [ 224, 231 ], [ 231, 232 ], [ 231, 233 ], [ 233, 234 ], [ 234, 235 ], [ 233, 236 ], [ 224, 237 ], [ 237, 238 ], [ 238, 239 ], [ 238, 240 ], [ 222, 241 ], [ 241, 242 ], [ 222, 243 ], [ 243, 244 ], [ 378, 245 ], [ 245, 246 ], [ 245, 247 ], [ 247, 248 ], [ 248, 249 ], [ 248, 250 ], [ 250, 251 ], [ 250, 252 ], [ 247, 253 ], [ 253, 254 ], [ 253, 255 ], [ 247, 257 ], [ 257, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 257, 262 ], [ 262, 263 ], [ 262, 264 ], [ 257, 265 ], [ 265, 266 ], [ 266, 267 ], [ 257, 268 ], [ 269, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 270, 274 ], [ 274, 275 ], [ 274, 276 ], [ 247, 277 ], [ 277, 278 ], [ 245, 279 ], [ 279, 280 ], [ 378, 281 ], [ 281, 282 ], [ 281, 283 ], [ 283, 284 ], [ 284, 285 ], [ 285, 286 ], [ 286, 287 ], [ 286, 288 ], [ 284, 289 ], [ 289, 290 ], [ 289, 291 ], [ 284, 292 ], [ 292, 293 ], [ 293, 294 ], [ 284, 295 ], [ 296, 296 ], [ 296, 297 ], [ 297, 298 ], [ 298, 299 ], [ 299, 300 ], [ 299, 301 ], [ 297, 302 ], [ 302, 303 ], [ 302, 304 ], [ 296, 305 ], [ 305, 306 ], [ 306, 307 ], [ 306, 308 ], [ 308, 309 ], [ 308, 310 ], [ 305, 311 ], [ 311, 312 ], [ 312, 313 ], [ 313, 314 ], [ 314, 315 ], [ 314, 316 ], [ 312, 317 ], [ 283, 318 ], [ 318, 319 ], [ 319, 320 ], [ 320, 321 ], [ 320, 322 ], [ 318, 323 ], [ 281, 324 ], [ 324, 325 ], [ 281, 326 ], [ 326, 327 ], [ 378, 328 ], [ 328, 329 ], [ 328, 330 ], [ 330, 331 ], [ 331, 332 ], [ 331, 333 ], [ 331, 334 ], [ 334, 335 ], [ 334, 336 ], [ 328, 337 ], [ 337, 338 ], [ 378, 339 ], [ 339, 340 ], [ 339, 341 ], [ 341, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 345, 346 ], [ 346, 347 ], [ 345, 348 ], [ 344, 349 ], [ 341, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 350, 355 ], [ 355, 356 ], [ 355, 357 ], [ 350, 358 ], [ 358, 359 ], [ 359, 360 ], [ 359, 361 ], [ 350, 362 ], [ 363, 363 ], [ 363, 364 ], [ 364, 365 ], [ 365, 366 ], [ 366, 367 ], [ 366, 368 ], [ 365, 369 ], [ 364, 370 ], [ 370, 371 ], [ 371, 372 ], [ 341, 373 ], [ 373, 374 ], [ 339, 375 ], [ 375, 376 ], [ 0, 377 ], [ 377, 378 ], [ 377, 379 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n\tstatic int[] numStack = new int[100];\n\tstatic int numOfs= 0;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader breader = getReader();\n\t\tString[] elm = getAry(breader);\n\t\tfor( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(numPop());\n\t}\n\tpublic static void numPush(int n) {\n\t\tnumStack[numOfs++] = n;\n\t}\n\tpublic static int numPop() {\n\t\treturn(Integer.valueOf(numStack[--numOfs]));\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static String[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\treturn nstr;\n\t}\n\tpublic static int[] getIntAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static int cardComp(String left, String right) {\n\t\tchar l = left.charAt(1);\n\t\tchar r = right.charAt(1);\n\t\treturn(l-r);\n\t}\n\tpublic static int[] getAryMl(BufferedReader br)throws Exception {\n\t\tint n = getInt(br);\n\t\tint[] ary = new int[n];\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}\n\t\treturn ary;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\tstatic int[] numStack = new int[100];\n\tstatic int numOfs= 0;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader breader = getReader();\n\t\tString[] elm = getAry(breader);\n\t\tfor( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(numPop());\n\t}\n\tpublic static void numPush(int n) {\n\t\tnumStack[numOfs++] = n;\n\t}\n\tpublic static int numPop() {\n\t\treturn(Integer.valueOf(numStack[--numOfs]));\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static String[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\treturn nstr;\n\t}\n\tpublic static int[] getIntAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static int cardComp(String left, String right) {\n\t\tchar l = left.charAt(1);\n\t\tchar r = right.charAt(1);\n\t\treturn(l-r);\n\t}\n\tpublic static int[] getAryMl(BufferedReader br)throws Exception {\n\t\tint n = getInt(br);\n\t\tint[] ary = new int[n];\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}\n\t\treturn ary;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}", "Main", "static int[] numStack = new int[100];", "numStack", "new int[100]", "100", "static int numOfs= 0;", "numOfs", "0", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader breader = getReader();\n\t\tString[] elm = getAry(breader);\n\t\tfor( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(numPop());\n\t}", "main", "{\n\t\tBufferedReader breader = getReader();\n\t\tString[] elm = getAry(breader);\n\t\tfor( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(numPop());\n\t}", "BufferedReader breader = getReader();", "breader", "getReader()", "getReader", "String[] elm = getAry(breader);", "elm", "getAry(breader)", "getAry", "breader", "for( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < elm.length", "i", "elm.length", "elm", "elm.length", "i++", "i++", "i", "{\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}", "{\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}", "if (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}", "elm[i].equals(\"+\") == true", "elm[i].equals(\"+\")", "elm[i].equals", "elm[i]", "elm", "i", "\"+\"", "true", "{\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t}", "numPush(numPop()+numPop())", "numPush", "numPop()+numPop()", "numPop()", "numPop", "numPop()", "numPop", "if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}", "elm[i].equals(\"-\") == true", "elm[i].equals(\"-\")", "elm[i].equals", "elm[i]", "elm", "i", "\"-\"", "true", "{\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t}", "numPush(-(numPop()-numPop()))", "numPush", "-(numPop()-numPop())", "(numPop()-numPop())", "numPop()", "numPop", "numPop()", "numPop", "if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}", "elm[i].equals(\"*\") == true", "elm[i].equals(\"*\")", "elm[i].equals", "elm[i]", "elm", "i", "\"*\"", "true", "{\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t}", "numPush(numPop()*numPop())", "numPush", "numPop()*numPop()", "numPop()", "numPop", "numPop()", "numPop", "{\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}", "numPush(Integer.valueOf(elm[i]))", "numPush", "Integer.valueOf(elm[i])", "Integer.valueOf", "Integer", "elm[i]", "elm", "i", "System.out.println(numPop())", "System.out.println", "System.out", "System", "System.out", "numPop()", "numPop", "String[] args", "args", "public static void numPush(int n) {\n\t\tnumStack[numOfs++] = n;\n\t}", "numPush", "{\n\t\tnumStack[numOfs++] = n;\n\t}", "numStack[numOfs++] = n", "numStack[numOfs++]", "numStack", "numOfs++", "numOfs", "n", "int n", "n", "public static int numPop() {\n\t\treturn(Integer.valueOf(numStack[--numOfs]));\n\t}", "numPop", "{\n\t\treturn(Integer.valueOf(numStack[--numOfs]));\n\t}", "return(Integer.valueOf(numStack[--numOfs]));", "(Integer.valueOf(numStack[--numOfs]))", "Integer.valueOf", "Integer", "numStack[--numOfs]", "numStack", "--numOfs", "numOfs", "public static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));\n\t}", "getReader", "{\n\t\treturn( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));\n\t}", "return( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));", "( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)))", "public static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}", "getInt", "{\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "return Integer.valueOf(line);", "Integer.valueOf(line)", "Integer.valueOf", "Integer", "line", "BufferedReader br", "br", "public static String[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\treturn nstr;\n\t}", "getAry", "{\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\treturn nstr;\n\t}", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "String[] nstr = line.split(\" \");", "nstr", "line.split(\" \")", "line.split", "line", "\" \"", "return nstr;", "nstr", "BufferedReader br", "br", "public static int[] getIntAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}", "getIntAry", "{\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "String[] nstr = line.split(\" \");", "nstr", "line.split(\" \")", "line.split", "line", "\" \"", "int[] n = new int[nstr.length];", "n", "new int[nstr.length]", "nstr.length", "nstr", "nstr.length", "for( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}", "int i=0 ;", "int i=0 ;", "i", "0", "i < nstr.length", "i", "nstr.length", "nstr", "nstr.length", "i++", "i++", "i", "{\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}", "{\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}", "n[i] = Integer.valueOf(nstr[i])", "n[i]", "n", "i", "Integer.valueOf(nstr[i])", "Integer.valueOf", "Integer", "nstr[i]", "nstr", "i", "return n;", "n", "BufferedReader br", "br", "public static int cardComp(String left, String right) {\n\t\tchar l = left.charAt(1);\n\t\tchar r = right.charAt(1);\n\t\treturn(l-r);\n\t}", "cardComp", "{\n\t\tchar l = left.charAt(1);\n\t\tchar r = right.charAt(1);\n\t\treturn(l-r);\n\t}", "char l = left.charAt(1);", "l", "left.charAt(1)", "left.charAt", "left", "1", "char r = right.charAt(1);", "r", "right.charAt(1)", "right.charAt", "right", "1", "return(l-r);", "(l-r)", "l", "r", "String left", "left", "String right", "right", "public static int[] getAryMl(BufferedReader br)throws Exception {\n\t\tint n = getInt(br);\n\t\tint[] ary = new int[n];\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}\n\t\treturn ary;\n\t}", "getAryMl", "{\n\t\tint n = getInt(br);\n\t\tint[] ary = new int[n];\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}\n\t\treturn ary;\n\t}", "int n = getInt(br);", "n", "getInt(br)", "getInt", "br", "int[] ary = new int[n];", "ary", "new int[n]", "n", "for( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}", "int i=0 ;", "int i=0 ;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tary[i] = getInt(br);\n\t\t}", "{\n\t\t\tary[i] = getInt(br);\n\t\t}", "ary[i] = getInt(br)", "ary[i]", "ary", "i", "getInt(br)", "getInt", "br", "return ary;", "ary", "BufferedReader br", "br", "public static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "putAry", "{\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}", "for( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < num", "i", "num", "i++", "i++", "i", "{\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}", "{\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}", "System.out.print(ary[i])", "System.out.print", "System.out", "System", "System.out", "ary[i]", "ary", "i", "if ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}", "i < num-1", "i", "num-1", "num", "1", "{\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}", "System.out.print(\" \")", "System.out.print", "System.out", "System", "System.out", "\" \"", "System.out.println(\"\")", "System.out.println", "System.out", "System", "System.out", "\"\"", "int[] ary", "ary", "int num", "num", "public static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}", "putAry", "{\n\t\tputAry(ary, ary.length ) ;\n\t}", "putAry(ary, ary.length )", "putAry", "ary", "ary.length", "ary", "ary.length", "int[] ary", "ary", "public static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "isPrime", "{\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "int r = (int)Math.sqrt((double)n)+1;", "r", "(int)Math.sqrt((double)n)+1", "(int)Math.sqrt((double)n)", "Math.sqrt", "Math", "(double)n", "1", "for( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "int j = 2 ;", "int j = 2 ;", "j", "2", "j < r", "j", "r", "j += 1", "j += 1", "j", "1", "{\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "{\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "if ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}", "n%j == 0", "n%j", "n", "j", "0", "{\n\t\t\t\treturn false;\n\t\t\t}", "return false;", "false", "return true;", "true", "int n", "n", "public class Main {\n\tstatic int[] numStack = new int[100];\n\tstatic int numOfs= 0;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader breader = getReader();\n\t\tString[] elm = getAry(breader);\n\t\tfor( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(numPop());\n\t}\n\tpublic static void numPush(int n) {\n\t\tnumStack[numOfs++] = n;\n\t}\n\tpublic static int numPop() {\n\t\treturn(Integer.valueOf(numStack[--numOfs]));\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static String[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\treturn nstr;\n\t}\n\tpublic static int[] getIntAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static int cardComp(String left, String right) {\n\t\tchar l = left.charAt(1);\n\t\tchar r = right.charAt(1);\n\t\treturn(l-r);\n\t}\n\tpublic static int[] getAryMl(BufferedReader br)throws Exception {\n\t\tint n = getInt(br);\n\t\tint[] ary = new int[n];\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}\n\t\treturn ary;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}", "public class Main {\n\tstatic int[] numStack = new int[100];\n\tstatic int numOfs= 0;\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader breader = getReader();\n\t\tString[] elm = getAry(breader);\n\t\tfor( int i = 0 ; i < elm.length ; i++ ) {\n\t\t\tif (elm[i].equals(\"+\") == true) {\n\t\t\t\tnumPush(numPop()+numPop());\n\t\t\t} else if ( elm[i].equals(\"-\") == true ) {\n\t\t\t\tnumPush(-(numPop()-numPop()));\n\t\t\t} else if ( elm[i].equals(\"*\") == true ) {\n\t\t\t\tnumPush(numPop()*numPop());\n\t\t\t} else {\n\t\t\t\tnumPush(Integer.valueOf(elm[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(numPop());\n\t}\n\tpublic static void numPush(int n) {\n\t\tnumStack[numOfs++] = n;\n\t}\n\tpublic static int numPop() {\n\t\treturn(Integer.valueOf(numStack[--numOfs]));\n\t}\n\tpublic static BufferedReader getReader() {\n\t\treturn( new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in)));\n\t}\n\tpublic static int getInt(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\treturn Integer.valueOf(line);\n\t}\n\tpublic static String[] getAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\treturn nstr;\n\t}\n\tpublic static int[] getIntAry(BufferedReader br)throws Exception {\n\t\tString line = br.readLine();\n\t\tString[] nstr = line.split(\" \");\n\t\tint[] n = new int[nstr.length];\n\t\tfor( int i=0 ; i < nstr.length ; i++ ) {\n\t\t\tn[i] = Integer.valueOf(nstr[i]);\n\t\t}\n\t\treturn n;\n\t}\n\tpublic static int cardComp(String left, String right) {\n\t\tchar l = left.charAt(1);\n\t\tchar r = right.charAt(1);\n\t\treturn(l-r);\n\t}\n\tpublic static int[] getAryMl(BufferedReader br)throws Exception {\n\t\tint n = getInt(br);\n\t\tint[] ary = new int[n];\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tary[i] = getInt(br);\n\t\t}\n\t\treturn ary;\n\t}\n\tpublic static void putAry(int[] ary, int num) {\n\t\tfor( int i = 0; i < num ; i++ ) {\n\t\t\tSystem.out.print(ary[i]);\n\t\t\tif ( i < num-1) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}\n\tpublic static void putAry(int[] ary) {\n\t\tputAry(ary, ary.length ) ;\n\t}\n\tpublic static boolean isPrime(int n) {\n\t\tint r = (int)Math.sqrt((double)n)+1;\n\t\tfor( int j = 2 ; j < r ; j += 1) {\n\t\t\tif ( n%j == 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { static int[] numStack = new int[100]; static int numOfs= 0; public static void main(String[] args) throws Exception { BufferedReader breader = getReader(); String[] elm = getAry(breader); for( int i = 0 ; i < elm.length ; i++ ) { if (elm[i].equals("+") == true) { numPush(numPop()+numPop()); } else if ( elm[i].equals("-") == true ) { numPush(-(numPop()-numPop())); } else if ( elm[i].equals("*") == true ) { numPush(numPop()*numPop()); } else { numPush(Integer.valueOf(elm[i])); } } System.out.println(numPop()); } public static void numPush(int n) { numStack[numOfs++] = n; } public static int numPop() { return(Integer.valueOf(numStack[--numOfs])); } public static BufferedReader getReader() { return( new BufferedReader(new InputStreamReader( System.in))); } public static int getInt(BufferedReader br)throws Exception { String line = br.readLine(); return Integer.valueOf(line); } public static String[] getAry(BufferedReader br)throws Exception { String line = br.readLine(); String[] nstr = line.split(" "); return nstr; } public static int[] getIntAry(BufferedReader br)throws Exception { String line = br.readLine(); String[] nstr = line.split(" "); int[] n = new int[nstr.length]; for( int i=0 ; i < nstr.length ; i++ ) { n[i] = Integer.valueOf(nstr[i]); } return n; } public static int cardComp(String left, String right) { char l = left.charAt(1); char r = right.charAt(1); return(l-r); } public static int[] getAryMl(BufferedReader br)throws Exception { int n = getInt(br); int[] ary = new int[n]; for( int i=0 ; i < n ; i++ ) { ary[i] = getInt(br); } return ary; } public static void putAry(int[] ary, int num) { for( int i = 0; i < num ; i++ ) { System.out.print(ary[i]); if ( i < num-1) { System.out.print(" "); } } System.out.println(""); } public static void putAry(int[] ary) { putAry(ary, ary.length ) ; } public static boolean isPrime(int n) { int r = (int)Math.sqrt((double)n)+1; for( int j = 2 ; j < r ; j += 1) { if ( n%j == 0 ) { return false; } } return true; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 18, 13, 13, 17, 14, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 30, 41, 13, 17, 35, 13, 34, 17, 1, 0, 13, 2, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 0, 13, 40, 2, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 0, 13, 2, 4, 18, 13, 4, 18, 13, 3, 34, 1, 3, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 134, 14 ], [ 134, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 46, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 55, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 55, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 78, 88 ], [ 74, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 95, 99 ], [ 99, 100 ], [ 100, 101 ], [ 91, 102 ], [ 74, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 108, 112 ], [ 112, 113 ], [ 113, 114 ], [ 105, 115 ], [ 74, 116 ], [ 116, 117 ], [ 117, 118 ], [ 70, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 17, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 129, 130 ], [ 15, 131 ], [ 131, 132 ], [ 0, 133 ], [ 133, 134 ], [ 133, 135 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t String[] strArray = bufferedReader.readLine().split(\" \");\n\t Stack<Integer> stack = new Stack<Integer>();\n\t \n\t for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }\n\t \n\t System.out.println(stack.pop());\n\t }\n\t \n\t}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t String[] strArray = bufferedReader.readLine().split(\" \");\n\t Stack<Integer> stack = new Stack<Integer>();\n\t \n\t for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }\n\t \n\t System.out.println(stack.pop());\n\t }\n\t \n\t}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t String[] strArray = bufferedReader.readLine().split(\" \");\n\t Stack<Integer> stack = new Stack<Integer>();\n\t \n\t for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }\n\t \n\t System.out.println(stack.pop());\n\t }", "main", "{\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t String[] strArray = bufferedReader.readLine().split(\" \");\n\t Stack<Integer> stack = new Stack<Integer>();\n\t \n\t for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }\n\t \n\t System.out.println(stack.pop());\n\t }", "BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));", "bufferedReader", "new BufferedReader(new InputStreamReader(System.in))", "String[] strArray = bufferedReader.readLine().split(\" \");", "strArray", "bufferedReader.readLine().split(\" \")", "bufferedReader.readLine().split", "bufferedReader.readLine()", "bufferedReader.readLine", "bufferedReader", "\" \"", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }", "int i = 0;", "int i = 0;", "i", "0", "i < strArray.length", "i", "strArray.length", "strArray", "strArray.length", "i++", "i++", "i", "{\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }", "{\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }", "char input = strArray[i].charAt(0);", "input", "strArray[i].charAt(0)", "strArray[i].charAt", "strArray[i]", "strArray", "i", "0", "if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }", "Character.isDigit(input)", "Character.isDigit", "Character", "input", "{\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }", "stack.push(Integer.parseInt(strArray[i]))", "stack.push", "stack", "Integer.parseInt(strArray[i])", "Integer.parseInt", "Integer", "strArray[i]", "strArray", "i", "{\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }", "int tmp = 0;", "tmp", "0", "switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "input", "case '+':", "'+'", "case '+':", "tmp = stack.pop() + stack.pop()", "tmp", "stack.pop() + stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "break;", "case '-':", "'-'", "case '-':", "tmp = - (stack.pop() - stack.pop())", "tmp", "- (stack.pop() - stack.pop())", "(stack.pop() - stack.pop())", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "break;", "case '*':", "'*'", "case '*':", "tmp = stack.pop() * stack.pop()", "tmp", "stack.pop() * stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "break;", "default:", "default:", "break;", "stack.push(tmp)", "stack.push", "stack", "tmp", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t String[] strArray = bufferedReader.readLine().split(\" \");\n\t Stack<Integer> stack = new Stack<Integer>();\n\t \n\t for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }\n\t \n\t System.out.println(stack.pop());\n\t }\n\t \n\t}", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\t String[] strArray = bufferedReader.readLine().split(\" \");\n\t Stack<Integer> stack = new Stack<Integer>();\n\t \n\t for(int i = 0; i < strArray.length ; i++){\n\t char input = strArray[i].charAt(0);\n\t if(Character.isDigit(input)){\n\t \t// ??°????????´?????????push???????????????\n\t stack.push(Integer.parseInt(strArray[i]));\n\t }\n\t else {\n\t int tmp = 0; \n\t switch (input) {\n\t\t\t\t\tcase '+':\n\t\t\t\t\t\ttmp = stack.pop() + stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '-':\n\t\t\t\t\t\ttmp = - (stack.pop() - stack.pop());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '*':\n\t\t\t\t\t\ttmp = stack.pop() * stack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t // ????????§?¨??????????????????????push???????????????\n\t stack.push(tmp);\n\t }\n\t }\n\t \n\t System.out.println(stack.pop());\n\t }\n\t \n\t}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class Main { public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); String[] strArray = bufferedReader.readLine().split(" "); Stack<Integer> stack = new Stack<Integer>(); for(int i = 0; i < strArray.length ; i++){ char input = strArray[i].charAt(0); if(Character.isDigit(input)){ // ??°????????´?????????push??????????????? stack.push(Integer.parseInt(strArray[i])); } else { int tmp = 0; switch (input) { case '+': tmp = stack.pop() + stack.pop(); break; case '-': tmp = - (stack.pop() - stack.pop()); break; case '*': tmp = stack.pop() * stack.pop(); break; default: break; } // ????????§?¨??????????????????????push??????????????? stack.push(tmp); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 35, 18, 13, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 18, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 13, 0, 13, 17, 23, 13, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 13, 12, 13, 30, 29, 2, 13, 17, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 199, 11 ], [ 199, 12 ], [ 12, 13 ], [ 12, 14 ], [ 199, 15 ], [ 15, 16 ], [ 15, 17 ], [ 199, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 20, 27 ], [ 27, 28 ], [ 27, 29 ], [ 20, 30 ], [ 30, 31 ], [ 30, 32 ], [ 20, 33 ], [ 33, 34 ], [ 33, 35 ], [ 20, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 36, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 46, 51 ], [ 43, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 52, 62 ], [ 62, 63 ], [ 63, 64 ], [ 52, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 73, 90 ], [ 67, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 93, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 93, 110 ], [ 67, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 113, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 113, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 127, 129 ], [ 113, 130 ], [ 67, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 137, 138 ], [ 136, 139 ], [ 139, 140 ], [ 139, 141 ], [ 132, 142 ], [ 43, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 143, 148 ], [ 148, 149 ], [ 149, 150 ], [ 18, 151 ], [ 151, 152 ], [ 0, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 153, 157 ], [ 157, 158 ], [ 153, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 166 ], [ 166, 167 ], [ 166, 168 ], [ 159, 169 ], [ 169, 170 ], [ 153, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 174, 179 ], [ 171, 180 ], [ 180, 181 ], [ 153, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 185, 186 ], [ 184, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 153, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 0, 198 ], [ 198, 199 ], [ 198, 200 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tfinal int SIZE = 105;\n\n\t\tStack stack = new Stack(SIZE);\n\t\tint num_1 = 0,num_2 = 0;\n\n\t\ttry {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t}\n}\n\nclass Stack{\n\n\tprivate int NUM[];\n\tprivate int index_NUM;\n\n\tStack(int arg_size){\n\t\tNUM = new int[arg_size];\n\t\tindex_NUM = 0;\n\t}\n\tpublic void push_NUM(int num){\n\n\t\tNUM[index_NUM++] = num;\n\t}\n\tpublic int pop_NUM(){\n\t\tindex_NUM--;\n\t\treturn NUM[index_NUM];\n\t}\n\n\tpublic boolean is_Empty(){\n\n\t\treturn index_NUM == 0;\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tfinal int SIZE = 105;\n\n\t\tStack stack = new Stack(SIZE);\n\t\tint num_1 = 0,num_2 = 0;\n\n\t\ttry {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t}\n}", "Main", "public static final int BIG_NUM = 2000000000;", "BIG_NUM", "2000000000", "public static final int MOD = 1000000007;", "MOD", "1000000007", "public static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tfinal int SIZE = 105;\n\n\t\tStack stack = new Stack(SIZE);\n\t\tint num_1 = 0,num_2 = 0;\n\n\t\ttry {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t}", "main", "{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tfinal int SIZE = 105;\n\n\t\tStack stack = new Stack(SIZE);\n\t\tint num_1 = 0,num_2 = 0;\n\n\t\ttry {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "final int SIZE = 105;", "SIZE", "105", "Stack stack = new Stack(SIZE);", "stack", "new Stack(SIZE)", "int num_1 = 0", "num_1", "0", "num_2 = 0;", "num_2", "0", "try {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}", "catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}", "IOException e", "{\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t}", "String input_str[] = br.readLine().split(\"\\\\s+\");", "input_str", "br.readLine().split(\"\\\\s+\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"\\\\s+\"", "for(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < input_str.length", "i", "input_str.length", "input_str", "input_str.length", "i++", "i++", "i", "{\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "switch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}", "input_str[i]", "input_str", "i", "case \"+\":", "\"+\"", "case \"+\":", "num_2 = stack.pop_NUM()", "num_2", "stack.pop_NUM()", "stack.pop_NUM", "stack", "num_1 = stack.pop_NUM()", "num_1", "stack.pop_NUM()", "stack.pop_NUM", "stack", "stack.push_NUM(num_1+num_2)", "stack.push_NUM", "stack", "num_1+num_2", "num_1", "num_2", "break;", "case \"-\":", "\"-\"", "case \"-\":", "num_2 = stack.pop_NUM()", "num_2", "stack.pop_NUM()", "stack.pop_NUM", "stack", "num_1 = stack.pop_NUM()", "num_1", "stack.pop_NUM()", "stack.pop_NUM", "stack", "stack.push_NUM(num_1-num_2)", "stack.push_NUM", "stack", "num_1-num_2", "num_1", "num_2", "break;", "case \"*\":", "\"*\"", "case \"*\":", "num_2 = stack.pop_NUM()", "num_2", "stack.pop_NUM()", "stack.pop_NUM", "stack", "num_1 = stack.pop_NUM()", "num_1", "stack.pop_NUM()", "stack.pop_NUM", "stack", "stack.push_NUM(num_1*num_2)", "stack.push_NUM", "stack", "num_1*num_2", "num_1", "num_2", "break;", "default:", "default:", "stack.push_NUM(Integer.parseInt(input_str[i]))", "stack.push_NUM", "stack", "Integer.parseInt(input_str[i])", "Integer.parseInt", "Integer", "input_str[i]", "input_str", "i", "break;", "System.out.println(stack.pop_NUM())", "System.out.println", "System.out", "System", "System.out", "stack.pop_NUM()", "stack.pop_NUM", "stack", "String[] args", "args", "class Stack{\n\n\tprivate int NUM[];\n\tprivate int index_NUM;\n\n\tStack(int arg_size){\n\t\tNUM = new int[arg_size];\n\t\tindex_NUM = 0;\n\t}\n\tpublic void push_NUM(int num){\n\n\t\tNUM[index_NUM++] = num;\n\t}\n\tpublic int pop_NUM(){\n\t\tindex_NUM--;\n\t\treturn NUM[index_NUM];\n\t}\n\n\tpublic boolean is_Empty(){\n\n\t\treturn index_NUM == 0;\n\t}\n}", "Stack", "private int NUM[];", "NUM", "private int index_NUM;", "index_NUM", "Stack(int arg_size){\n\t\tNUM = new int[arg_size];\n\t\tindex_NUM = 0;\n\t}", "Stack", "{\n\t\tNUM = new int[arg_size];\n\t\tindex_NUM = 0;\n\t}", "NUM = new int[arg_size]", "NUM", "new int[arg_size]", "arg_size", "index_NUM = 0", "index_NUM", "0", "int arg_size", "arg_size", "public void push_NUM(int num){\n\n\t\tNUM[index_NUM++] = num;\n\t}", "push_NUM", "{\n\n\t\tNUM[index_NUM++] = num;\n\t}", "NUM[index_NUM++] = num", "NUM[index_NUM++]", "NUM", "index_NUM++", "index_NUM", "num", "int num", "num", "public int pop_NUM(){\n\t\tindex_NUM--;\n\t\treturn NUM[index_NUM];\n\t}", "pop_NUM", "{\n\t\tindex_NUM--;\n\t\treturn NUM[index_NUM];\n\t}", "index_NUM--", "index_NUM", "return NUM[index_NUM];", "NUM[index_NUM]", "NUM", "index_NUM", "public boolean is_Empty(){\n\n\t\treturn index_NUM == 0;\n\t}", "is_Empty", "{\n\n\t\treturn index_NUM == 0;\n\t}", "return index_NUM == 0;", "index_NUM == 0", "index_NUM", "0", "public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tfinal int SIZE = 105;\n\n\t\tStack stack = new Stack(SIZE);\n\t\tint num_1 = 0,num_2 = 0;\n\n\t\ttry {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t}\n}", "public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tfinal int SIZE = 105;\n\n\t\tStack stack = new Stack(SIZE);\n\t\tint num_1 = 0,num_2 = 0;\n\n\t\ttry {\n\n\t\t\tString input_str[] = br.readLine().split(\"\\\\s+\");\n\t\t\tfor(int i = 0; i < input_str.length; i++){\n\t\t\t\tswitch(input_str[i]){\n\t\t\t\tcase \"+\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1+num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1-num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"*\":\n\n\t\t\t\t\tnum_2 = stack.pop_NUM();\n\t\t\t\t\tnum_1 = stack.pop_NUM();\n\t\t\t\t\tstack.push_NUM(num_1*num_2);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tstack.push_NUM(Integer.parseInt(input_str[i]));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(stack.pop_NUM());\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO 自動生成された catch ブロック\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static final int BIG_NUM = 2000000000; public static final int MOD = 1000000007; public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); final int SIZE = 105; Stack stack = new Stack(SIZE); int num_1 = 0,num_2 = 0; try { String input_str[] = br.readLine().split("\\s+"); for(int i = 0; i < input_str.length; i++){ switch(input_str[i]){ case "+": num_2 = stack.pop_NUM(); num_1 = stack.pop_NUM(); stack.push_NUM(num_1+num_2); break; case "-": num_2 = stack.pop_NUM(); num_1 = stack.pop_NUM(); stack.push_NUM(num_1-num_2); break; case "*": num_2 = stack.pop_NUM(); num_1 = stack.pop_NUM(); stack.push_NUM(num_1*num_2); break; default: stack.push_NUM(Integer.parseInt(input_str[i])); break; } } System.out.println(stack.pop_NUM()); } catch (IOException e) { // TODO 自動生成された catch ブロック e.printStackTrace(); } } } class Stack{ private int NUM[]; private int index_NUM; Stack(int arg_size){ NUM = new int[arg_size]; index_NUM = 0; } public void push_NUM(int num){ NUM[index_NUM++] = num; } public int pop_NUM(){ index_NUM--; return NUM[index_NUM]; } public boolean is_Empty(){ return index_NUM == 0; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 13, 4, 18, 18, 13, 13, 17, 4, 18, 13, 4, 18, 13, 18, 13, 13, 14, 40, 4, 18, 13, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 17, 14, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 2, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 26, 36 ], [ 36, 37 ], [ 37, 38 ], [ 26, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 57, 59 ], [ 41, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 60, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 71, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 71, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 85, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 8, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 100, 101 ], [ 101, 102 ], [ 6, 103 ], [ 103, 104 ], [ 4, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 111, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 126, 128 ], [ 120, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 135, 137 ], [ 129, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 144, 146 ], [ 107, 147 ], [ 147, 148 ], [ 105, 149 ], [ 149, 150 ], [ 105, 151 ], [ 151, 152 ], [ 105, 153 ], [ 153, 154 ] ]
[ "\n\nimport java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\t\n\t\tStack<Integer> stack=new Stack<Integer>();\n\t\t\n\t\tString expression=input.nextLine();\n\t\t\n\t\tString[] arrays=expression.split(\" \");\n\t\t\n\t\tfor(int i=0;i<arrays.length;i++){\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t\t\n\t\t\n\t}\n\t\n\tpublic static int add(int number1,int number2,char symbol){\n\t\tint result=0;\n\t\tif(symbol=='+')\n\t\t\tresult=number1+number2;\n\t\telse if(symbol=='-')\n\t\t\tresult=number1-number2;\n\t\telse if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;\n\t\t\n\t\t\n\t\treturn result;\n\t}\n\n}", "import java.util.*;", "util.*", "java", "class Main {\n\tpublic static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\t\n\t\tStack<Integer> stack=new Stack<Integer>();\n\t\t\n\t\tString expression=input.nextLine();\n\t\t\n\t\tString[] arrays=expression.split(\" \");\n\t\t\n\t\tfor(int i=0;i<arrays.length;i++){\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t\t\n\t\t\n\t}\n\t\n\tpublic static int add(int number1,int number2,char symbol){\n\t\tint result=0;\n\t\tif(symbol=='+')\n\t\t\tresult=number1+number2;\n\t\telse if(symbol=='-')\n\t\t\tresult=number1-number2;\n\t\telse if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;\n\t\t\n\t\t\n\t\treturn result;\n\t}\n\n}", "Main", "public static void main(String[] args){\n\t\tScanner input=new Scanner(System.in);\n\t\t\n\t\tStack<Integer> stack=new Stack<Integer>();\n\t\t\n\t\tString expression=input.nextLine();\n\t\t\n\t\tString[] arrays=expression.split(\" \");\n\t\t\n\t\tfor(int i=0;i<arrays.length;i++){\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t\t\n\t\t\n\t}", "main", "{\n\t\tScanner input=new Scanner(System.in);\n\t\t\n\t\tStack<Integer> stack=new Stack<Integer>();\n\t\t\n\t\tString expression=input.nextLine();\n\t\t\n\t\tString[] arrays=expression.split(\" \");\n\t\t\n\t\tfor(int i=0;i<arrays.length;i++){\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t\t\n\t\t\n\t}", "Scanner input=new Scanner(System.in);", "input", "new Scanner(System.in)", "Stack<Integer> stack=new Stack<Integer>();", "stack", "new Stack<Integer>()", "String expression=input.nextLine();", "expression", "input.nextLine()", "input.nextLine", "input", "String[] arrays=expression.split(\" \");", "arrays", "expression.split(\" \")", "expression.split", "expression", "\" \"", "for(int i=0;i<arrays.length;i++){\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<arrays.length", "i", "arrays.length", "arrays", "arrays.length", "i++", "i++", "i", "{\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}", "{\n\t\t\tif(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}\n\t\t\t\t\n\t\t}", "if(Character.isDigit(arrays[i].charAt(0)))\n\t\t\t\tstack.add(Integer.parseInt(arrays[i]));\n\t\t\telse if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}", "Character.isDigit(arrays[i].charAt(0))", "Character.isDigit", "Character", "arrays[i].charAt(0)", "arrays[i].charAt", "arrays[i]", "arrays", "i", "0", "stack.add(Integer.parseInt(arrays[i]))", "stack.add", "stack", "Integer.parseInt(arrays[i])", "Integer.parseInt", "Integer", "arrays[i]", "arrays", "i", "if(!Character.isDigit(arrays[i].charAt(0))){\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}", "!Character.isDigit(arrays[i].charAt(0))", "Character.isDigit(arrays[i].charAt(0))", "Character.isDigit", "Character", "arrays[i].charAt(0)", "arrays[i].charAt", "arrays[i]", "arrays", "i", "0", "{\n\t\t\t\tint number2=stack.pop();\n\t\t\t\tint number1=stack.pop();\n\t\t\t\t\n\t\t\t\tstack.push(add(number1,number2,arrays[i].charAt(0)));\n\t\t\t}", "int number2=stack.pop();", "number2", "stack.pop()", "stack.pop", "stack", "int number1=stack.pop();", "number1", "stack.pop()", "stack.pop", "stack", "stack.push(add(number1,number2,arrays[i].charAt(0)))", "stack.push", "stack", "add(number1,number2,arrays[i].charAt(0))", "add", "number1", "number2", "arrays[i].charAt(0)", "arrays[i].charAt", "arrays[i]", "arrays", "i", "0", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public static int add(int number1,int number2,char symbol){\n\t\tint result=0;\n\t\tif(symbol=='+')\n\t\t\tresult=number1+number2;\n\t\telse if(symbol=='-')\n\t\t\tresult=number1-number2;\n\t\telse if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;\n\t\t\n\t\t\n\t\treturn result;\n\t}", "add", "{\n\t\tint result=0;\n\t\tif(symbol=='+')\n\t\t\tresult=number1+number2;\n\t\telse if(symbol=='-')\n\t\t\tresult=number1-number2;\n\t\telse if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;\n\t\t\n\t\t\n\t\treturn result;\n\t}", "int result=0;", "result", "0", "if(symbol=='+')\n\t\t\tresult=number1+number2;\n\t\telse if(symbol=='-')\n\t\t\tresult=number1-number2;\n\t\telse if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;", "symbol=='+'", "symbol", "'+'", "result=number1+number2", "result", "number1+number2", "number1", "number2", "if(symbol=='-')\n\t\t\tresult=number1-number2;\n\t\telse if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;", "symbol=='-'", "symbol", "'-'", "result=number1-number2", "result", "number1-number2", "number1", "number2", "if(symbol=='*')\n\t\t\tresult=number1*number2;\n\t\telse if(symbol=='/')\n\t\t\tresult=number1/number2;", "symbol=='*'", "symbol", "'*'", "result=number1*number2", "result", "number1*number2", "number1", "number2", "if(symbol=='/')\n\t\t\tresult=number1/number2;", "symbol=='/'", "symbol", "'/'", "result=number1/number2", "result", "number1/number2", "number1", "number2", "return result;", "result", "int number1", "number1", "int number2", "number2", "char symbol", "symbol" ]
import java.util.*; class Main { public static void main(String[] args){ Scanner input=new Scanner(System.in); Stack<Integer> stack=new Stack<Integer>(); String expression=input.nextLine(); String[] arrays=expression.split(" "); for(int i=0;i<arrays.length;i++){ if(Character.isDigit(arrays[i].charAt(0))) stack.add(Integer.parseInt(arrays[i])); else if(!Character.isDigit(arrays[i].charAt(0))){ int number2=stack.pop(); int number1=stack.pop(); stack.push(add(number1,number2,arrays[i].charAt(0))); } } System.out.println(stack.pop()); } public static int add(int number1,int number2,char symbol){ int result=0; if(symbol=='+') result=number1+number2; else if(symbol=='-') result=number1-number2; else if(symbol=='*') result=number1*number2; else if(symbol=='/') result=number1/number2; return result; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 152, 11 ], [ 152, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 12, 18 ], [ 18, 19 ], [ 152, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 22, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 22, 37 ], [ 37, 38 ], [ 37, 39 ], [ 22, 40 ], [ 40, 41 ], [ 40, 42 ], [ 40, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 45, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 50, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 65, 66 ], [ 50, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 45, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 76, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 88, 89 ], [ 81, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 96, 97 ], [ 81, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 76, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 107, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 112, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 127, 128 ], [ 112, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 135, 136 ], [ 135, 137 ], [ 107, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 22, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 143, 148 ], [ 148, 149 ], [ 149, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "\nimport java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] lineArr = line.split(\" \");\n\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\tfor (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] lineArr = line.split(\" \");\n\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\tfor (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tnew Main().run();\n\t}", "main", "{\n\t\tnew Main().run();\n\t}", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "void run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] lineArr = line.split(\" \");\n\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\tfor (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "run", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] lineArr = line.split(\" \");\n\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\tfor (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] lineArr = line.split(\" \");", "lineArr", "line.split(\" \")", "line.split", "line", "\" \"", "Deque<String> stack = new ArrayDeque<String>();", "stack", "new ArrayDeque<String>()", "for (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}", "String s", "lineArr", "{\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}", "{\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}", "if (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}", "\"+\".equals(s)", "\"+\".equals", "\"+\"", "s", "{\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t}", "int a = Integer.parseInt(stack.pop());", "a", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int b = Integer.parseInt(stack.pop());", "b", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(String.valueOf(a + b))", "stack.push", "stack", "String.valueOf(a + b)", "String.valueOf", "String", "a + b", "a", "b", "if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}", "\"-\".equals(s)", "\"-\".equals", "\"-\"", "s", "{\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t}", "int a = Integer.parseInt(stack.pop());", "a", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int b = Integer.parseInt(stack.pop());", "b", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(String.valueOf(b - a))", "stack.push", "stack", "String.valueOf(b - a)", "String.valueOf", "String", "b - a", "b", "a", "if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}", "\"*\".equals(s)", "\"*\".equals", "\"*\"", "s", "{\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t}", "int a = Integer.parseInt(stack.pop());", "a", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int b = Integer.parseInt(stack.pop());", "b", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(String.valueOf(a * b))", "stack.push", "stack", "String.valueOf(a * b)", "String.valueOf", "String", "a * b", "a", "b", "{\n\t\t\t\tstack.push(s);\n\t\t\t}", "stack.push(s)", "stack.push", "stack", "s", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] lineArr = line.split(\" \");\n\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\tfor (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tnew Main().run();\n\t}\n\n\tvoid run() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] lineArr = line.split(\" \");\n\n\t\tDeque<String> stack = new ArrayDeque<String>();\n\t\tfor (String s : lineArr) {\n\t\t\tif (\"+\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a + b));\n\t\t\t} else if (\"-\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(b - a));\n\t\t\t} else if (\"*\".equals(s)) {\n\t\t\t\tint a = Integer.parseInt(stack.pop());\n\t\t\t\tint b = Integer.parseInt(stack.pop());\n\t\t\t\tstack.push(String.valueOf(a * b));\n\t\t\t} else {\n\t\t\t\tstack.push(s);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main" ]
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } void run() { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] lineArr = line.split(" "); Deque<String> stack = new ArrayDeque<String>(); for (String s : lineArr) { if ("+".equals(s)) { int a = Integer.parseInt(stack.pop()); int b = Integer.parseInt(stack.pop()); stack.push(String.valueOf(a + b)); } else if ("-".equals(s)) { int a = Integer.parseInt(stack.pop()); int b = Integer.parseInt(stack.pop()); stack.push(String.valueOf(b - a)); } else if ("*".equals(s)) { int a = Integer.parseInt(stack.pop()); int b = Integer.parseInt(stack.pop()); stack.push(String.valueOf(a * b)); } else { stack.push(s); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 42, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 0, 13, 17, 14, 2, 2, 2, 4, 18, 4, 18, 13, 13, 17, 4, 18, 4, 18, 13, 13, 17, 4, 18, 4, 18, 13, 13, 17, 4, 18, 4, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 13, 4, 18, 13, 13, 4, 18, 13, 2, 13, 17, 4, 18, 13, 2, 13, 17, 4, 18, 13, 4, 18, 13, 13, 0, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 13, 23, 13, 6, 13, 12, 13, 30, 12, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 2, 13, 13, 14, 2, 4, 18, 13, 17, 17, 30, 0, 13, 2, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 14, 24 ], [ 24, 25 ], [ 24, 26 ], [ 14, 27 ], [ 27, 28 ], [ 27, 29 ], [ 14, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 34, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 43, 44 ], [ 38, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 51, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 52, 58 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 59, 65 ], [ 50, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 66, 72 ], [ 51, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 73, 79 ], [ 48, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 83, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 83, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 80, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 80, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 80, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 80, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 80, 125 ], [ 125, 126 ], [ 125, 127 ], [ 14, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 12, 137 ], [ 137, 138 ], [ 0, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 152, 155 ], [ 146, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 146, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 165, 166 ], [ 164, 167 ], [ 163, 168 ], [ 162, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 172, 174 ], [ 146, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 177, 180 ], [ 176, 181 ], [ 175, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 185, 187 ], [ 146, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 190, 193 ], [ 189, 194 ], [ 188, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 198, 200 ], [ 146, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 204, 205 ], [ 203, 206 ], [ 202, 207 ], [ 201, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 211, 213 ], [ 146, 214 ], [ 214, 215 ], [ 144, 216 ], [ 216, 217 ], [ 144, 218 ], [ 218, 219 ], [ 144, 220 ], [ 220, 221 ], [ 139, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 225, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 232, 234 ], [ 225, 235 ], [ 235, 236 ], [ 236, 237 ], [ 225, 238 ], [ 239, 239 ], [ 239, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 242, 244 ], [ 240, 245 ], [ 245, 246 ], [ 245, 247 ], [ 222, 248 ], [ 248, 249 ] ]
[ "import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Scanner;\nclass Main{\n\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint peak = 0;\n\t\tint returnNumber = 0;\n\t\tmathClass keisan =new mathClass();\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\tstack.add(\"??§?¨?0 ??????????????´??????\");\n\t\twhile(scan.hasNext()){\n\t\t\tstack.add(scan.next());\n\t\t\tpeak += 1;\n\n\t\t\t//??\\??????????????????????????£???????¨?????????????\n\t\t\tif(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}\n//\t\t\tSystem.out.println(\"While\");\n\t\t}\n\t\tSystem.out.println(stack.get(peak));\n\t}\n}\nclass mathClass{\n\n\tpublic mathClass(){\n\n\t}\n\n\t//?????????????????????\n\tpublic int shisokuEnzan(String stringX,String stringY,String op){\n\t\tint ret =0;\n\t\tint x =Integer.parseInt(stringX);\n\t\tint y =Integer.parseInt(stringY);\n//\t\tSystem.out.println(x+\" \"+op+\" \"+y+\" wo okonau\");\n\n\t\tif(op.charAt(0) == '+'){\n\t\t\tret = x + y;\n\t\t}\n\t\tif(op.charAt(0) == '-'){\n\t\t\tret = x - y;\n\t\t}\n\t\tif(op.charAt(0) == '*'){\n\t\t\tret = x * y;\n\t\t}\n\t\tif(op.charAt(0) == '/'){\n\t\t\tret = x / y;\n\t\t}\n\t\treturn ret;\n\t}\n\n\t//???????????¨?????????\n\tpublic void disp(int[] ary){\n\t\tfor(int i=0;i<ary.length;i++){\n\t\t\tSystem.out.println(ary[i]);\n\t\t}\n\t}\n\n}", "import java.io.IOException;", "IOException", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\n\tpublic static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint peak = 0;\n\t\tint returnNumber = 0;\n\t\tmathClass keisan =new mathClass();\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\tstack.add(\"??§?¨?0 ??????????????´??????\");\n\t\twhile(scan.hasNext()){\n\t\t\tstack.add(scan.next());\n\t\t\tpeak += 1;\n\n\t\t\t//??\\??????????????????????????£???????¨?????????????\n\t\t\tif(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}\n//\t\t\tSystem.out.println(\"While\");\n\t\t}\n\t\tSystem.out.println(stack.get(peak));\n\t}\n}", "Main", "public static void main(String[] args)throws NumberFormatException, IOException{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint peak = 0;\n\t\tint returnNumber = 0;\n\t\tmathClass keisan =new mathClass();\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\tstack.add(\"??§?¨?0 ??????????????´??????\");\n\t\twhile(scan.hasNext()){\n\t\t\tstack.add(scan.next());\n\t\t\tpeak += 1;\n\n\t\t\t//??\\??????????????????????????£???????¨?????????????\n\t\t\tif(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}\n//\t\t\tSystem.out.println(\"While\");\n\t\t}\n\t\tSystem.out.println(stack.get(peak));\n\t}", "main", "{\n//\t\tSystem.out.println(\" \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tint peak = 0;\n\t\tint returnNumber = 0;\n\t\tmathClass keisan =new mathClass();\n\t\tArrayList<String> stack = new ArrayList<String>();\n\t\tstack.add(\"??§?¨?0 ??????????????´??????\");\n\t\twhile(scan.hasNext()){\n\t\t\tstack.add(scan.next());\n\t\t\tpeak += 1;\n\n\t\t\t//??\\??????????????????????????£???????¨?????????????\n\t\t\tif(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}\n//\t\t\tSystem.out.println(\"While\");\n\t\t}\n\t\tSystem.out.println(stack.get(peak));\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int peak = 0;", "peak", "0", "int returnNumber = 0;", "returnNumber", "0", "mathClass keisan =new mathClass();", "keisan", "new mathClass()", "ArrayList<String> stack = new ArrayList<String>();", "stack", "new ArrayList<String>()", "stack.add(\"??§?¨?0 ??????????????´??????\")", "stack.add", "stack", "\"??§?¨?0 ??????????????´??????\"", "while(scan.hasNext()){\n\t\t\tstack.add(scan.next());\n\t\t\tpeak += 1;\n\n\t\t\t//??\\??????????????????????????£???????¨?????????????\n\t\t\tif(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}\n//\t\t\tSystem.out.println(\"While\");\n\t\t}", "scan.hasNext()", "scan.hasNext", "scan", "{\n\t\t\tstack.add(scan.next());\n\t\t\tpeak += 1;\n\n\t\t\t//??\\??????????????????????????£???????¨?????????????\n\t\t\tif(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}\n//\t\t\tSystem.out.println(\"While\");\n\t\t}", "stack.add(scan.next())", "stack.add", "stack", "scan.next()", "scan.next", "scan", "peak += 1", "peak", "1", "if(stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")){\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}", "stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")", "stack.get(peak).equals(\"*\")", "stack.get(peak).equals(\"+\") || stack.get(peak).equals(\"-\") || stack.get(peak).equals(\"*\") || stack.get(peak).equals(\"/\")", "stack.get(peak).equals(\"+\")", "stack.get(peak).equals", "stack.get(peak)", "stack.get", "stack", "peak", "\"+\"", "stack.get(peak).equals(\"-\")", "stack.get(peak).equals", "stack.get(peak)", "stack.get", "stack", "peak", "\"-\"", "stack.get(peak).equals(\"*\")", "stack.get(peak).equals", "stack.get(peak)", "stack.get", "stack", "peak", "\"*\"", "stack.get(peak).equals(\"/\")", "stack.get(peak).equals", "stack.get(peak)", "stack.get", "stack", "peak", "\"/\"", "{\n\t\t\t\treturnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak));\n//\t\t\t\tSystem.out.println(returnNumber);\n\t\t\t\t//?????£?????????????????????????¨???????????????\\??????\n\t\t\t\tstack.remove(peak);\n\t\t\t\tstack.remove(peak-1);\n\t\t\t\tstack.remove(peak-2);\n\t\t\t\tstack.add(String.valueOf(returnNumber));\n\t\t\t\tpeak -= 2;\n\t\t\t}", "returnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak))", "returnNumber", "keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak))", "keisan.shisokuEnzan", "keisan", "stack.get(peak-2)", "stack.get", "stack", "peak-2", "peak", "2", "stack.get(peak-1)", "stack.get", "stack", "peak-1", "peak", "1", "stack.get(peak)", "stack.get", "stack", "peak", "stack.remove(peak)", "stack.remove", "stack", "peak", "stack.remove(peak-1)", "stack.remove", "stack", "peak-1", "peak", "1", "stack.remove(peak-2)", "stack.remove", "stack", "peak-2", "peak", "2", "stack.add(String.valueOf(returnNumber))", "stack.add", "stack", "String.valueOf(returnNumber)", "String.valueOf", "String", "returnNumber", "peak -= 2", "peak", "2", "System.out.println(stack.get(peak))", "System.out.println", "System.out", "System", "System.out", "stack.get(peak)", "stack.get", "stack", "peak", "String[] args", "args", "class mathClass{\n\n\tpublic mathClass(){\n\n\t}\n\n\t//?????????????????????\n\tpublic int shisokuEnzan(String stringX,String stringY,String op){\n\t\tint ret =0;\n\t\tint x =Integer.parseInt(stringX);\n\t\tint y =Integer.parseInt(stringY);\n//\t\tSystem.out.println(x+\" \"+op+\" \"+y+\" wo okonau\");\n\n\t\tif(op.charAt(0) == '+'){\n\t\t\tret = x + y;\n\t\t}\n\t\tif(op.charAt(0) == '-'){\n\t\t\tret = x - y;\n\t\t}\n\t\tif(op.charAt(0) == '*'){\n\t\t\tret = x * y;\n\t\t}\n\t\tif(op.charAt(0) == '/'){\n\t\t\tret = x / y;\n\t\t}\n\t\treturn ret;\n\t}\n\n\t//???????????¨?????????\n\tpublic void disp(int[] ary){\n\t\tfor(int i=0;i<ary.length;i++){\n\t\t\tSystem.out.println(ary[i]);\n\t\t}\n\t}\n\n}", "mathClass", "public mathClass(){\n\n\t}", "mathClass", "{\n\n\t}", "//?????????????????????\n\tpublic int shisokuEnzan(String stringX,String stringY,String op){\n\t\tint ret =0;\n\t\tint x =Integer.parseInt(stringX);\n\t\tint y =Integer.parseInt(stringY);\n//\t\tSystem.out.println(x+\" \"+op+\" \"+y+\" wo okonau\");\n\n\t\tif(op.charAt(0) == '+'){\n\t\t\tret = x + y;\n\t\t}\n\t\tif(op.charAt(0) == '-'){\n\t\t\tret = x - y;\n\t\t}\n\t\tif(op.charAt(0) == '*'){\n\t\t\tret = x * y;\n\t\t}\n\t\tif(op.charAt(0) == '/'){\n\t\t\tret = x / y;\n\t\t}\n\t\treturn ret;\n\t}", "shisokuEnzan", "{\n\t\tint ret =0;\n\t\tint x =Integer.parseInt(stringX);\n\t\tint y =Integer.parseInt(stringY);\n//\t\tSystem.out.println(x+\" \"+op+\" \"+y+\" wo okonau\");\n\n\t\tif(op.charAt(0) == '+'){\n\t\t\tret = x + y;\n\t\t}\n\t\tif(op.charAt(0) == '-'){\n\t\t\tret = x - y;\n\t\t}\n\t\tif(op.charAt(0) == '*'){\n\t\t\tret = x * y;\n\t\t}\n\t\tif(op.charAt(0) == '/'){\n\t\t\tret = x / y;\n\t\t}\n\t\treturn ret;\n\t}", "int ret =0;", "ret", "0", "int x =Integer.parseInt(stringX);", "x", "Integer.parseInt(stringX)", "Integer.parseInt", "Integer", "stringX", "int y =Integer.parseInt(stringY);", "y", "Integer.parseInt(stringY)", "Integer.parseInt", "Integer", "stringY", "if(op.charAt(0) == '+'){\n\t\t\tret = x + y;\n\t\t}", "op.charAt(0) == '+'", "op.charAt(0)", "op.charAt", "op", "0", "'+'", "{\n\t\t\tret = x + y;\n\t\t}", "ret = x + y", "ret", "x + y", "x", "y", "if(op.charAt(0) == '-'){\n\t\t\tret = x - y;\n\t\t}", "op.charAt(0) == '-'", "op.charAt(0)", "op.charAt", "op", "0", "'-'", "{\n\t\t\tret = x - y;\n\t\t}", "ret = x - y", "ret", "x - y", "x", "y", "if(op.charAt(0) == '*'){\n\t\t\tret = x * y;\n\t\t}", "op.charAt(0) == '*'", "op.charAt(0)", "op.charAt", "op", "0", "'*'", "{\n\t\t\tret = x * y;\n\t\t}", "ret = x * y", "ret", "x * y", "x", "y", "if(op.charAt(0) == '/'){\n\t\t\tret = x / y;\n\t\t}", "op.charAt(0) == '/'", "op.charAt(0)", "op.charAt", "op", "0", "'/'", "{\n\t\t\tret = x / y;\n\t\t}", "ret = x / y", "ret", "x / y", "x", "y", "return ret;", "ret", "String stringX", "stringX", "String stringY", "stringY", "String op", "op", "//???????????¨?????????\n\tpublic void disp(int[] ary){\n\t\tfor(int i=0;i<ary.length;i++){\n\t\t\tSystem.out.println(ary[i]);\n\t\t}\n\t}", "disp", "{\n\t\tfor(int i=0;i<ary.length;i++){\n\t\t\tSystem.out.println(ary[i]);\n\t\t}\n\t}", "for(int i=0;i<ary.length;i++){\n\t\t\tSystem.out.println(ary[i]);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<ary.length", "i", "ary.length", "ary", "ary.length", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(ary[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(ary[i]);\n\t\t}", "System.out.println(ary[i])", "System.out.println", "System.out", "System", "System.out", "ary[i]", "ary", "i", "int[] ary", "ary" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Scanner; class Main{ public static void main(String[] args)throws NumberFormatException, IOException{ // System.out.println(" "); Scanner scan = new Scanner(System.in); int peak = 0; int returnNumber = 0; mathClass keisan =new mathClass(); ArrayList<String> stack = new ArrayList<String>(); stack.add("??§?¨?0 ??????????????´??????"); while(scan.hasNext()){ stack.add(scan.next()); peak += 1; //??\??????????????????????????£???????¨????????????? if(stack.get(peak).equals("+") || stack.get(peak).equals("-") || stack.get(peak).equals("*") || stack.get(peak).equals("/")){ returnNumber = keisan.shisokuEnzan(stack.get(peak-2),stack.get(peak-1),stack.get(peak)); // System.out.println(returnNumber); //?????£?????????????????????????¨???????????????\?????? stack.remove(peak); stack.remove(peak-1); stack.remove(peak-2); stack.add(String.valueOf(returnNumber)); peak -= 2; } // System.out.println("While"); } System.out.println(stack.get(peak)); } } class mathClass{ public mathClass(){ } //????????????????????? public int shisokuEnzan(String stringX,String stringY,String op){ int ret =0; int x =Integer.parseInt(stringX); int y =Integer.parseInt(stringY); // System.out.println(x+" "+op+" "+y+" wo okonau"); if(op.charAt(0) == '+'){ ret = x + y; } if(op.charAt(0) == '-'){ ret = x - y; } if(op.charAt(0) == '*'){ ret = x * y; } if(op.charAt(0) == '/'){ ret = x / y; } return ret; } //???????????¨????????? public void disp(int[] ary){ for(int i=0;i<ary.length;i++){ System.out.println(ary[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 13, 41, 13, 17, 41, 13, 18, 13, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 2, 2, 2, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 156, 8 ], [ 156, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 11, 37 ], [ 37, 38 ], [ 37, 39 ], [ 11, 40 ], [ 40, 41 ], [ 40, 42 ], [ 11, 43 ], [ 43, 44 ], [ 43, 45 ], [ 11, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 58, 64 ], [ 64, 65 ], [ 67, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 67, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 66, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 67, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 64, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 84, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 84, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 99, 106 ], [ 95, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 109, 116 ], [ 95, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 119, 126 ], [ 95, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 133, 134 ], [ 133, 135 ], [ 129, 136 ], [ 64, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 11, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 145, 150 ], [ 150, 151 ], [ 151, 152 ], [ 9, 153 ], [ 153, 154 ], [ 0, 155 ], [ 155, 156 ], [ 155, 157 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main{ // algorithm for reverse polish notation\n\n\t\n\t\n\t\n\t \n public static void main(String[] args) {\n \t Scanner sc = new Scanner(System.in);\n String ex = sc.nextLine();\n String[] k = ex.split(\" \");\n String[] polish = k;\n String testCase = \"\";\n int testSize = polish.length; // length of the test case\n int number1=0;\n int number2=0;\n Stack<Integer> stack = new Stack<Integer>();\n \n for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }\n System.out.println(stack.pop());\n \n \n}\n \t\n \t\n \n \t\n \n \n \n \n \n \n \n\n\n\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main{ // algorithm for reverse polish notation\n\n\t\n\t\n\t\n\t \n public static void main(String[] args) {\n \t Scanner sc = new Scanner(System.in);\n String ex = sc.nextLine();\n String[] k = ex.split(\" \");\n String[] polish = k;\n String testCase = \"\";\n int testSize = polish.length; // length of the test case\n int number1=0;\n int number2=0;\n Stack<Integer> stack = new Stack<Integer>();\n \n for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }\n System.out.println(stack.pop());\n \n \n}\n \t\n \t\n \n \t\n \n \n \n \n \n \n \n\n\n\n}", "Main", "public static void main(String[] args) {\n \t Scanner sc = new Scanner(System.in);\n String ex = sc.nextLine();\n String[] k = ex.split(\" \");\n String[] polish = k;\n String testCase = \"\";\n int testSize = polish.length; // length of the test case\n int number1=0;\n int number2=0;\n Stack<Integer> stack = new Stack<Integer>();\n \n for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }\n System.out.println(stack.pop());\n \n \n}", "main", "{\n \t Scanner sc = new Scanner(System.in);\n String ex = sc.nextLine();\n String[] k = ex.split(\" \");\n String[] polish = k;\n String testCase = \"\";\n int testSize = polish.length; // length of the test case\n int number1=0;\n int number2=0;\n Stack<Integer> stack = new Stack<Integer>();\n \n for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }\n System.out.println(stack.pop());\n \n \n}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String ex = sc.nextLine();", "ex", "sc.nextLine()", "sc.nextLine", "sc", "String[] k = ex.split(\" \");", "k", "ex.split(\" \")", "ex.split", "ex", "\" \"", "String[] polish = k;", "polish", "k", "String testCase = \"\";", "testCase", "\"\"", "int testSize = polish.length;", "testSize", "polish.length", "polish", "polish.length", "int number1=0;", "number1", "0", "int number2=0;", "number2", "0", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }", "int i=0;", "int i=0;", "i", "0", "i<testSize", "i", "testSize", "i++", "i++", "i", "{\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }", "{\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }", "testCase = polish[i]", "testCase", "polish[i]", "polish", "i", "if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }", "testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")", "testCase.equals(\"*\")", "testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")", "testCase.equals(\"+\")", "testCase.equals", "testCase", "\"+\"", "testCase.equals(\"-\")", "testCase.equals", "testCase", "\"-\"", "testCase.equals(\"*\")", "testCase.equals", "testCase", "\"*\"", "testCase.equals(\"/\")", "testCase.equals", "testCase", "\"/\"", "{\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }", "number2 = (int) stack.pop()", "number2", "(int) stack.pop()", "stack.pop", "stack", "number1 = (int) stack.pop()", "number1", "(int) stack.pop()", "stack.pop", "stack", "switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }", "testCase", "case \"+\" :", "\"+\"", "case \"+\" :", "stack.push(number1+number2)", "stack.push", "stack", "number1+number2", "number1", "number2", "break;", "case \"-\" :", "\"-\"", "case \"-\" :", "stack.push(number1-number2)", "stack.push", "stack", "number1-number2", "number1", "number2", "break;", "case \"*\" :", "\"*\"", "case \"*\" :", "stack.push(number1*number2)", "stack.push", "stack", "number1*number2", "number1", "number2", "break;", "case \"/\" :", "\"/\"", "case \"/\" :", "stack.push(number1/number2)", "stack.push", "stack", "number1/number2", "number1", "number2", "break;", "{\n stack.push(Integer.parseInt(testCase));\n }", "stack.push(Integer.parseInt(testCase))", "stack.push", "stack", "Integer.parseInt(testCase)", "Integer.parseInt", "Integer", "testCase", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main{ // algorithm for reverse polish notation\n\n\t\n\t\n\t\n\t \n public static void main(String[] args) {\n \t Scanner sc = new Scanner(System.in);\n String ex = sc.nextLine();\n String[] k = ex.split(\" \");\n String[] polish = k;\n String testCase = \"\";\n int testSize = polish.length; // length of the test case\n int number1=0;\n int number2=0;\n Stack<Integer> stack = new Stack<Integer>();\n \n for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }\n System.out.println(stack.pop());\n \n \n}\n \t\n \t\n \n \t\n \n \n \n \n \n \n \n\n\n\n}", "public class Main{ // algorithm for reverse polish notation\n\n\t\n\t\n\t\n\t \n public static void main(String[] args) {\n \t Scanner sc = new Scanner(System.in);\n String ex = sc.nextLine();\n String[] k = ex.split(\" \");\n String[] polish = k;\n String testCase = \"\";\n int testSize = polish.length; // length of the test case\n int number1=0;\n int number2=0;\n Stack<Integer> stack = new Stack<Integer>();\n \n for(int i=0; i<testSize; i++){\n \t testCase = polish[i];\n\n \n if(testCase.equals(\"+\") || testCase.equals(\"-\") || testCase.equals(\"*\") || testCase.equals(\"/\")) {\n number2 = (int) stack.pop();\n number1 = (int) stack.pop();\n \n switch(testCase){\n case \"+\" :\n stack.push(number1+number2); // plus\n break;\n case \"-\" :\n stack.push(number1-number2); // minus\n break;\n case \"*\" :\n stack.push(number1*number2); // multiplication\n break;\n case \"/\" :\n stack.push(number1/number2); // division\n break;\n }\n }else{\n stack.push(Integer.parseInt(testCase));\n }\n \n \n \n }\n System.out.println(stack.pop());\n \n \n}\n \t\n \t\n \n \t\n \n \n \n \n \n \n \n\n\n\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main{ // algorithm for reverse polish notation public static void main(String[] args) { Scanner sc = new Scanner(System.in); String ex = sc.nextLine(); String[] k = ex.split(" "); String[] polish = k; String testCase = ""; int testSize = polish.length; // length of the test case int number1=0; int number2=0; Stack<Integer> stack = new Stack<Integer>(); for(int i=0; i<testSize; i++){ testCase = polish[i]; if(testCase.equals("+") || testCase.equals("-") || testCase.equals("*") || testCase.equals("/")) { number2 = (int) stack.pop(); number1 = (int) stack.pop(); switch(testCase){ case "+" : stack.push(number1+number2); // plus break; case "-" : stack.push(number1-number2); // minus break; case "*" : stack.push(number1*number2); // multiplication break; case "/" : stack.push(number1/number2); // division break; } }else{ stack.push(Integer.parseInt(testCase)); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 9, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 2, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 13, 29, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 184, 20 ], [ 184, 21 ], [ 21, 22 ], [ 21, 23 ], [ 184, 24 ], [ 24, 25 ], [ 24, 26 ], [ 184, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 29, 36 ], [ 36, 37 ], [ 29, 38 ], [ 38, 39 ], [ 29, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 40, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 40, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 56, 61 ], [ 53, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 62, 72 ], [ 72, 73 ], [ 73, 74 ], [ 62, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 77, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 83, 93 ], [ 76, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 76, 99 ], [ 99, 100 ], [ 100, 101 ], [ 76, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 76, 107 ], [ 107, 108 ], [ 108, 109 ], [ 76, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 110, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 121, 123 ], [ 110, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 124, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 135, 136 ], [ 135, 137 ], [ 124, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 138, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 146, 149 ], [ 149, 150 ], [ 149, 151 ], [ 53, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 152, 157 ], [ 157, 158 ], [ 158, 159 ], [ 27, 160 ], [ 160, 161 ], [ 184, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 167, 170 ], [ 164, 171 ], [ 171, 172 ], [ 171, 173 ], [ 173, 174 ], [ 174, 175 ], [ 173, 176 ], [ 164, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 162, 181 ], [ 181, 182 ], [ 0, 183 ], [ 183, 184 ], [ 183, 185 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> S = new Stack<Integer>();\n\t\tint A,B;\n\n\t\ttry {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean checkInt(String number){\n\t\tPattern p = Pattern.compile(\"^[0-9]+$\");\n\t\tMatcher m = p.matcher(number);\n\t\treturn m.matches();\n\t}\n\n}\n", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "import java.util.regex.Matcher;", "Matcher", "java.util.regex", "import java.util.regex.Pattern;", "Pattern", "java.util.regex", "public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> S = new Stack<Integer>();\n\t\tint A,B;\n\n\t\ttry {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean checkInt(String number){\n\t\tPattern p = Pattern.compile(\"^[0-9]+$\");\n\t\tMatcher m = p.matcher(number);\n\t\treturn m.matches();\n\t}\n\n}", "Main", "public static final int BIG_NUM = 2000000000;", "BIG_NUM", "2000000000", "public static final int MOD = 1000000007;", "MOD", "1000000007", "public static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> S = new Stack<Integer>();\n\t\tint A,B;\n\n\t\ttry {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "main", "{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> S = new Stack<Integer>();\n\t\tint A,B;\n\n\t\ttry {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "Stack<Integer> S = new Stack<Integer>();", "S", "new Stack<Integer>()", "int A", "A", "B;", "B", "try {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}", "catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}", "NumberFormatException e", "{\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}", "IOException e", "{\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t}", "String input[] = br.readLine().split(\"\\\\s+\");", "input", "br.readLine().split(\"\\\\s+\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"\\\\s+\"", "for(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < input.length", "i", "input.length", "input", "input.length", "i++", "i++", "i", "{\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}", "if(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}", "checkInt(input[i])", "checkInt", "input[i]", "input", "i", "{\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}", "S.push(Integer.parseInt(input[i]))", "S.push", "S", "Integer.parseInt(input[i])", "Integer.parseInt", "Integer", "input[i]", "input", "i", "continue;", "B = S.peek()", "B", "S.peek()", "S.peek", "S", "S.pop()", "S.pop", "S", "A = S.peek()", "A", "S.peek()", "S.peek", "S", "S.pop()", "S.pop", "S", "if(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}", "input[i].equals(\"+\")", "input[i].equals", "input[i]", "input", "i", "\"+\"", "{\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}", "S.push(A+B)", "S.push", "S", "A+B", "A", "B", "if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}", "input[i].equals(\"*\")", "input[i].equals", "input[i]", "input", "i", "\"*\"", "{\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}", "S.push(A*B)", "S.push", "S", "A*B", "A", "B", "if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}", "input[i].equals(\"-\")", "input[i].equals", "input[i]", "input", "i", "\"-\"", "{\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}", "S.push(A-B)", "S.push", "S", "A-B", "A", "B", "System.out.println(S.peek())", "System.out.println", "System.out", "System", "System.out", "S.peek()", "S.peek", "S", "String[] args", "args", "public static boolean checkInt(String number){\n\t\tPattern p = Pattern.compile(\"^[0-9]+$\");\n\t\tMatcher m = p.matcher(number);\n\t\treturn m.matches();\n\t}", "checkInt", "{\n\t\tPattern p = Pattern.compile(\"^[0-9]+$\");\n\t\tMatcher m = p.matcher(number);\n\t\treturn m.matches();\n\t}", "Pattern p = Pattern.compile(\"^[0-9]+$\");", "p", "Pattern.compile(\"^[0-9]+$\")", "Pattern.compile", "Pattern", "\"^[0-9]+$\"", "Matcher m = p.matcher(number);", "m", "p.matcher(number)", "p.matcher", "p", "number", "return m.matches();", "m.matches()", "m.matches", "m", "String number", "number", "public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> S = new Stack<Integer>();\n\t\tint A,B;\n\n\t\ttry {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean checkInt(String number){\n\t\tPattern p = Pattern.compile(\"^[0-9]+$\");\n\t\tMatcher m = p.matcher(number);\n\t\treturn m.matches();\n\t}\n\n}", "public class Main {\n\n\tpublic static final int BIG_NUM = 2000000000;\n\tpublic static final int MOD = 1000000007;\n\n\tpublic static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStack<Integer> S = new Stack<Integer>();\n\t\tint A,B;\n\n\t\ttry {\n\n\t\t\tString input[] = br.readLine().split(\"\\\\s+\");\n\n\t\t\tfor(int i = 0; i < input.length; i++){\n\t\t\t\tif(checkInt(input[i])){\n\t\t\t\t\tS.push(Integer.parseInt(input[i]));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tB = S.peek();\n\t\t\t\tS.pop();\n\t\t\t\tA = S.peek();\n\t\t\t\tS.pop();\n\n\t\t\t\tif(input[i].equals(\"+\")){\n\t\t\t\t\tS.push(A+B);\n\t\t\t\t}else if(input[i].equals(\"*\")){\n\t\t\t\t\tS.push(A*B);\n\t\t\t\t}else if(input[i].equals(\"-\")){\n\t\t\t\t\tS.push(A-B);\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(S.peek());\n\n\t\t} catch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\n\tpublic static boolean checkInt(String number){\n\t\tPattern p = Pattern.compile(\"^[0-9]+$\");\n\t\tMatcher m = p.matcher(number);\n\t\treturn m.matches();\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static final int BIG_NUM = 2000000000; public static final int MOD = 1000000007; public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); Stack<Integer> S = new Stack<Integer>(); int A,B; try { String input[] = br.readLine().split("\\s+"); for(int i = 0; i < input.length; i++){ if(checkInt(input[i])){ S.push(Integer.parseInt(input[i])); continue; } B = S.peek(); S.pop(); A = S.peek(); S.pop(); if(input[i].equals("+")){ S.push(A+B); }else if(input[i].equals("*")){ S.push(A*B); }else if(input[i].equals("-")){ S.push(A-B); } } System.out.println(S.peek()); } catch (NumberFormatException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public static boolean checkInt(String number){ Pattern p = Pattern.compile("^[0-9]+$"); Matcher m = p.matcher(number); return m.matches(); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 17, 0, 18, 36, 13, 20, 17, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 13, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 4, 18, 13, 17, 30, 4, 18, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 4, 18, 13, 17, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 12, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 4, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 27, 32 ], [ 24, 33 ], [ 33, 34 ], [ 4, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 0, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 52, 54 ], [ 48, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 55, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 65, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 92, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 99, 106 ], [ 92, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 109, 116 ], [ 92, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 119, 126 ], [ 48, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 133, 134 ], [ 46, 135 ], [ 135, 136 ] ]
[ "import java.util.Scanner;\n\nclass Stack {\n\tprivate int top;\n\tprivate int[] a;\n\t\n\tStack(){\n\t\tthis.top=0;\n\t\tthis.a=new int[200];\n\t}\n\t\n\tvoid push(int x){\n\t\ta[top++]=x;\n\t}\n\t\n\tint pop(){\n\t\ttop--;\n\t\treturn a[top];\n\t}\n\t\n}\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tStack S=new Stack();\n\t\t\n\t\twhile(scan.hasNext()){\n\t\t\tString str=scan.next();\n\t\t\tif(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S.pop());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Stack {\n\tprivate int top;\n\tprivate int[] a;\n\t\n\tStack(){\n\t\tthis.top=0;\n\t\tthis.a=new int[200];\n\t}\n\t\n\tvoid push(int x){\n\t\ta[top++]=x;\n\t}\n\t\n\tint pop(){\n\t\ttop--;\n\t\treturn a[top];\n\t}\n\t\n}", "Stack", "private int top;", "top", "private int[] a;", "a", "Stack(){\n\t\tthis.top=0;\n\t\tthis.a=new int[200];\n\t}", "Stack", "{\n\t\tthis.top=0;\n\t\tthis.a=new int[200];\n\t}", "this.top=0", "this.top", "this", "this.top", "0", "this.a=new int[200]", "this.a", "this", "this.a", "new int[200]", "200", "void push(int x){\n\t\ta[top++]=x;\n\t}", "push", "{\n\t\ta[top++]=x;\n\t}", "a[top++]=x", "a[top++]", "a", "top++", "top", "x", "int x", "x", "int pop(){\n\t\ttop--;\n\t\treturn a[top];\n\t}", "pop", "{\n\t\ttop--;\n\t\treturn a[top];\n\t}", "top--", "top", "return a[top];", "a[top]", "a", "top", "class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tStack S=new Stack();\n\t\t\n\t\twhile(scan.hasNext()){\n\t\t\tString str=scan.next();\n\t\t\tif(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S.pop());\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tStack S=new Stack();\n\t\t\n\t\twhile(scan.hasNext()){\n\t\t\tString str=scan.next();\n\t\t\tif(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S.pop());\n\t}", "main", "{\n\t\tScanner scan=new Scanner(System.in);\n\t\tStack S=new Stack();\n\t\t\n\t\twhile(scan.hasNext()){\n\t\t\tString str=scan.next();\n\t\t\tif(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(S.pop());\n\t}", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "Stack S=new Stack();", "S", "new Stack()", "while(scan.hasNext()){\n\t\t\tString str=scan.next();\n\t\t\tif(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "scan.hasNext()", "scan.hasNext", "scan", "{\n\t\t\tString str=scan.next();\n\t\t\tif(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "String str=scan.next();", "str", "scan.next()", "scan.next", "scan", "if(Character.isDigit(str.charAt(0))){\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}", "Character.isDigit(str.charAt(0))", "Character.isDigit", "Character", "str.charAt(0)", "str.charAt", "str", "0", "{\n\t\t\t\tS.push(Integer.parseInt(str));\n\t\t\t}", "S.push(Integer.parseInt(str))", "S.push", "S", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "{\n\t\t\t\tint a=S.pop(); int b=S.pop();\n\t\t\t\tswitch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}", "int a=S.pop();", "a", "S.pop()", "S.pop", "S", "int b=S.pop();", "b", "S.pop()", "S.pop", "S", "switch(str.charAt(0)){\n\t\t\t\t\tcase '+':S.push(b+a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '-':S.push(b-a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\tcase '*':S.push(b*a);\n\t\t\t\t\t\t\t break;\n\t\t\t\t}", "str.charAt(0)", "str.charAt", "str", "0", "case '+':", "'+'", "case '+':", "S.push(b+a)", "S.push", "S", "b+a", "b", "a", "break;", "case '-':", "'-'", "case '-':", "S.push(b-a)", "S.push", "S", "b-a", "b", "a", "break;", "case '*':", "'*'", "case '*':", "S.push(b*a)", "S.push", "S", "b*a", "b", "a", "break;", "System.out.println(S.pop())", "System.out.println", "System.out", "System", "System.out", "S.pop()", "S.pop", "S", "String[] args", "args" ]
import java.util.Scanner; class Stack { private int top; private int[] a; Stack(){ this.top=0; this.a=new int[200]; } void push(int x){ a[top++]=x; } int pop(){ top--; return a[top]; } } class Main { public static void main(String[] args){ Scanner scan=new Scanner(System.in); Stack S=new Stack(); while(scan.hasNext()){ String str=scan.next(); if(Character.isDigit(str.charAt(0))){ S.push(Integer.parseInt(str)); } else { int a=S.pop(); int b=S.pop(); switch(str.charAt(0)){ case '+':S.push(b+a); break; case '-':S.push(b-a); break; case '*':S.push(b*a); break; } } } System.out.println(S.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 4, 18, 13, 4, 18, 13, 17, 4, 18, 18, 13, 13, 4, 18, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 168, 5 ], [ 168, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [ 6, 15 ], [ 15, 16 ], [ 168, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 23, 25 ], [ 19, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 26, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 30, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 36, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 48, 49 ], [ 41, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 56, 57 ], [ 41, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 61, 63 ], [ 36, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 64, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 69, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 69, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 64, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 92, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 104, 105 ], [ 97, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 97, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 117, 119 ], [ 92, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 19, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 134, 135 ], [ 168, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 142, 143 ], [ 142, 144 ], [ 142, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 151, 152 ], [ 152, 153 ], [ 146, 154 ], [ 138, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 155, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 136, 165 ], [ 165, 166 ], [ 0, 167 ], [ 167, 168 ], [ 167, 169 ] ]
[ "import java.util.*;\n\npublic class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n Stack<Long> st = new Stack<Long>();\n while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }\n System.out.println(st.pop());\n }\n \n private void print(Object[] xs) {\n StringBuilder sb = new StringBuilder();\n for (Object x : xs) sb.append(x.toString()).append(' ');\n System.out.println(sb.toString().trim());\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n Stack<Long> st = new Stack<Long>();\n while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }\n System.out.println(st.pop());\n }\n \n private void print(Object[] xs) {\n StringBuilder sb = new StringBuilder();\n for (Object x : xs) sb.append(x.toString()).append(' ');\n System.out.println(sb.toString().trim());\n }\n}", "Main", "public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }", "main", "{\n Main main = new Main();\n main.solv();\n }", "Main main = new Main();", "main", "new Main()", "main.solv()", "main.solv", "main", "String[] args", "args", "private void solv() {\n Scanner input = new Scanner(System.in);\n Stack<Long> st = new Stack<Long>();\n while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }\n System.out.println(st.pop());\n }", "solv", "{\n Scanner input = new Scanner(System.in);\n Stack<Long> st = new Stack<Long>();\n while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }\n System.out.println(st.pop());\n }", "Scanner input = new Scanner(System.in);", "input", "new Scanner(System.in)", "Stack<Long> st = new Stack<Long>();", "st", "new Stack<Long>()", "while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }", "input.hasNext()", "input.hasNext", "input", "{\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }", "String s = input.next();", "s", "input.next()", "input.next", "input", "if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }", "\"+\".equals(s)", "\"+\".equals", "\"+\"", "s", "{\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n }", "long y = Long.valueOf(st.pop());", "y", "Long.valueOf(st.pop())", "Long.valueOf", "Long", "st.pop()", "st.pop", "st", "long x = Long.valueOf(st.pop());", "x", "Long.valueOf(st.pop())", "Long.valueOf", "Long", "st.pop()", "st.pop", "st", "st.push(x + y)", "st.push", "st", "x + y", "x", "y", "if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }", "\"-\".equals(s)", "\"-\".equals", "\"-\"", "s", "{\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n }", "long y = Long.valueOf(st.pop());", "y", "Long.valueOf(st.pop())", "Long.valueOf", "Long", "st.pop()", "st.pop", "st", "long x = Long.valueOf(st.pop());", "x", "Long.valueOf(st.pop())", "Long.valueOf", "Long", "st.pop()", "st.pop", "st", "st.push(x - y)", "st.push", "st", "x - y", "x", "y", "if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }", "\"*\".equals(s)", "\"*\".equals", "\"*\"", "s", "{\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n }", "long y = Long.valueOf(st.pop());", "y", "Long.valueOf(st.pop())", "Long.valueOf", "Long", "st.pop()", "st.pop", "st", "long x = Long.valueOf(st.pop());", "x", "Long.valueOf(st.pop())", "Long.valueOf", "Long", "st.pop()", "st.pop", "st", "st.push(x * y)", "st.push", "st", "x * y", "x", "y", "{\n st.push(Long.valueOf(s));\n }", "st.push(Long.valueOf(s))", "st.push", "st", "Long.valueOf(s)", "Long.valueOf", "Long", "s", "System.out.println(st.pop())", "System.out.println", "System.out", "System", "System.out", "st.pop()", "st.pop", "st", "private void print(Object[] xs) {\n StringBuilder sb = new StringBuilder();\n for (Object x : xs) sb.append(x.toString()).append(' ');\n System.out.println(sb.toString().trim());\n }", "print", "{\n StringBuilder sb = new StringBuilder();\n for (Object x : xs) sb.append(x.toString()).append(' ');\n System.out.println(sb.toString().trim());\n }", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "for (Object x : xs) sb.append(x.toString()).append(' ');", "Object x", "xs", "sb.append(x.toString()).append(' ');", "sb.append(x.toString()).append(' ')", "sb.append(x.toString()).append", "sb.append(x.toString())", "sb.append", "sb", "x.toString()", "x.toString", "x", "' '", "System.out.println(sb.toString().trim())", "System.out.println", "System.out", "System", "System.out", "sb.toString().trim()", "sb.toString().trim", "sb.toString()", "sb.toString", "sb", "Object[] xs", "xs", "public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n Stack<Long> st = new Stack<Long>();\n while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }\n System.out.println(st.pop());\n }\n \n private void print(Object[] xs) {\n StringBuilder sb = new StringBuilder();\n for (Object x : xs) sb.append(x.toString()).append(' ');\n System.out.println(sb.toString().trim());\n }\n}", "public class Main {\n \n public static void main(String[] args) {\n Main main = new Main();\n main.solv();\n }\n \n private void solv() {\n Scanner input = new Scanner(System.in);\n Stack<Long> st = new Stack<Long>();\n while (input.hasNext()) {\n String s = input.next();\n if (\"+\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x + y);\n } else if (\"-\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x - y);\n } else if (\"*\".equals(s)) {\n long y = Long.valueOf(st.pop());\n long x = Long.valueOf(st.pop());\n st.push(x * y);\n } else {\n st.push(Long.valueOf(s));\n }\n }\n System.out.println(st.pop());\n }\n \n private void print(Object[] xs) {\n StringBuilder sb = new StringBuilder();\n for (Object x : xs) sb.append(x.toString()).append(' ');\n System.out.println(sb.toString().trim());\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Main main = new Main(); main.solv(); } private void solv() { Scanner input = new Scanner(System.in); Stack<Long> st = new Stack<Long>(); while (input.hasNext()) { String s = input.next(); if ("+".equals(s)) { long y = Long.valueOf(st.pop()); long x = Long.valueOf(st.pop()); st.push(x + y); } else if ("-".equals(s)) { long y = Long.valueOf(st.pop()); long x = Long.valueOf(st.pop()); st.push(x - y); } else if ("*".equals(s)) { long y = Long.valueOf(st.pop()); long x = Long.valueOf(st.pop()); st.push(x * y); } else { st.push(Long.valueOf(s)); } } System.out.println(st.pop()); } private void print(Object[] xs) { StringBuilder sb = new StringBuilder(); for (Object x : xs) sb.append(x.toString()).append(' '); System.out.println(sb.toString().trim()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 35, 18, 13, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 137, 14 ], [ 137, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 32, 34 ], [ 17, 35 ], [ 35, 36 ], [ 35, 37 ], [ 17, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 59, 76 ], [ 53, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 79, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 79, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 79, 96 ], [ 53, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 99, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 99, 116 ], [ 52, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 17, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 132, 133 ], [ 15, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.util.Stack;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main\n{\n public static void main(String[] args)throws IOException\n {\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] S = br.readLine().split(\"\\\\s\");\n\n\tStack <Integer>s1 = new Stack<Integer>();\n\tint a = 0;\nint b = 0;\n\n\tfor(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }\n\tSystem.out.println(s1.pop());\n }\n}", "import java.util.Stack;", "Stack", "java.util", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "public class Main\n{\n public static void main(String[] args)throws IOException\n {\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] S = br.readLine().split(\"\\\\s\");\n\n\tStack <Integer>s1 = new Stack<Integer>();\n\tint a = 0;\nint b = 0;\n\n\tfor(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }\n\tSystem.out.println(s1.pop());\n }\n}", "Main", "public static void main(String[] args)throws IOException\n {\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] S = br.readLine().split(\"\\\\s\");\n\n\tStack <Integer>s1 = new Stack<Integer>();\n\tint a = 0;\nint b = 0;\n\n\tfor(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }\n\tSystem.out.println(s1.pop());\n }", "main", "{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] S = br.readLine().split(\"\\\\s\");\n\n\tStack <Integer>s1 = new Stack<Integer>();\n\tint a = 0;\nint b = 0;\n\n\tfor(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }\n\tSystem.out.println(s1.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] S = br.readLine().split(\"\\\\s\");", "S", "br.readLine().split(\"\\\\s\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"\\\\s\"", "Stack <Integer>s1 = new Stack<Integer>();", "s1", "new Stack<Integer>()", "int a = 0;", "a", "0", "int b = 0;", "b", "0", "for(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }", "int i = 0;", "int i = 0;", "i", "0", "i < S.length", "i", "S.length", "S", "S.length", "i++", "i++", "i", "{\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }", "{\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }", "switch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }", "S[i]", "S", "i", "case \"+\":", "\"+\"", "case \"+\":", "a = s1.pop()", "a", "s1.pop()", "s1.pop", "s1", "b = s1.pop()", "b", "s1.pop()", "s1.pop", "s1", "s1.add(a + b)", "s1.add", "s1", "a + b", "a", "b", "continue;", "case \"-\":", "\"-\"", "case \"-\":", "a = s1.pop()", "a", "s1.pop()", "s1.pop", "s1", "b = s1.pop()", "b", "s1.pop()", "s1.pop", "s1", "s1.add(b - a)", "s1.add", "s1", "b - a", "b", "a", "continue;", "case \"*\":", "\"*\"", "case \"*\":", "a = s1.pop()", "a", "s1.pop()", "s1.pop", "s1", "b = s1.pop()", "b", "s1.pop()", "s1.pop", "s1", "s1.add(a * b)", "s1.add", "s1", "a * b", "a", "b", "continue;", "s1.push(Integer.parseInt(S[i]))", "s1.push", "s1", "Integer.parseInt(S[i])", "Integer.parseInt", "Integer", "S[i]", "S", "i", "System.out.println(s1.pop())", "System.out.println", "System.out", "System", "System.out", "s1.pop()", "s1.pop", "s1", "String[] args", "args", "public class Main\n{\n public static void main(String[] args)throws IOException\n {\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] S = br.readLine().split(\"\\\\s\");\n\n\tStack <Integer>s1 = new Stack<Integer>();\n\tint a = 0;\nint b = 0;\n\n\tfor(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }\n\tSystem.out.println(s1.pop());\n }\n}", "public class Main\n{\n public static void main(String[] args)throws IOException\n {\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] S = br.readLine().split(\"\\\\s\");\n\n\tStack <Integer>s1 = new Stack<Integer>();\n\tint a = 0;\nint b = 0;\n\n\tfor(int i = 0; i < S.length; i++)\n\t {\n\t\tswitch(S[i])\n\t\t {\n\t\t case \"+\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a + b);\n\t\t\tcontinue;\n\n\t\t case \"-\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(b - a);\n\t\t\tcontinue;\n\n\t\t case \"*\":\n\t\t\ta = s1.pop();\n\t\t\tb = s1.pop();\n\t\t\ts1.add(a * b);\n\t\t\tcontinue;\n\t\t }\n\t\ts1.push(Integer.parseInt(S[i]));\n\t }\n\tSystem.out.println(s1.pop());\n }\n}", "Main" ]
import java.util.Stack; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] S = br.readLine().split("\\s"); Stack <Integer>s1 = new Stack<Integer>(); int a = 0; int b = 0; for(int i = 0; i < S.length; i++) { switch(S[i]) { case "+": a = s1.pop(); b = s1.pop(); s1.add(a + b); continue; case "-": a = s1.pop(); b = s1.pop(); s1.add(b - a); continue; case "*": a = s1.pop(); b = s1.pop(); s1.add(a * b); continue; } s1.push(Integer.parseInt(S[i])); } System.out.println(s1.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 42, 4, 18, 13, 30, 14, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 1, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 101, 5 ], [ 101, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 23, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 28, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 39, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 39, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 63, 64 ], [ 63, 65 ], [ 59, 66 ], [ 55, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 55, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 55, 87 ], [ 87, 88 ], [ 88, 89 ], [ 8, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 96, 97 ], [ 6, 98 ], [ 98, 99 ], [ 0, 100 ], [ 100, 101 ], [ 100, 102 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String args[]) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString problem = in.nextLine();\n\t\t\n\t\tScanner problemScanner = new Scanner(problem);\n\t\t\n\t\twhile(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(myStack.pop());\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n\tpublic static void main(String args[]) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString problem = in.nextLine();\n\t\t\n\t\tScanner problemScanner = new Scanner(problem);\n\t\t\n\t\twhile(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(myStack.pop());\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\n}", "Main", "public static void main(String args[]) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString problem = in.nextLine();\n\t\t\n\t\tScanner problemScanner = new Scanner(problem);\n\t\t\n\t\twhile(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(myStack.pop());\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "main", "{\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString problem = in.nextLine();\n\t\t\n\t\tScanner problemScanner = new Scanner(problem);\n\t\t\n\t\twhile(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(myStack.pop());\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "Stack<Integer> myStack = new Stack<Integer>();", "myStack", "new Stack<Integer>()", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "String problem = in.nextLine();", "problem", "in.nextLine()", "in.nextLine", "in", "Scanner problemScanner = new Scanner(problem);", "problemScanner", "new Scanner(problem)", "while(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "problemScanner.hasNext()", "problemScanner.hasNext", "problemScanner", "{\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "if(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}", "problemScanner.hasNextInt()", "problemScanner.hasNextInt", "problemScanner", "{\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}", "myStack.push(problemScanner.nextInt())", "myStack.push", "myStack", "problemScanner.nextInt()", "problemScanner.nextInt", "problemScanner", "{\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}", "String operator = problemScanner.next();", "operator", "problemScanner.next()", "problemScanner.next", "problemScanner", "int a = myStack.pop();", "a", "myStack.pop()", "myStack.pop", "myStack", "int b = myStack.pop();", "b", "myStack.pop()", "myStack.pop", "myStack", "switch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}", "operator", "case \"+\" :", "\"+\"", "case \"+\" :", "myStack.push(a + b)", "myStack.push", "myStack", "a + b", "a", "b", "break;", "case \"-\" :", "\"-\"", "case \"-\" :", "myStack.push(b - a)", "myStack.push", "myStack", "b - a", "b", "a", "break;", "case \"*\" :", "\"*\"", "case \"*\" :", "myStack.push(b * a)", "myStack.push", "myStack", "b * a", "b", "a", "break;", "default :", "default :", "break;", "System.out.println(myStack.pop())", "System.out.println", "System.out", "System", "System.out", "myStack.pop()", "myStack.pop", "myStack", "String args[]", "args", "public class Main {\n\n\tpublic static void main(String args[]) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString problem = in.nextLine();\n\t\t\n\t\tScanner problemScanner = new Scanner(problem);\n\t\t\n\t\twhile(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(myStack.pop());\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String args[]) {\n\t\tStack<Integer> myStack = new Stack<Integer>();\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\tString problem = in.nextLine();\n\t\t\n\t\tScanner problemScanner = new Scanner(problem);\n\t\t\n\t\twhile(problemScanner.hasNext()) {\n\t\t\tif(problemScanner.hasNextInt()) {\n\t\t\t\tmyStack.push(problemScanner.nextInt());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tString operator = problemScanner.next();\n\t\t\t\t\n\t\t\t\tint a = myStack.pop();\n\t\t\t\tint b = myStack.pop();\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase \"+\" : myStack.push(a + b);\n\t\t\t\tbreak;\n\t\t\t\tcase \"-\" : myStack.push(b - a);\n\t\t\t\tbreak;\n\t\t\t\tcase \"*\" : myStack.push(b * a);\n\t\t\t\tbreak;\n\t\t\t\tdefault : break;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(myStack.pop());\n\t\t\n\t\t\n\t\t\n\t\t\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String args[]) { Stack<Integer> myStack = new Stack<Integer>(); Scanner in = new Scanner(System.in); String problem = in.nextLine(); Scanner problemScanner = new Scanner(problem); while(problemScanner.hasNext()) { if(problemScanner.hasNextInt()) { myStack.push(problemScanner.nextInt()); } else { String operator = problemScanner.next(); int a = myStack.pop(); int b = myStack.pop(); switch(operator) { case "+" : myStack.push(a + b); break; case "-" : myStack.push(b - a); break; case "*" : myStack.push(b * a); break; default : break; } } } System.out.println(myStack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 20, 17, 41, 13, 20, 12, 13, 30, 41, 13, 41, 13, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 30, 4, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 13, 23, 13, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 2, 13, 17, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 150, 5 ], [ 150, 6 ], [ 6, 7 ], [ 6, 8 ], [ 150, 9 ], [ 9, 10 ], [ 9, 11 ], [ 150, 13 ], [ 13, 14 ], [ 13, 15 ], [ 150, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 18, 21 ], [ 21, 22 ], [ 18, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 25, 30 ], [ 18, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 31, 41 ], [ 41, 42 ], [ 42, 43 ], [ 31, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 46, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 53, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 46, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 67, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 74, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 67, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 88, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 95, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 95, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 88, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 18, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 16, 125 ], [ 125, 126 ], [ 150, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 130, 135 ], [ 127, 136 ], [ 136, 137 ], [ 150, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 146, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static int top = 0;\n\tpublic static int[] stack = new int[10000];\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a, b;\n\t\tString[] s = (sc.nextLine()).split(\" \");\n\t\t\n\t\tfor(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\t\n\tpublic static void push(int x){\n\t\tstack[++top] = x;\n\t}\n\t\n\tpublic static int pop(){\n\t\ttop--;\n\t\treturn stack[top+1];\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static int top = 0;\n\tpublic static int[] stack = new int[10000];\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a, b;\n\t\tString[] s = (sc.nextLine()).split(\" \");\n\t\t\n\t\tfor(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\t\n\tpublic static void push(int x){\n\t\tstack[++top] = x;\n\t}\n\t\n\tpublic static int pop(){\n\t\ttop--;\n\t\treturn stack[top+1];\n\t}\n}", "Main", "public static int top = 0;", "top", "0", "public static int[] stack = new int[10000];", "stack", "new int[10000]", "10000", "public static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args) {\n\t\tint a, b;\n\t\tString[] s = (sc.nextLine()).split(\" \");\n\t\t\n\t\tfor(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}", "main", "{\n\t\tint a, b;\n\t\tString[] s = (sc.nextLine()).split(\" \");\n\t\t\n\t\tfor(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}", "int a", "a", "b;", "b", "String[] s = (sc.nextLine()).split(\" \");", "s", "(sc.nextLine()).split(\" \")", "(sc.nextLine()).split", "(sc.nextLine())", "sc.nextLine", "sc", "\" \"", "for(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < s.length", "i", "s.length", "s", "s.length", "i++", "i++", "i", "{\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}", "{\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}", "if(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}", "s[i].equals(\"+\")", "s[i].equals", "s[i]", "s", "i", "\"+\"", "{\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}", "a = pop()", "a", "pop()", "pop", "b = pop()", "b", "pop()", "pop", "push(b + a)", "push", "b + a", "b", "a", "if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}", "s[i].equals(\"-\")", "s[i].equals", "s[i]", "s", "i", "\"-\"", "{\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}", "a = pop()", "a", "pop()", "pop", "b = pop()", "b", "pop()", "pop", "push(b - a)", "push", "b - a", "b", "a", "if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}", "s[i].equals(\"*\")", "s[i].equals", "s[i]", "s", "i", "\"*\"", "{\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}", "a = pop()", "a", "pop()", "pop", "b = pop()", "b", "pop()", "pop", "push(b * a)", "push", "b * a", "b", "a", "{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}", "push(Integer.parseInt(s[i]))", "push", "Integer.parseInt(s[i])", "Integer.parseInt", "Integer", "s[i]", "s", "i", "System.out.println(pop())", "System.out.println", "System.out", "System", "System.out", "pop()", "pop", "String[] args", "args", "public static void push(int x){\n\t\tstack[++top] = x;\n\t}", "push", "{\n\t\tstack[++top] = x;\n\t}", "stack[++top] = x", "stack[++top]", "stack", "++top", "top", "x", "int x", "x", "public static int pop(){\n\t\ttop--;\n\t\treturn stack[top+1];\n\t}", "pop", "{\n\t\ttop--;\n\t\treturn stack[top+1];\n\t}", "top--", "top", "return stack[top+1];", "stack[top+1]", "stack", "top+1", "top", "1", "public class Main {\n\tpublic static int top = 0;\n\tpublic static int[] stack = new int[10000];\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a, b;\n\t\tString[] s = (sc.nextLine()).split(\" \");\n\t\t\n\t\tfor(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\t\n\tpublic static void push(int x){\n\t\tstack[++top] = x;\n\t}\n\t\n\tpublic static int pop(){\n\t\ttop--;\n\t\treturn stack[top+1];\n\t}\n}", "public class Main {\n\tpublic static int top = 0;\n\tpublic static int[] stack = new int[10000];\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\tint a, b;\n\t\tString[] s = (sc.nextLine()).split(\" \");\n\t\t\n\t\tfor(int i = 0; i < s.length; i++){\n\t\t\tif(s[i].equals(\"+\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b + a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"-\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b - a);\n\t\t\t}\n\t\t\telse if(s[i].equals(\"*\")){\n\t\t\t\ta = pop();\n\t\t\t\tb = pop();\n\t\t\t\tpush(b * a);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tpush(Integer.parseInt(s[i]));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\t\n\tpublic static void push(int x){\n\t\tstack[++top] = x;\n\t}\n\t\n\tpublic static int pop(){\n\t\ttop--;\n\t\treturn stack[top+1];\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static int top = 0; public static int[] stack = new int[10000]; public static Scanner sc = new Scanner(System.in); public static void main(String[] args) { int a, b; String[] s = (sc.nextLine()).split(" "); for(int i = 0; i < s.length; i++){ if(s[i].equals("+")){ a = pop(); b = pop(); push(b + a); } else if(s[i].equals("-")){ a = pop(); b = pop(); push(b - a); } else if(s[i].equals("*")){ a = pop(); b = pop(); push(b * a); } else{ push(Integer.parseInt(s[i])); } } System.out.println(pop()); } public static void push(int x){ stack[++top] = x; } public static int pop(){ top--; return stack[top+1]; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 18, 13, 13, 17, 14, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 30, 41, 13, 17, 14, 2, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 40, 2, 4, 18, 13, 4, 18, 13, 14, 2, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 132, 14 ], [ 132, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 32, 42 ], [ 42, 43 ], [ 43, 44 ], [ 32, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 46, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 55, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 55, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 74, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 96, 100 ], [ 100, 101 ], [ 101, 102 ], [ 88, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 70, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 17, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 126, 127 ], [ 127, 128 ], [ 15, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] strArray = br.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] strArray = br.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}\n\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] strArray = br.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] strArray = br.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] strArray = br.readLine().split(\" \");", "strArray", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "for(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < strArray.length", "i", "strArray.length", "strArray", "strArray.length", "i++", "i++", "i", "{\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}", "{\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}", "char input = strArray[i].charAt(0);", "input", "strArray[i].charAt(0)", "strArray[i].charAt", "strArray[i]", "strArray", "i", "0", "if(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}", "Character.isDigit(input)", "Character.isDigit", "Character", "input", "{\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}", "stack.push(Integer.parseInt(strArray[i]))", "stack.push", "stack", "Integer.parseInt(strArray[i])", "Integer.parseInt", "Integer", "strArray[i]", "strArray", "i", "{\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}", "int tmpResult = 0;", "tmpResult", "0", "if(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}", "input == '+'", "input", "'+'", "{\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}", "tmpResult = stack.pop() + stack.pop()", "tmpResult", "stack.pop() + stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}", "input == '-'", "input", "'-'", "{\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}", "tmpResult = -(stack.pop() - stack.pop())", "tmpResult", "-(stack.pop() - stack.pop())", "(stack.pop() - stack.pop())", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}", "input == '*'", "input", "'*'", "{\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}", "tmpResult = stack.pop() * stack.pop()", "tmpResult", "stack.pop() * stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "stack.push(tmpResult)", "stack.push", "stack", "tmpResult", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] strArray = br.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] strArray = br.readLine().split(\" \");\n\t\tStack<Integer> stack = new Stack<Integer>();\n\t\t\n\t\tfor(int i = 0; i < strArray.length ; i++){\n\t\t\tchar input = strArray[i].charAt(0);\n\t\t\tif(Character.isDigit(input)){\n\t\t\t\tstack.push(Integer.parseInt(strArray[i]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tint tmpResult = 0;\n\t\t\t\tif(input == '+'){\n\t\t\t\t\ttmpResult = stack.pop() + stack.pop();\n\t\t\t\t}\n\t\t\t\telse if(input == '-'){\n\t\t\t\t\ttmpResult = -(stack.pop() - stack.pop());\n\t\t\t\t}\n\t\t\t\telse if(input == '*'){\n\t\t\t\t\ttmpResult = stack.pop() * stack.pop();\n\t\t\t\t}\t\n\t\t\t\t//System.out.println(tmpResult);\n\t\t\t\tstack.push(tmpResult);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(stack.pop());\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class Main { public static void main(String[] args) throws IOException { // TODO ????????????????????????????????????????????? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] strArray = br.readLine().split(" "); Stack<Integer> stack = new Stack<Integer>(); for(int i = 0; i < strArray.length ; i++){ char input = strArray[i].charAt(0); if(Character.isDigit(input)){ stack.push(Integer.parseInt(strArray[i])); } else { int tmpResult = 0; if(input == '+'){ tmpResult = stack.pop() + stack.pop(); } else if(input == '-'){ tmpResult = -(stack.pop() - stack.pop()); } else if(input == '*'){ tmpResult = stack.pop() * stack.pop(); } //System.out.println(tmpResult); stack.push(tmpResult); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 40, 17, 41, 13, 20, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 17, 41, 13, 20, 13, 12, 13, 30, 0, 13, 17, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 13, 12, 13, 30, 14, 4, 13, 29, 40, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 4, 13, 29, 40, 17, 40, 13, 29, 18, 13, 2, 13, 17, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 222, 11 ], [ 222, 12 ], [ 12, 13 ], [ 12, 14 ], [ 222, 15 ], [ 15, 16 ], [ 15, 17 ], [ 222, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 222, 22 ], [ 22, 23 ], [ 22, 24 ], [ 222, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 34, 39 ], [ 28, 40 ], [ 40, 41 ], [ 40, 42 ], [ 28, 43 ], [ 43, 44 ], [ 43, 45 ], [ 28, 46 ], [ 46, 47 ], [ 28, 48 ], [ 48, 49 ], [ 28, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 65, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 72, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 65, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 96, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 96, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 110, 112 ], [ 89, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 113, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 120, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 120, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 134, 136 ], [ 113, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 144, 145 ], [ 144, 146 ], [ 28, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 147, 152 ], [ 152, 153 ], [ 153, 154 ], [ 26, 155 ], [ 155, 156 ], [ 0, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 157, 161 ], [ 161, 162 ], [ 161, 163 ], [ 157, 164 ], [ 164, 165 ], [ 164, 166 ], [ 157, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 157, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 157, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 157, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 191, 194 ], [ 190, 195 ], [ 195, 196 ], [ 190, 197 ], [ 197, 198 ], [ 198, 199 ], [ 198, 200 ], [ 197, 201 ], [ 188, 202 ], [ 202, 203 ], [ 157, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 207, 210 ], [ 210, 211 ], [ 211, 212 ], [ 206, 213 ], [ 213, 214 ], [ 206, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 218, 219 ], [ 218, 220 ], [ 0, 221 ], [ 221, 222 ], [ 221, 223 ] ]
[ "\nimport javax.xml.crypto.Data;\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static int SENTINEL = 100000007;\n public static int MAX = 10007;\n public static int NIL = -1;\n\n public static int[] dp = new int[100];\n\n\n public static void main(String[] args) throws IOException {\n\n //??\\???\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n\n Scanner sc = new Scanner(System.in);\n\n Stack S = new Stack();\n int a, b;\n for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }\n System.out.println(S.pop());\n }\n\n}\n\nclass Stack {\n int top;\n int MAX = 10001;\n int[] S = new int[MAX];\n\n Stack() {\n top = 0;\n }\n boolean isEmpty() {\n return top == 0;\n }\n boolean isFull() {\n return top > MAX;\n }\n void push(int x) {\n if(isFull()) return;\n top++;\n S[top] = x;\n }\n int pop() {\n if(isEmpty()) return -1;\n top--;\n return S[top + 1];\n }\n}", "import javax.xml.crypto.Data;", "Data", "javax.xml.crypto", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static int SENTINEL = 100000007;\n public static int MAX = 10007;\n public static int NIL = -1;\n\n public static int[] dp = new int[100];\n\n\n public static void main(String[] args) throws IOException {\n\n //??\\???\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n\n Scanner sc = new Scanner(System.in);\n\n Stack S = new Stack();\n int a, b;\n for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }\n System.out.println(S.pop());\n }\n\n}", "Main", "public static int SENTINEL = 100000007;", "SENTINEL", "100000007", "public static int MAX = 10007;", "MAX", "10007", "public static int NIL = -1;", "NIL", "-1", "1", "public static int[] dp = new int[100];", "dp", "new int[100]", "100", "public static void main(String[] args) throws IOException {\n\n //??\\???\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n\n Scanner sc = new Scanner(System.in);\n\n Stack S = new Stack();\n int a, b;\n for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }\n System.out.println(S.pop());\n }", "main", "{\n\n //??\\???\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n\n Scanner sc = new Scanner(System.in);\n\n Stack S = new Stack();\n int a, b;\n for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }\n System.out.println(S.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] str = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Stack S = new Stack();", "S", "new Stack()", "int a", "a", "b;", "b", "for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < str.length", "i", "str.length", "str", "str.length", "i++", "i++", "i", "{\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }", "{\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }", "if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }", "str[i].equals(\"+\")", "str[i].equals", "str[i]", "str", "i", "\"+\"", "{\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }", "a = S.pop()", "a", "S.pop()", "S.pop", "S", "b = S.pop()", "b", "S.pop()", "S.pop", "S", "S.push(a + b)", "S.push", "S", "a + b", "a", "b", "if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }", "str[i].equals(\"-\")", "str[i].equals", "str[i]", "str", "i", "\"-\"", "{\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }", "a = S.pop()", "a", "S.pop()", "S.pop", "S", "b = S.pop()", "b", "S.pop()", "S.pop", "S", "S.push(b - a)", "S.push", "S", "b - a", "b", "a", "if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }", "str[i].equals(\"*\")", "str[i].equals", "str[i]", "str", "i", "\"*\"", "{\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }", "a = S.pop()", "a", "S.pop()", "S.pop", "S", "b = S.pop()", "b", "S.pop()", "S.pop", "S", "S.push(a * b)", "S.push", "S", "a * b", "a", "b", "{\n S.push(Integer.parseInt(str[i]));\n }", "S.push(Integer.parseInt(str[i]))", "S.push", "S", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "System.out.println(S.pop())", "System.out.println", "System.out", "System", "System.out", "S.pop()", "S.pop", "S", "String[] args", "args", "class Stack {\n int top;\n int MAX = 10001;\n int[] S = new int[MAX];\n\n Stack() {\n top = 0;\n }\n boolean isEmpty() {\n return top == 0;\n }\n boolean isFull() {\n return top > MAX;\n }\n void push(int x) {\n if(isFull()) return;\n top++;\n S[top] = x;\n }\n int pop() {\n if(isEmpty()) return -1;\n top--;\n return S[top + 1];\n }\n}", "Stack", "int top;", "top", "int MAX = 10001;", "MAX", "10001", "int[] S = new int[MAX];", "S", "new int[MAX]", "MAX", "Stack() {\n top = 0;\n }", "Stack", "{\n top = 0;\n }", "top = 0", "top", "0", "boolean isEmpty() {\n return top == 0;\n }", "isEmpty", "{\n return top == 0;\n }", "return top == 0;", "top == 0", "top", "0", "boolean isFull() {\n return top > MAX;\n }", "isFull", "{\n return top > MAX;\n }", "return top > MAX;", "top > MAX", "top", "MAX", "void push(int x) {\n if(isFull()) return;\n top++;\n S[top] = x;\n }", "push", "{\n if(isFull()) return;\n top++;\n S[top] = x;\n }", "if(isFull()) return;", "isFull()", "isFull", "return;", "top++", "top", "S[top] = x", "S[top]", "S", "top", "x", "int x", "x", "int pop() {\n if(isEmpty()) return -1;\n top--;\n return S[top + 1];\n }", "pop", "{\n if(isEmpty()) return -1;\n top--;\n return S[top + 1];\n }", "if(isEmpty()) return -1;", "isEmpty()", "isEmpty", "return -1;", "-1", "1", "top--", "top", "return S[top + 1];", "S[top + 1]", "S", "top + 1", "top", "1", "public class Main {\n public static int SENTINEL = 100000007;\n public static int MAX = 10007;\n public static int NIL = -1;\n\n public static int[] dp = new int[100];\n\n\n public static void main(String[] args) throws IOException {\n\n //??\\???\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n\n Scanner sc = new Scanner(System.in);\n\n Stack S = new Stack();\n int a, b;\n for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }\n System.out.println(S.pop());\n }\n\n}", "public class Main {\n public static int SENTINEL = 100000007;\n public static int MAX = 10007;\n public static int NIL = -1;\n\n public static int[] dp = new int[100];\n\n\n public static void main(String[] args) throws IOException {\n\n //??\\???\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] str = br.readLine().split(\" \");\n\n Scanner sc = new Scanner(System.in);\n\n Stack S = new Stack();\n int a, b;\n for(int i = 0; i < str.length; i++) {\n if(str[i].equals(\"+\")) {\n a = S.pop();\n b = S.pop();\n S.push(a + b);\n }\n else if(str[i].equals(\"-\")) {\n a = S.pop();\n b = S.pop();\n S.push(b - a);\n }\n else if(str[i].equals(\"*\")) {\n a = S.pop();\n b = S.pop();\n S.push(a * b);\n }\n else {\n S.push(Integer.parseInt(str[i]));\n }\n }\n System.out.println(S.pop());\n }\n\n}", "Main" ]
import javax.xml.crypto.Data; import java.util.*; import java.io.*; public class Main { public static int SENTINEL = 100000007; public static int MAX = 10007; public static int NIL = -1; public static int[] dp = new int[100]; public static void main(String[] args) throws IOException { //??\??? BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); Scanner sc = new Scanner(System.in); Stack S = new Stack(); int a, b; for(int i = 0; i < str.length; i++) { if(str[i].equals("+")) { a = S.pop(); b = S.pop(); S.push(a + b); } else if(str[i].equals("-")) { a = S.pop(); b = S.pop(); S.push(b - a); } else if(str[i].equals("*")) { a = S.pop(); b = S.pop(); S.push(a * b); } else { S.push(Integer.parseInt(str[i])); } } System.out.println(S.pop()); } } class Stack { int top; int MAX = 10001; int[] S = new int[MAX]; Stack() { top = 0; } boolean isEmpty() { return top == 0; } boolean isFull() { return top > MAX; } void push(int x) { if(isFull()) return; top++; S[top] = x; } int pop() { if(isEmpty()) return -1; top--; return S[top + 1]; } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 12, 13, 30, 0, 13, 17, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 29, 18, 13, 40, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 18, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 4, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 21, 26 ], [ 18, 27 ], [ 27, 28 ], [ 4, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 4, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 45, 50 ], [ 39, 51 ], [ 51, 52 ], [ 51, 53 ], [ 39, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 54, 64 ], [ 64, 65 ], [ 65, 66 ], [ 54, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 68, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 74, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 79, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 79, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 74, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 96, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 101, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 101, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 96, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 118, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 123, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 132, 133 ], [ 123, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 137, 139 ], [ 118, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 144, 145 ], [ 143, 146 ], [ 39, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 147, 152 ], [ 152, 153 ], [ 153, 154 ], [ 37, 155 ], [ 155, 156 ] ]
[ "\nimport java.util.Scanner;\n\nclass Main{\n int[] a = new int[200];\n int top;\n\n Main(){\n top = 0;\n }\n\n void push(int x){\n a[++top] = x;\n }\n\n int pop(){\n return a[top--];\n }\n\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n String[] input = stdIn.nextLine().split(\" \");\n Main stack = new Main();\n\n for(int i = 0; i < input.length; i++){\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }\n\n\n System.out.println(stack.pop());\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n int[] a = new int[200];\n int top;\n\n Main(){\n top = 0;\n }\n\n void push(int x){\n a[++top] = x;\n }\n\n int pop(){\n return a[top--];\n }\n\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n String[] input = stdIn.nextLine().split(\" \");\n Main stack = new Main();\n\n for(int i = 0; i < input.length; i++){\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }\n\n\n System.out.println(stack.pop());\n }\n}", "Main", "int[] a = new int[200];", "a", "new int[200]", "200", "int top;", "top", "Main(){\n top = 0;\n }", "Main", "{\n top = 0;\n }", "top = 0", "top", "0", "void push(int x){\n a[++top] = x;\n }", "push", "{\n a[++top] = x;\n }", "a[++top] = x", "a[++top]", "a", "++top", "top", "x", "int x", "x", "int pop(){\n return a[top--];\n }", "pop", "{\n return a[top--];\n }", "return a[top--];", "a[top--]", "a", "top--", "top", "public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n String[] input = stdIn.nextLine().split(\" \");\n Main stack = new Main();\n\n for(int i = 0; i < input.length; i++){\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }\n\n\n System.out.println(stack.pop());\n }", "main", "{\n Scanner stdIn = new Scanner(System.in);\n String[] input = stdIn.nextLine().split(\" \");\n Main stack = new Main();\n\n for(int i = 0; i < input.length; i++){\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }\n\n\n System.out.println(stack.pop());\n }", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "String[] input = stdIn.nextLine().split(\" \");", "input", "stdIn.nextLine().split(\" \")", "stdIn.nextLine().split", "stdIn.nextLine()", "stdIn.nextLine", "stdIn", "\" \"", "Main stack = new Main();", "stack", "new Main()", "for(int i = 0; i < input.length; i++){\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }", "int i = 0;", "int i = 0;", "i", "0", "i < input.length", "i", "input.length", "input", "input.length", "i++", "i++", "i", "{\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }", "{\n String s = input[i];\n\n if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));\n\n }", "String s = input[i];", "s", "input[i]", "input", "i", "if(s.equals(\"+\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }\n else if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "stack.push(a + b)", "stack.push", "stack", "a + b", "a", "b", "if(s.equals(\"*\")){\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }\n else if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a * b);\n }", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "stack.push(a * b)", "stack.push", "stack", "a * b", "a", "b", "if(s.equals(\"-\")){\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }\n else\n stack.push(Integer.parseInt(s));", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n int b = stack.pop();\n int a = stack.pop();\n stack.push(a-b);\n }", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "stack.push(a-b)", "stack.push", "stack", "a-b", "a", "b", "stack.push(Integer.parseInt(s))", "stack.push", "stack", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args" ]
import java.util.Scanner; class Main{ int[] a = new int[200]; int top; Main(){ top = 0; } void push(int x){ a[++top] = x; } int pop(){ return a[top--]; } public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); String[] input = stdIn.nextLine().split(" "); Main stack = new Main(); for(int i = 0; i < input.length; i++){ String s = input[i]; if(s.equals("+")){ int a = stack.pop(); int b = stack.pop(); stack.push(a + b); } else if(s.equals("*")){ int a = stack.pop(); int b = stack.pop(); stack.push(a * b); } else if(s.equals("-")){ int b = stack.pop(); int a = stack.pop(); stack.push(a-b); } else stack.push(Integer.parseInt(s)); } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 28, 13, 4, 18, 13, 17, 30, 30, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 19, 24 ], [ 15, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 25, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 25, 34 ], [ 34, 35 ], [ 25, 36 ], [ 36, 37 ], [ 25, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 38, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 46, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 46, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 68, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 68, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 90, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 95, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 90, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 25, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 125, 126 ], [ 126, 127 ], [ 9, 128 ], [ 128, 129 ] ]
[ "import java.io.*;\nimport java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t try {\n\t \tStack<Integer> stack = new Stack<Integer>();\n\t\t\t\n\t\t String str = kb.readLine();\n\t\t\tint a, b;\n\t\t for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }\n\n System.out.println( stack.pop() );\n\t } catch( IOException e ) {\n\t System.err.println( e );\n\t }\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "class Main {\n\tpublic static void main(String[] args) {\n\t BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t try {\n\t \tStack<Integer> stack = new Stack<Integer>();\n\t\t\t\n\t\t String str = kb.readLine();\n\t\t\tint a, b;\n\t\t for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }\n\n System.out.println( stack.pop() );\n\t } catch( IOException e ) {\n\t System.err.println( e );\n\t }\n\t}\n}", "Main", "public static void main(String[] args) {\n\t BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t try {\n\t \tStack<Integer> stack = new Stack<Integer>();\n\t\t\t\n\t\t String str = kb.readLine();\n\t\t\tint a, b;\n\t\t for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }\n\n System.out.println( stack.pop() );\n\t } catch( IOException e ) {\n\t System.err.println( e );\n\t }\n\t}", "main", "{\n\t BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t try {\n\t \tStack<Integer> stack = new Stack<Integer>();\n\t\t\t\n\t\t String str = kb.readLine();\n\t\t\tint a, b;\n\t\t for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }\n\n System.out.println( stack.pop() );\n\t } catch( IOException e ) {\n\t System.err.println( e );\n\t }\n\t}", "BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );", "kb", "new BufferedReader( new InputStreamReader( System.in ) )", "try {\n\t \tStack<Integer> stack = new Stack<Integer>();\n\t\t\t\n\t\t String str = kb.readLine();\n\t\t\tint a, b;\n\t\t for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }\n\n System.out.println( stack.pop() );\n\t } catch( IOException e ) {\n\t System.err.println( e );\n\t }", "catch( IOException e ) {\n\t System.err.println( e );\n\t }", "IOException e", "{\n\t System.err.println( e );\n\t }", "System.err.println( e )", "System.err.println", "System.err", "System", "System.err", "e", "{\n\t \tStack<Integer> stack = new Stack<Integer>();\n\t\t\t\n\t\t String str = kb.readLine();\n\t\t\tint a, b;\n\t\t for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }\n\n System.out.println( stack.pop() );\n\t }", "Stack<Integer> stack = new Stack<Integer>();", "stack", "new Stack<Integer>()", "String str = kb.readLine();", "str", "kb.readLine()", "kb.readLine", "kb", "int a", "a", "b;", "b", "for( String wd: str.split( \" \" ) ) {\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }", "String wd", "str.split( \" \" )", "str.split", "str", "\" \"", "{\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }", "{\n\t\t\t if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }\n\t\t }", "if( \"+\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t } else if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }", "\"+\".equals( wd )", "\"+\".equals", "\"+\"", "wd", "{\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a + b );\t\t\t \n\t\t\t }", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push( a + b )", "stack.push", "stack", "a + b", "a", "b", "if( \"-\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t } else if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }", "\"-\".equals( wd )", "\"-\".equals", "\"-\"", "wd", "{\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a - b );\t\t\t \n\t\t\t }", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push( a - b )", "stack.push", "stack", "a - b", "a", "b", "if( \"*\".equals( wd ) ) {\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t } else {\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }", "\"*\".equals( wd )", "\"*\".equals", "\"*\"", "wd", "{\n\t\t\t \tb = stack.pop();\n\t\t\t \ta = stack.pop();\n\t\t\t \tstack.push( a * b );\t\t\t \n\t\t\t }", "b = stack.pop()", "b", "stack.pop()", "stack.pop", "stack", "a = stack.pop()", "a", "stack.pop()", "stack.pop", "stack", "stack.push( a * b )", "stack.push", "stack", "a * b", "a", "b", "{\n\t\t\t \tstack.push( Integer.parseInt( wd ) );\n\t\t\t }", "stack.push( Integer.parseInt( wd ) )", "stack.push", "stack", "Integer.parseInt( wd )", "Integer.parseInt", "Integer", "wd", "System.out.println( stack.pop() )", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args" ]
import java.io.*; import java.util.*; class Main { public static void main(String[] args) { BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); try { Stack<Integer> stack = new Stack<Integer>(); String str = kb.readLine(); int a, b; for( String wd: str.split( " " ) ) { if( "+".equals( wd ) ) { b = stack.pop(); a = stack.pop(); stack.push( a + b ); } else if( "-".equals( wd ) ) { b = stack.pop(); a = stack.pop(); stack.push( a - b ); } else if( "*".equals( wd ) ) { b = stack.pop(); a = stack.pop(); stack.push( a * b ); } else { stack.push( Integer.parseInt( wd ) ); } } System.out.println( stack.pop() ); } catch( IOException e ) { System.err.println( e ); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 2, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 26, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 20, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 50, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 60, 64 ], [ 64, 65 ], [ 65, 66 ], [ 57, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 50, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 71, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 78, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 87, 91 ], [ 71, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 92, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 102, 106 ], [ 106, 107 ], [ 107, 108 ], [ 99, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 92, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 120, 122 ], [ 20, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 129, 130 ], [ 18, 131 ], [ 131, 132 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] str = br.readLine().split(\" \");\n\n\t\tDeque<Integer> dq = new ArrayDeque<>();\n\n\t\tfor(int i=0; i<str.length; i++){\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dq.pop());\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] str = br.readLine().split(\" \");\n\n\t\tDeque<Integer> dq = new ArrayDeque<>();\n\n\t\tfor(int i=0; i<str.length; i++){\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dq.pop());\n\t}\n\n}", "Main", "public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] str = br.readLine().split(\" \");\n\n\t\tDeque<Integer> dq = new ArrayDeque<>();\n\n\t\tfor(int i=0; i<str.length; i++){\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dq.pop());\n\t}", "main", "{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] str = br.readLine().split(\" \");\n\n\t\tDeque<Integer> dq = new ArrayDeque<>();\n\n\t\tfor(int i=0; i<str.length; i++){\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dq.pop());\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] str = br.readLine().split(\" \");", "str", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Deque<Integer> dq = new ArrayDeque<>();", "dq", "new ArrayDeque<>()", "for(int i=0; i<str.length; i++){\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<str.length", "i", "str.length", "str", "str.length", "i++", "i++", "i", "{\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}", "{\n\n\t\t\tif(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}\n\t\t}", "if(str[i].equals(\"+\")){\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}else if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}", "str[i].equals(\"+\")", "str[i].equals", "str[i]", "str", "i", "\"+\"", "{\n\t\t\t\tInteger num = dq.pop()+dq.pop();\n\t\t\t\tdq.push(num);\n\n\t\t\t}", "Integer num = dq.pop()+dq.pop();", "num", "dq.pop()+dq.pop()", "dq.pop()", "dq.pop", "dq", "dq.pop()", "dq.pop", "dq", "dq.push(num)", "dq.push", "dq", "num", "if (str[i].equals(\"-\")) {\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}else if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}", "str[i].equals(\"-\")", "str[i].equals", "str[i]", "str", "i", "\"-\"", "{\n\n\t\t\t\tInteger num = dq.pop();\n\t\t\t\tdq.push(dq.pop()-num);\n\n\t\t\t}", "Integer num = dq.pop();", "num", "dq.pop()", "dq.pop", "dq", "dq.push(dq.pop()-num)", "dq.push", "dq", "dq.pop()-num", "dq.pop()", "dq.pop", "dq", "num", "if (str[i].equals(\"*\")) {\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}else {\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}", "str[i].equals(\"*\")", "str[i].equals", "str[i]", "str", "i", "\"*\"", "{\n\t\t\t\tInteger num = dq.pop()*dq.pop();\n\t\t\t\tdq.push(num);\n\t\t\t}", "Integer num = dq.pop()*dq.pop();", "num", "dq.pop()*dq.pop()", "dq.pop()", "dq.pop", "dq", "dq.pop()", "dq.pop", "dq", "dq.push(num)", "dq.push", "dq", "num", "{\n\t\t\t\tdq.push(Integer.parseInt(str[i]));\n\n\t\t\t}", "dq.push(Integer.parseInt(str[i]))", "dq.push", "dq", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "System.out.println(dq.pop())", "System.out.println", "System.out", "System", "System.out", "dq.pop()", "dq.pop", "dq", "String[] args", "args" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] str = br.readLine().split(" "); Deque<Integer> dq = new ArrayDeque<>(); for(int i=0; i<str.length; i++){ if(str[i].equals("+")){ Integer num = dq.pop()+dq.pop(); dq.push(num); }else if (str[i].equals("-")) { Integer num = dq.pop(); dq.push(dq.pop()-num); }else if (str[i].equals("*")) { Integer num = dq.pop()*dq.pop(); dq.push(num); }else { dq.push(Integer.parseInt(str[i])); } } System.out.println(dq.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 38, 5, 13, 30, 29, 17, 30, 4, 18, 13, 13, 29, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 28, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 40, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 59, 61 ], [ 40, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 62, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 81, 83 ], [ 62, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 84, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 89, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 89, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 11, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 111, 112 ], [ 112, 113 ], [ 9, 114 ], [ 114, 115 ], [ 7, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 119, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 125, 130 ], [ 130, 131 ], [ 116, 132 ], [ 132, 133 ] ]
[ "import java.io.*;\nimport java.util.*;\n\nclass Main{\n public static void main(String[] args)throws java.lang.NumberFormatException{\n Scanner scan=new Scanner(System.in);\n Deque<Integer> stack=new ArrayDeque<>();\n\n while(scan.hasNext()){\n String op=scan.next();\n if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }\n }\n\n System.out.println(stack.removeFirst());\n }\n static boolean isNum(String s){\n try{\n Integer.parseInt(s);\n return true;\n }catch(NumberFormatException e){\n return false;\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args)throws java.lang.NumberFormatException{\n Scanner scan=new Scanner(System.in);\n Deque<Integer> stack=new ArrayDeque<>();\n\n while(scan.hasNext()){\n String op=scan.next();\n if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }\n }\n\n System.out.println(stack.removeFirst());\n }\n static boolean isNum(String s){\n try{\n Integer.parseInt(s);\n return true;\n }catch(NumberFormatException e){\n return false;\n }\n }\n}", "Main", "public static void main(String[] args)throws java.lang.NumberFormatException{\n Scanner scan=new Scanner(System.in);\n Deque<Integer> stack=new ArrayDeque<>();\n\n while(scan.hasNext()){\n String op=scan.next();\n if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }\n }\n\n System.out.println(stack.removeFirst());\n }", "main", "{\n Scanner scan=new Scanner(System.in);\n Deque<Integer> stack=new ArrayDeque<>();\n\n while(scan.hasNext()){\n String op=scan.next();\n if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }\n }\n\n System.out.println(stack.removeFirst());\n }", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "Deque<Integer> stack=new ArrayDeque<>();", "stack", "new ArrayDeque<>()", "while(scan.hasNext()){\n String op=scan.next();\n if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }\n }", "scan.hasNext()", "scan.hasNext", "scan", "{\n String op=scan.next();\n if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }\n }", "String op=scan.next();", "op", "scan.next()", "scan.next", "scan", "if(isNum(op)){\n stack.addFirst(Integer.parseInt(op));\n }else if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }", "isNum(op)", "isNum", "op", "{\n stack.addFirst(Integer.parseInt(op));\n }", "stack.addFirst(Integer.parseInt(op))", "stack.addFirst", "stack", "Integer.parseInt(op)", "Integer.parseInt", "Integer", "op", "if(op.equals(\"+\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }else if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }", "op.equals(\"+\")", "op.equals", "op", "\"+\"", "{\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y+x);\n }", "int x=stack.removeFirst();", "x", "stack.removeFirst()", "stack.removeFirst", "stack", "int y=stack.removeFirst();", "y", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst(y+x)", "stack.addFirst", "stack", "y+x", "y", "x", "if(op.equals(\"-\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }else if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }", "op.equals(\"-\")", "op.equals", "op", "\"-\"", "{\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y-x);\n }", "int x=stack.removeFirst();", "x", "stack.removeFirst()", "stack.removeFirst", "stack", "int y=stack.removeFirst();", "y", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst(y-x)", "stack.addFirst", "stack", "y-x", "y", "x", "if(op.equals(\"*\")){\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }", "op.equals(\"*\")", "op.equals", "op", "\"*\"", "{\n int x=stack.removeFirst();\n int y=stack.removeFirst();\n stack.addFirst(y*x);\n }", "int x=stack.removeFirst();", "x", "stack.removeFirst()", "stack.removeFirst", "stack", "int y=stack.removeFirst();", "y", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst(y*x)", "stack.addFirst", "stack", "y*x", "y", "x", "System.out.println(stack.removeFirst())", "System.out.println", "System.out", "System", "System.out", "stack.removeFirst()", "stack.removeFirst", "stack", "String[] args", "args", "static boolean isNum(String s){\n try{\n Integer.parseInt(s);\n return true;\n }catch(NumberFormatException e){\n return false;\n }\n }", "isNum", "{\n try{\n Integer.parseInt(s);\n return true;\n }catch(NumberFormatException e){\n return false;\n }\n }", "try{\n Integer.parseInt(s);\n return true;\n }catch(NumberFormatException e){\n return false;\n }", "catch(NumberFormatException e){\n return false;\n }", "NumberFormatException e", "{\n return false;\n }", "return false;", "false", "{\n Integer.parseInt(s);\n return true;\n }", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "return true;", "true", "String s", "s" ]
import java.io.*; import java.util.*; class Main{ public static void main(String[] args)throws java.lang.NumberFormatException{ Scanner scan=new Scanner(System.in); Deque<Integer> stack=new ArrayDeque<>(); while(scan.hasNext()){ String op=scan.next(); if(isNum(op)){ stack.addFirst(Integer.parseInt(op)); }else if(op.equals("+")){ int x=stack.removeFirst(); int y=stack.removeFirst(); stack.addFirst(y+x); }else if(op.equals("-")){ int x=stack.removeFirst(); int y=stack.removeFirst(); stack.addFirst(y-x); }else if(op.equals("*")){ int x=stack.removeFirst(); int y=stack.removeFirst(); stack.addFirst(y*x); } } System.out.println(stack.removeFirst()); } static boolean isNum(String s){ try{ Integer.parseInt(s); return true; }catch(NumberFormatException e){ return false; } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 20, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 29, 34 ], [ 20, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 51, 56 ], [ 50, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 57, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 71, 73 ], [ 50, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 74, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 74, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 98, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 105, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 105, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 119, 121 ], [ 98, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 129, 131 ], [ 20, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 132, 137 ], [ 137, 138 ], [ 138, 139 ], [ 18, 140 ], [ 140, 141 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final Deque<Integer> st = new ArrayDeque<Integer>(128);\n final String[] in = br.readLine().split(\" \");\n for(int i = 0; i<in.length; i++){\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }\n System.out.println(st.peek());\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "class Main{\n public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final Deque<Integer> st = new ArrayDeque<Integer>(128);\n final String[] in = br.readLine().split(\" \");\n for(int i = 0; i<in.length; i++){\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }\n System.out.println(st.peek());\n }\n}", "Main", "public static void main(String[] args) throws IOException{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final Deque<Integer> st = new ArrayDeque<Integer>(128);\n final String[] in = br.readLine().split(\" \");\n for(int i = 0; i<in.length; i++){\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }\n System.out.println(st.peek());\n }", "main", "{\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final Deque<Integer> st = new ArrayDeque<Integer>(128);\n final String[] in = br.readLine().split(\" \");\n for(int i = 0; i<in.length; i++){\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }\n System.out.println(st.peek());\n }", "final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "final Deque<Integer> st = new ArrayDeque<Integer>(128);", "st", "new ArrayDeque<Integer>(128)", "final String[] in = br.readLine().split(\" \");", "in", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "for(int i = 0; i<in.length; i++){\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i<in.length", "i", "in.length", "in", "in.length", "i++", "i++", "i", "{\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }", "{\n if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }\n }", "if(in[i].equals(\"+\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }else if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }", "in[i].equals(\"+\")", "in[i].equals", "in[i]", "in", "i", "\"+\"", "{\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a+b);\n }", "final int b = st.poll();", "b", "st.poll()", "st.poll", "st", "final int a = st.poll();", "a", "st.poll()", "st.poll", "st", "st.addFirst(a+b)", "st.addFirst", "st", "a+b", "a", "b", "if(in[i].equals(\"-\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }else if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }", "in[i].equals(\"-\")", "in[i].equals", "in[i]", "in", "i", "\"-\"", "{\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a-b);\n }", "final int b = st.poll();", "b", "st.poll()", "st.poll", "st", "final int a = st.poll();", "a", "st.poll()", "st.poll", "st", "st.addFirst(a-b)", "st.addFirst", "st", "a-b", "a", "b", "if(in[i].equals(\"*\")){\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }else{\n st.addFirst(Integer.valueOf(in[i]));\n }", "in[i].equals(\"*\")", "in[i].equals", "in[i]", "in", "i", "\"*\"", "{\n final int b = st.poll();\n final int a = st.poll();\n st.addFirst(a*b);\n }", "final int b = st.poll();", "b", "st.poll()", "st.poll", "st", "final int a = st.poll();", "a", "st.poll()", "st.poll", "st", "st.addFirst(a*b)", "st.addFirst", "st", "a*b", "a", "b", "{\n st.addFirst(Integer.valueOf(in[i]));\n }", "st.addFirst(Integer.valueOf(in[i]))", "st.addFirst", "st", "Integer.valueOf(in[i])", "Integer.valueOf", "Integer", "in[i]", "in", "i", "System.out.println(st.peek())", "System.out.println", "System.out", "System", "System.out", "st.peek()", "st.peek", "st", "String[] args", "args" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; class Main{ public static void main(String[] args) throws IOException{ final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); final Deque<Integer> st = new ArrayDeque<Integer>(128); final String[] in = br.readLine().split(" "); for(int i = 0; i<in.length; i++){ if(in[i].equals("+")){ final int b = st.poll(); final int a = st.poll(); st.addFirst(a+b); }else if(in[i].equals("-")){ final int b = st.poll(); final int a = st.poll(); st.addFirst(a-b); }else if(in[i].equals("*")){ final int b = st.poll(); final int a = st.poll(); st.addFirst(a*b); }else{ st.addFirst(Integer.valueOf(in[i])); } } System.out.println(st.peek()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 4, 18, 13, 13, 17, 30, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 2, 4, 18, 13, 13, 17, 2, 4, 18, 13, 13, 17, 2, 4, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 4, 18, 13, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 13, 13, 14, 2, 4, 18, 13, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 13, 13, 14, 2, 4, 18, 13, 13, 17, 30, 0, 13, 2, 13, 13, 4, 18, 13, 13, 30, 0, 13, 2, 13, 13, 4, 18, 13, 13, 30, 41, 13, 17, 11, 1, 41, 13, 13, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 4, 18, 13, 4, 18, 13, 13, 30, 0, 13, 2, 13, 4, 18, 13, 4, 18, 13, 13, 30, 0, 13, 13, 0, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 212, 8 ], [ 212, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 23, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 39, 44 ], [ 38, 45 ], [ 38, 46 ], [ 46, 47 ], [ 49, 48 ], [ 62, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 50, 55 ], [ 49, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 56, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 62, 67 ], [ 49, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 68, 73 ], [ 46, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 74, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 87, 90 ], [ 86, 91 ], [ 85, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 85, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 103, 108 ], [ 102, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 109, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 102, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 120, 125 ], [ 119, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 129, 131 ], [ 126, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 119, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 139, 141 ], [ 136, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 46, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 150, 155 ], [ 155, 156 ], [ 155, 157 ], [ 157, 158 ], [ 158, 159 ], [ 150, 160 ], [ 160, 161 ], [ 161, 162 ], [ 150, 163 ], [ 164, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 169, 170 ], [ 170, 171 ], [ 169, 172 ], [ 165, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 181, 182 ], [ 182, 183 ], [ 181, 184 ], [ 165, 185 ], [ 185, 186 ], [ 186, 187 ], [ 186, 188 ], [ 185, 189 ], [ 189, 190 ], [ 189, 191 ], [ 191, 192 ], [ 192, 193 ], [ 146, 194 ], [ 194, 195 ], [ 195, 196 ], [ 194, 197 ], [ 197, 198 ], [ 198, 199 ], [ 197, 200 ], [ 11, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 201, 206 ], [ 206, 207 ], [ 207, 208 ], [ 9, 209 ], [ 209, 210 ], [ 0, 211 ], [ 211, 212 ], [ 211, 213 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Stack<Integer> calc = new Stack<>();\n String n = scan.nextLine();\n for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }\n System.out.println(calc.pop());\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Stack<Integer> calc = new Stack<>();\n String n = scan.nextLine();\n for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }\n System.out.println(calc.pop());\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Stack<Integer> calc = new Stack<>();\n String n = scan.nextLine();\n for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }\n System.out.println(calc.pop());\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n Stack<Integer> calc = new Stack<>();\n String n = scan.nextLine();\n for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }\n System.out.println(calc.pop());\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "Stack<Integer> calc = new Stack<>();", "calc", "new Stack<>()", "String n = scan.nextLine();", "n", "scan.nextLine()", "scan.nextLine", "scan", "for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }", "int r = 0;", "int r = 0;", "r", "0", "r < n.length()", "r", "n.length()", "n.length", "n", "r++", "r++", "r", "{\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }", "{\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }", "if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }", "n.charAt(r) == ' '", "n.charAt(r)", "n.charAt", "n", "r", "' '", "{\n }", "if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }", "n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'", "n.charAt(r)== '*'", "n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'", "n.charAt(r) == '+'", "n.charAt(r)", "n.charAt", "n", "r", "'+'", "n.charAt(r)== '-'", "n.charAt(r)", "n.charAt", "n", "r", "'-'", "n.charAt(r)== '*'", "n.charAt(r)", "n.charAt", "n", "r", "'*'", "n.charAt(r)== '/'", "n.charAt(r)", "n.charAt", "n", "r", "'/'", "{\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }", "int y = calc.pop();", "y", "calc.pop()", "calc.pop", "calc", "int x = calc.pop();", "x", "calc.pop()", "calc.pop", "calc", "if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }", "n.charAt(r)== '+'", "n.charAt(r)", "n.charAt", "n", "r", "'+'", "{\n x = x + y;\n calc.push(x);\n }", "x = x + y", "x", "x + y", "x", "y", "calc.push(x)", "calc.push", "calc", "x", "if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }", "n.charAt(r)== '-'", "n.charAt(r)", "n.charAt", "n", "r", "'-'", "{\n x = x - y;\n calc.push(x);\n }", "x = x - y", "x", "x - y", "x", "y", "calc.push(x)", "calc.push", "calc", "x", "if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }", "n.charAt(r)== '*'", "n.charAt(r)", "n.charAt", "n", "r", "'*'", "{\n x = x * y;\n calc.push(x);\n }", "x = x * y", "x", "x * y", "x", "y", "calc.push(x)", "calc.push", "calc", "x", "{\n x = x/y;\n calc.push(x);\n }", "x = x/y", "x", "x/y", "x", "y", "calc.push(x)", "calc.push", "calc", "x", "{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }", "String num = \"\";", "num", "\"\"", "for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }", "int p = r;", "int p = r;", "p", "r", "p < n.length()", "p", "n.length()", "n.length", "n", "p++", "p++", "p", "{\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }", "{\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }", "if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }", "Character.isDigit(n.charAt(p))", "Character.isDigit", "Character", "n.charAt(p)", "n.charAt", "n", "p", "{\n num = num + Character.toString(n.charAt(p));\n }", "num = num + Character.toString(n.charAt(p))", "num", "num + Character.toString(n.charAt(p))", "num", "Character.toString(n.charAt(p))", "Character.toString", "Character", "n.charAt(p)", "n.charAt", "n", "p", "{\n r = p;\n p = n.length();\n }", "r = p", "r", "p", "p = n.length()", "p", "n.length()", "n.length", "n", "calc.push(Integer.parseInt(num))", "calc.push", "calc", "Integer.parseInt(num)", "Integer.parseInt", "Integer", "num", "System.out.println(calc.pop())", "System.out.println", "System.out", "System", "System.out", "calc.pop()", "calc.pop", "calc", "String[] args", "args", "public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Stack<Integer> calc = new Stack<>();\n String n = scan.nextLine();\n for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }\n System.out.println(calc.pop());\n }\n}", "public class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n Stack<Integer> calc = new Stack<>();\n String n = scan.nextLine();\n for(int r = 0; r < n.length(); r++){\n if(n.charAt(r) == ' '){\n }\n else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){\n int y = calc.pop();\n int x = calc.pop();\n if(n.charAt(r)== '+'){\n x = x + y;\n calc.push(x);\n }\n else if(n.charAt(r)== '-'){\n x = x - y;\n calc.push(x);\n }\n else if(n.charAt(r)== '*'){\n x = x * y;\n calc.push(x);\n }\n else{\n x = x/y;\n calc.push(x);\n }\n }\n else{\n String num = \"\";\n for(int p = r; p < n.length(); p++) {\n if(Character.isDigit(n.charAt(p))){\n num = num + Character.toString(n.charAt(p));\n }\n else{\n r = p;\n p = n.length();\n }\n }\n calc.push(Integer.parseInt(num));\n }\n }\n System.out.println(calc.pop());\n }\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); Stack<Integer> calc = new Stack<>(); String n = scan.nextLine(); for(int r = 0; r < n.length(); r++){ if(n.charAt(r) == ' '){ } else if(n.charAt(r) == '+' || n.charAt(r)== '-' || n.charAt(r)== '*' || n.charAt(r)== '/'){ int y = calc.pop(); int x = calc.pop(); if(n.charAt(r)== '+'){ x = x + y; calc.push(x); } else if(n.charAt(r)== '-'){ x = x - y; calc.push(x); } else if(n.charAt(r)== '*'){ x = x * y; calc.push(x); } else{ x = x/y; calc.push(x); } } else{ String num = ""; for(int p = r; p < n.length(); p++) { if(Character.isDigit(n.charAt(p))){ num = num + Character.toString(n.charAt(p)); } else{ r = p; p = n.length(); } } calc.push(Integer.parseInt(num)); } } System.out.println(calc.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 41, 13, 4, 18, 13, 18, 13, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 17, 0, 13, 17, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 29, 18, 13, 40, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 169, 5 ], [ 169, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 14, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 23, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 38, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 59, 61 ], [ 38, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 62, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 69, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 69, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 62, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 86, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 93, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 86, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 116, 118 ], [ 110, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 8, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 129, 130 ], [ 6, 131 ], [ 131, 132 ], [ 169, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 133, 137 ], [ 137, 138 ], [ 133, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 146 ], [ 146, 147 ], [ 146, 148 ], [ 133, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 152, 157 ], [ 149, 158 ], [ 158, 159 ], [ 133, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 0, 168 ], [ 168, 169 ], [ 168, 170 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String[] s = sc.nextLine().split(\" \");\n Stack stack = new Stack();\n\n for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }\n\n System.out.println(stack.pop());\n }\n\n static class Stack {\n int[] S;\n int index;\n\n Stack() {\n S = new int[1000];\n index = 0;\n }\n\n void push(int x) {\n S[index++] = x;\n }\n\n int pop() {\n return S[--index];\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String[] s = sc.nextLine().split(\" \");\n Stack stack = new Stack();\n\n for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }\n\n System.out.println(stack.pop());\n }\n\n static class Stack {\n int[] S;\n int index;\n\n Stack() {\n S = new int[1000];\n index = 0;\n }\n\n void push(int x) {\n S[index++] = x;\n }\n\n int pop() {\n return S[--index];\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String[] s = sc.nextLine().split(\" \");\n Stack stack = new Stack();\n\n for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }\n\n System.out.println(stack.pop());\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n String[] s = sc.nextLine().split(\" \");\n Stack stack = new Stack();\n\n for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }\n\n System.out.println(stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String[] s = sc.nextLine().split(\" \");", "s", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "Stack stack = new Stack();", "stack", "new Stack()", "for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < s.length", "i", "s.length", "s", "s.length", "i++", "i++", "i", "{\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }", "{\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }", "if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }", "s[i].equals(\"+\")", "s[i].equals", "s[i]", "s", "i", "\"+\"", "{\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n }", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "stack.push(a + b)", "stack.push", "stack", "a + b", "a", "b", "if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }", "s[i].equals(\"-\")", "s[i].equals", "s[i]", "s", "i", "\"-\"", "{\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n }", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "stack.push(b - a)", "stack.push", "stack", "b - a", "b", "a", "if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }", "s[i].equals(\"*\")", "s[i].equals", "s[i]", "s", "i", "\"*\"", "{\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n }", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "stack.push(b * a)", "stack.push", "stack", "b * a", "b", "a", "{\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }", "int a = Integer.parseInt(s[i]);", "a", "Integer.parseInt(s[i])", "Integer.parseInt", "Integer", "s[i]", "s", "i", "stack.push(a)", "stack.push", "stack", "a", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "static class Stack {\n int[] S;\n int index;\n\n Stack() {\n S = new int[1000];\n index = 0;\n }\n\n void push(int x) {\n S[index++] = x;\n }\n\n int pop() {\n return S[--index];\n }\n }", "Stack", "int[] S;", "S", "int index;", "index", "Stack() {\n S = new int[1000];\n index = 0;\n }", "Stack", "{\n S = new int[1000];\n index = 0;\n }", "S = new int[1000]", "S", "new int[1000]", "1000", "index = 0", "index", "0", "void push(int x) {\n S[index++] = x;\n }", "push", "{\n S[index++] = x;\n }", "S[index++] = x", "S[index++]", "S", "index++", "index", "x", "int x", "x", "int pop() {\n return S[--index];\n }", "pop", "{\n return S[--index];\n }", "return S[--index];", "S[--index]", "S", "--index", "index", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String[] s = sc.nextLine().split(\" \");\n Stack stack = new Stack();\n\n for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }\n\n System.out.println(stack.pop());\n }\n\n static class Stack {\n int[] S;\n int index;\n\n Stack() {\n S = new int[1000];\n index = 0;\n }\n\n void push(int x) {\n S[index++] = x;\n }\n\n int pop() {\n return S[--index];\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String[] s = sc.nextLine().split(\" \");\n Stack stack = new Stack();\n\n for (int i = 0; i < s.length; i++) {\n if (s[i].equals(\"+\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(a + b);\n } else if (s[i].equals(\"-\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b - a);\n } else if (s[i].equals(\"*\")) {\n int a = stack.pop();\n int b = stack.pop();\n stack.push(b * a);\n } else {\n int a = Integer.parseInt(s[i]);\n stack.push(a);\n }\n }\n\n System.out.println(stack.pop());\n }\n\n static class Stack {\n int[] S;\n int index;\n\n Stack() {\n S = new int[1000];\n index = 0;\n }\n\n void push(int x) {\n S[index++] = x;\n }\n\n int pop() {\n return S[--index];\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] s = sc.nextLine().split(" "); Stack stack = new Stack(); for (int i = 0; i < s.length; i++) { if (s[i].equals("+")) { int a = stack.pop(); int b = stack.pop(); stack.push(a + b); } else if (s[i].equals("-")) { int a = stack.pop(); int b = stack.pop(); stack.push(b - a); } else if (s[i].equals("*")) { int a = stack.pop(); int b = stack.pop(); stack.push(b * a); } else { int a = Integer.parseInt(s[i]); stack.push(a); } } System.out.println(stack.pop()); } static class Stack { int[] S; int index; Stack() { S = new int[1000]; index = 0; } void push(int x) { S[index++] = x; } int pop() { return S[--index]; } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 4, 13, 2, 4, 13, 4, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 13, 2, 4, 13, 4, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 13, 2, 40, 4, 13, 4, 13, 30, 4, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 2, 13, 17, 12, 13, 30, 40, 13, 0, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 130, 5 ], [ 130, 6 ], [ 6, 7 ], [ 6, 8 ], [ 130, 10 ], [ 10, 11 ], [ 10, 12 ], [ 130, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 21, 26 ], [ 15, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 27, 37 ], [ 37, 38 ], [ 38, 39 ], [ 27, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 42, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 42, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 57, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 57, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 72, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 82, 86 ], [ 86, 87 ], [ 72, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 15, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 13, 104 ], [ 104, 105 ], [ 130, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 130, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 117, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tstatic int stack[] = new int[1000];\n\tstatic int counta = 0;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString input[] = (scanner.nextLine()).split(\" \");\n\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\n\tpublic static int pop() {\n\t\tcounta--;\n\t\treturn stack[counta + 1];\n\t}\n\n\tpublic static void push(int i) {\n\t\tcounta++;\n\t\tstack[counta] = i;\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tstatic int stack[] = new int[1000];\n\tstatic int counta = 0;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString input[] = (scanner.nextLine()).split(\" \");\n\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\n\tpublic static int pop() {\n\t\tcounta--;\n\t\treturn stack[counta + 1];\n\t}\n\n\tpublic static void push(int i) {\n\t\tcounta++;\n\t\tstack[counta] = i;\n\t}\n}", "Main", "static int stack[] = new int[1000];", "stack", "new int[1000]", "1000", "static int counta = 0;", "counta", "0", "public static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString input[] = (scanner.nextLine()).split(\" \");\n\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}", "main", "{\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString input[] = (scanner.nextLine()).split(\" \");\n\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "String input[] = (scanner.nextLine()).split(\" \");", "input", "(scanner.nextLine()).split(\" \")", "(scanner.nextLine()).split", "(scanner.nextLine())", "scanner.nextLine", "scanner", "\" \"", "for (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < input.length", "i", "input.length", "input", "input.length", "i++", "i++", "i", "{\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}", "{\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}", "if (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}", "input[i].equals(\"*\")", "input[i].equals", "input[i]", "input", "i", "\"*\"", "{\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t}", "push(pop() * pop())", "push", "pop() * pop()", "pop()", "pop", "pop()", "pop", "if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}", "input[i].equals(\"+\")", "input[i].equals", "input[i]", "input", "i", "\"+\"", "{\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t}", "push(pop() + pop())", "push", "pop() + pop()", "pop()", "pop", "pop()", "pop", "if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}", "input[i].equals(\"-\")", "input[i].equals", "input[i]", "input", "i", "\"-\"", "{\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t}", "push(-pop() + pop())", "push", "-pop() + pop()", "-pop()", "pop()", "pop", "pop()", "pop", "{\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}", "push(Integer.parseInt(input[i]))", "push", "Integer.parseInt(input[i])", "Integer.parseInt", "Integer", "input[i]", "input", "i", "System.out.println(pop())", "System.out.println", "System.out", "System", "System.out", "pop()", "pop", "String[] args", "args", "public static int pop() {\n\t\tcounta--;\n\t\treturn stack[counta + 1];\n\t}", "pop", "{\n\t\tcounta--;\n\t\treturn stack[counta + 1];\n\t}", "counta--", "counta", "return stack[counta + 1];", "stack[counta + 1]", "stack", "counta + 1", "counta", "1", "public static void push(int i) {\n\t\tcounta++;\n\t\tstack[counta] = i;\n\t}", "push", "{\n\t\tcounta++;\n\t\tstack[counta] = i;\n\t}", "counta++", "counta", "stack[counta] = i", "stack[counta]", "stack", "counta", "i", "int i", "i", "public class Main {\n\tstatic int stack[] = new int[1000];\n\tstatic int counta = 0;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString input[] = (scanner.nextLine()).split(\" \");\n\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\n\tpublic static int pop() {\n\t\tcounta--;\n\t\treturn stack[counta + 1];\n\t}\n\n\tpublic static void push(int i) {\n\t\tcounta++;\n\t\tstack[counta] = i;\n\t}\n}", "public class Main {\n\tstatic int stack[] = new int[1000];\n\tstatic int counta = 0;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tString input[] = (scanner.nextLine()).split(\" \");\n\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i].equals(\"*\")) {\n\t\t\t\tpush(pop() * pop());\n\n\t\t\t} else if (input[i].equals(\"+\")) {\n\t\t\t\tpush(pop() + pop());\n\n\t\t\t} else if (input[i].equals(\"-\")) {\n\t\t\t\tpush(-pop() + pop());\n\n\t\t\t} else {\n\t\t\t\tpush(Integer.parseInt(input[i]));\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\t}\n\n\tpublic static int pop() {\n\t\tcounta--;\n\t\treturn stack[counta + 1];\n\t}\n\n\tpublic static void push(int i) {\n\t\tcounta++;\n\t\tstack[counta] = i;\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { static int stack[] = new int[1000]; static int counta = 0; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String input[] = (scanner.nextLine()).split(" "); for (int i = 0; i < input.length; i++) { if (input[i].equals("*")) { push(pop() * pop()); } else if (input[i].equals("+")) { push(pop() + pop()); } else if (input[i].equals("-")) { push(-pop() + pop()); } else { push(Integer.parseInt(input[i])); } } System.out.println(pop()); } public static int pop() { counta--; return stack[counta + 1]; } public static void push(int i) { counta++; stack[counta] = i; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 20, 14, 2, 18, 13, 13, 17, 30, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 4, 18, 18, 13, 13, 17, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 14, 4, 18, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 4, 18, 18, 13, 13, 17, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 14, 4, 18, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 4, 18, 18, 13, 13, 4, 18, 18, 13, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 167, 5 ], [ 167, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 12, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 16, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 16, 28 ], [ 28, 29 ], [ 28, 30 ], [ 16, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 31, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 54, 61 ], [ 53, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 53, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 72, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 72, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 99, 106 ], [ 98, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 98, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 118, 125 ], [ 117, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 126, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 126, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 140, 141 ], [ 140, 142 ], [ 117, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 144, 147 ], [ 147, 148 ], [ 148, 149 ], [ 147, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 37, 155 ], [ 155, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 155, 160 ], [ 155, 161 ], [ 161, 162 ], [ 162, 163 ], [ 6, 164 ], [ 164, 165 ], [ 0, 166 ], [ 166, 167 ], [ 166, 168 ] ]
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}", "String str = sc.nextLine();", "str", "sc.nextLine()", "sc.nextLine", "sc", "String[] s = str.split(\" \");", "s", "str.split(\" \")", "str.split", "str", "\" \"", "Stack<Integer> stk = new Stack<Integer>();", "stk", "new Stack<Integer>()", "if(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}", "s.length > 2", "s.length", "s", "s.length", "2", "{\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}", "for(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<s.length", "i", "s.length", "s", "s.length", "i++", "i++", "i", "{\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}", "s[i].toString().equals(\"*\")", "s[i].toString().equals", "s[i].toString()", "s[i].toString", "s[i]", "s", "i", "\"*\"", "stk.push((stk.pop()*stk.pop()))", "stk.push", "stk", "(stk.pop()*stk.pop())", "stk.pop()", "stk.pop", "stk", "stk.pop()", "stk.pop", "stk", "if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}", "s[i].toString().equals(\"/\")", "s[i].toString().equals", "s[i].toString()", "s[i].toString", "s[i]", "s", "i", "\"/\"", "{\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}", "int a=stk.pop()", "a", "stk.pop()", "stk.pop", "stk", "b=stk.pop();", "b", "stk.pop()", "stk.pop", "stk", "stk.push(b/a)", "stk.push", "stk", "b/a", "b", "a", "if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}", "s[i].toString().equals(\"+\")", "s[i].toString().equals", "s[i].toString()", "s[i].toString", "s[i]", "s", "i", "\"+\"", "stk.push((stk.pop()+stk.pop()))", "stk.push", "stk", "(stk.pop()+stk.pop())", "stk.pop()", "stk.pop", "stk", "stk.pop()", "stk.pop", "stk", "if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}", "s[i].toString().equals(\"-\")", "s[i].toString().equals", "s[i].toString()", "s[i].toString", "s[i]", "s", "i", "\"-\"", "{\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}", "int a=stk.pop()", "a", "stk.pop()", "stk.pop", "stk", "b=stk.pop();", "b", "stk.pop()", "stk.pop", "stk", "stk.push(b-a)", "stk.push", "stk", "b-a", "b", "a", "{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}", "stk.push(Integer.valueOf(s[i].toString()))", "stk.push", "stk", "Integer.valueOf(s[i].toString())", "Integer.valueOf", "Integer", "s[i].toString()", "s[i].toString", "s[i]", "s", "i", "System.out.printf(\"%d\\r\\n\",stk.pop())", "System.out.printf", "System.out", "System", "System.out", "\"%d\\r\\n\"", "stk.pop()", "stk.pop", "stk", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString str = sc.nextLine();\n\t\t\t\tString[] s = str.split(\" \");\n\t\t\t\tStack<Integer> stk = new Stack<Integer>();\n\t\t\t\tif(s.length > 2){\n\t\t\t\t\tfor(int i=0;i<s.length;i++){\n\t\t\t\t\t\tif(s[i].toString().equals(\"*\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()*stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"/\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b/a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(s[i].toString().equals(\"+\"))\n\t\t\t\t\t\t\tstk.push((stk.pop()+stk.pop()));\n\t\t\t\t\t\telse if(s[i].toString().equals(\"-\")){\n\t\t\t\t\t\t\tint a=stk.pop(),b=stk.pop();\n\t\t\t\t\t\t\tstk.push(b-a);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tstk.push(Integer.valueOf(s[i].toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.printf(\"%d\\r\\n\",stk.pop());\n\t\t\t\t}\n\t\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String str = sc.nextLine(); String[] s = str.split(" "); Stack<Integer> stk = new Stack<Integer>(); if(s.length > 2){ for(int i=0;i<s.length;i++){ if(s[i].toString().equals("*")) stk.push((stk.pop()*stk.pop())); else if(s[i].toString().equals("/")){ int a=stk.pop(),b=stk.pop(); stk.push(b/a); } else if(s[i].toString().equals("+")) stk.push((stk.pop()+stk.pop())); else if(s[i].toString().equals("-")){ int a=stk.pop(),b=stk.pop(); stk.push(b-a); } else{ stk.push(Integer.valueOf(s[i].toString())); } } System.out.printf("%d\r\n",stk.pop()); } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 18, 13, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 14, 2, 13, 13, 30, 29, 17, 30, 0, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 30, 29, 17, 29, 17, 12, 13, 30, 14, 4, 13, 29, 18, 13, 40, 13, 29, 40, 17, 12, 13, 30, 29, 2, 2, 17, 13, 2, 13, 17, 23, 13, 12, 13, 30, 42, 2, 4, 13, 40, 4, 13, 18, 13, 13, 40, 13, 12, 13, 30, 4, 13, 29, 4, 13, 12, 13, 30, 14, 40, 4, 13, 37, 20, 41, 13, 20, 41, 13, 4, 13, 42, 4, 13, 13, 30, 4, 18, 13, 13, 0, 13, 4, 13, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 274, 14 ], [ 274, 15 ], [ 15, 16 ], [ 15, 17 ], [ 274, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 24, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 28, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 34, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 39, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 53, 55 ], [ 34, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 56, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 56, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 78, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 83, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 78, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 20, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 114, 115 ], [ 18, 116 ], [ 116, 117 ], [ 274, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 122, 124 ], [ 118, 125 ], [ 125, 126 ], [ 125, 127 ], [ 118, 129 ], [ 129, 130 ], [ 129, 131 ], [ 118, 132 ], [ 132, 133 ], [ 132, 134 ], [ 118, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 142, 143 ], [ 143, 144 ], [ 138, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 149, 156 ], [ 156, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 159, 162 ], [ 145, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 163, 167 ], [ 167, 168 ], [ 168, 169 ], [ 137, 170 ], [ 170, 171 ], [ 118, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 175, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 175, 183 ], [ 183, 184 ], [ 184, 185 ], [ 118, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 190, 194 ], [ 194, 195 ], [ 194, 196 ], [ 186, 197 ], [ 197, 198 ], [ 118, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 204, 205 ], [ 203, 206 ], [ 206, 207 ], [ 207, 208 ], [ 207, 209 ], [ 209, 210 ], [ 209, 211 ], [ 202, 212 ], [ 212, 213 ], [ 118, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 216, 219 ], [ 219, 220 ], [ 220, 221 ], [ 118, 222 ], [ 222, 223 ], [ 222, 224 ], [ 224, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 225, 229 ], [ 229, 230 ], [ 224, 231 ], [ 231, 232 ], [ 231, 233 ], [ 224, 234 ], [ 234, 235 ], [ 234, 236 ], [ 236, 237 ], [ 224, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 238, 242 ], [ 242, 243 ], [ 243, 244 ], [ 244, 245 ], [ 243, 246 ], [ 242, 247 ], [ 247, 248 ], [ 247, 249 ], [ 249, 250 ], [ 224, 251 ], [ 251, 252 ], [ 252, 253 ], [ 253, 254 ], [ 118, 255 ], [ 255, 256 ], [ 255, 257 ], [ 257, 258 ], [ 258, 259 ], [ 259, 260 ], [ 260, 261 ], [ 259, 262 ], [ 262, 263 ], [ 118, 264 ], [ 264, 265 ], [ 264, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 268, 271 ], [ 271, 272 ], [ 0, 273 ], [ 273, 274 ], [ 273, 275 ] ]
[ "import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.NoSuchElementException;\nimport java.util.Stack;\n\npublic class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(s.pop());\n\n\t}\n\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\t private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\t private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}\n\t public boolean hasNext() { skipUnprintable(); return hasNextByte();}\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\t public int nextInt(){\n\t \treturn Integer.parseInt(next());\n\t }\n\t}\n}", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.util.NoSuchElementException;", "NoSuchElementException", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(s.pop());\n\n\t}\n\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\t private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\t private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}\n\t public boolean hasNext() { skipUnprintable(); return hasNextByte();}\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\t public int nextInt(){\n\t \treturn Integer.parseInt(next());\n\t }\n\t}\n}", "Main", "private static FastScanner sc = new FastScanner();", "sc", "new FastScanner()", "public static void main(String[] args) {\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(s.pop());\n\n\t}", "main", "{\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(s.pop());\n\n\t}", "Stack<Integer> s = new Stack<Integer>();", "s", "new Stack<Integer>()", "while(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "if(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}", "str.equals(\"+\")", "str.equals", "str", "\"+\"", "{\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t}", "int b = s.pop();", "b", "s.pop()", "s.pop", "s", "int a = s.pop();", "a", "s.pop()", "s.pop", "s", "s.push(a+b)", "s.push", "s", "a+b", "a", "b", "if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}", "str.equals(\"-\")", "str.equals", "str", "\"-\"", "{\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t}", "int b = s.pop();", "b", "s.pop()", "s.pop", "s", "int a = s.pop();", "a", "s.pop()", "s.pop", "s", "s.push(a-b)", "s.push", "s", "a-b", "a", "b", "if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}", "str.equals(\"*\")", "str.equals", "str", "\"*\"", "{\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t}", "int b = s.pop();", "b", "s.pop()", "s.pop", "s", "int a = s.pop();", "a", "s.pop()", "s.pop", "s", "s.push(a*b)", "s.push", "s", "a*b", "a", "b", "{\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}", "s.push(Integer.parseInt(str))", "s.push", "s", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "System.out.println(s.pop())", "System.out.println", "System.out", "System", "System.out", "s.pop()", "s.pop", "s", "String[] args", "args", "static class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\t private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\t private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}\n\t public boolean hasNext() { skipUnprintable(); return hasNextByte();}\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\t public int nextInt(){\n\t \treturn Integer.parseInt(next());\n\t }\n\t}", "FastScanner", "private final InputStream in = System.in;", "in", "System.in", "System", "System.in", "private final byte[] buffer = new byte[1024];", "buffer", "new byte[1024]", "1024", "private int ptr = 0;", "ptr", "0", "private int buflen = 0;", "buflen", "0", "private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }", "hasNextByte", "{\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }", "if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }", "ptr < buflen", "ptr", "buflen", "{\n\t return true;\n\t }", "return true;", "true", "{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }", "ptr = 0", "ptr", "0", "try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }", "catch (IOException e) {\n\t e.printStackTrace();\n\t }", "IOException e", "{\n\t e.printStackTrace();\n\t }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t buflen = in.read(buffer);\n\t }", "buflen = in.read(buffer)", "buflen", "in.read(buffer)", "in.read", "in", "buffer", "if (buflen <= 0) {\n\t return false;\n\t }", "buflen <= 0", "buflen", "0", "{\n\t return false;\n\t }", "return false;", "false", "return true;", "true", "private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}", "readByte", "{ if (hasNextByte()) return buffer[ptr++]; else return -1;}", "if (hasNextByte()) return buffer[ptr++]; else return -1;", "hasNextByte()", "hasNextByte", "return buffer[ptr++];", "buffer[ptr++]", "buffer", "ptr++", "ptr", "return -1;", "-1", "1", "private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}", "isPrintableChar", "{ return 33 <= c && c <= 126;}", "return 33 <= c && c <= 126;", "33 <= c && c <= 126", "33 <= c", "33", "c", "c <= 126", "c", "126", "int c", "c", "private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}", "skipUnprintable", "{ while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}", "while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;", "hasNextByte() && !isPrintableChar(buffer[ptr])", "hasNextByte()", "hasNextByte", "!isPrintableChar(buffer[ptr])", "isPrintableChar(buffer[ptr])", "isPrintableChar", "buffer[ptr]", "buffer", "ptr", "ptr++", "ptr", "public boolean hasNext() { skipUnprintable(); return hasNextByte();}", "hasNext", "{ skipUnprintable(); return hasNextByte();}", "skipUnprintable()", "skipUnprintable", "return hasNextByte();", "hasNextByte()", "hasNextByte", "public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }", "next", "{\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }", "if (!hasNext()) throw new NoSuchElementException();", "!hasNext()", "hasNext()", "hasNext", "throw new NoSuchElementException();", "new NoSuchElementException()", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int b = readByte();", "b", "readByte()", "readByte", "while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }", "isPrintableChar(b)", "isPrintableChar", "b", "{\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }", "sb.appendCodePoint(b)", "sb.appendCodePoint", "sb", "b", "b = readByte()", "b", "readByte()", "readByte", "return sb.toString();", "sb.toString()", "sb.toString", "sb", "public long nextLong() {\n\t return Long.parseLong(next());\n\t }", "nextLong", "{\n\t return Long.parseLong(next());\n\t }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public int nextInt(){\n\t \treturn Integer.parseInt(next());\n\t }", "nextInt", "{\n\t \treturn Integer.parseInt(next());\n\t }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(s.pop());\n\n\t}\n\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\t private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\t private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}\n\t public boolean hasNext() { skipUnprintable(); return hasNextByte();}\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\t public int nextInt(){\n\t \treturn Integer.parseInt(next());\n\t }\n\t}\n}", "public class Main {\n\tprivate static FastScanner sc = new FastScanner();\n\n\tpublic static void main(String[] args) {\n\t\tStack<Integer> s = new Stack<Integer>();\n\t\t\n\t\twhile(sc.hasNext()) {\n\t\t\tString str = sc.next();\n\t\t\tif(str.equals(\"+\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a+b);\t\t\t\n\t\t\t} else if(str.equals(\"-\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a-b);\n\t\t\t} else if(str.equals(\"*\")) {\n\t\t\t\tint b = s.pop();\n\t\t\t\tint a = s.pop();\n\t\t\t\ts.push(a*b);\n\t\t\t} else {\n\t\t\t\ts.push(Integer.parseInt(str));\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(s.pop());\n\n\t}\n\n\tstatic class FastScanner {\n\t private final InputStream in = System.in;\n\t private final byte[] buffer = new byte[1024];\n\t private int ptr = 0;\n\t private int buflen = 0;\n\t private boolean hasNextByte() {\n\t if (ptr < buflen) {\n\t return true;\n\t }else{\n\t ptr = 0;\n\t try {\n\t buflen = in.read(buffer);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t if (buflen <= 0) {\n\t return false;\n\t }\n\t }\n\t return true;\n\t }\n\t private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\t private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\t private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}\n\t public boolean hasNext() { skipUnprintable(); return hasNextByte();}\n\t public String next() {\n\t if (!hasNext()) throw new NoSuchElementException();\n\t StringBuilder sb = new StringBuilder();\n\t int b = readByte();\n\t while(isPrintableChar(b)) {\n\t sb.appendCodePoint(b);\n\t b = readByte();\n\t }\n\t return sb.toString();\n\t }\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\t public int nextInt(){\n\t \treturn Integer.parseInt(next());\n\t }\n\t}\n}", "Main" ]
import java.io.IOException; import java.io.InputStream; import java.util.NoSuchElementException; import java.util.Stack; public class Main { private static FastScanner sc = new FastScanner(); public static void main(String[] args) { Stack<Integer> s = new Stack<Integer>(); while(sc.hasNext()) { String str = sc.next(); if(str.equals("+")) { int b = s.pop(); int a = s.pop(); s.push(a+b); } else if(str.equals("-")) { int b = s.pop(); int a = s.pop(); s.push(a-b); } else if(str.equals("*")) { int b = s.pop(); int a = s.pop(); s.push(a*b); } else { s.push(Integer.parseInt(str)); } } System.out.println(s.pop()); } static class FastScanner { private final InputStream in = System.in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; private boolean hasNextByte() { if (ptr < buflen) { return true; }else{ ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) { return false; } } return true; } private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;} private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;} private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;} public boolean hasNext() { skipUnprintable(); return hasNextByte();} public String next() { if (!hasNext()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int b = readByte(); while(isPrintableChar(b)) { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public long nextLong() { return Long.parseLong(next()); } public int nextInt(){ return Integer.parseInt(next()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 17, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 41, 13, 18, 13, 40, 13, 41, 13, 18, 13, 40, 13, 0, 18, 13, 40, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 18, 13, 40, 13, 41, 13, 18, 13, 40, 13, 0, 18, 13, 40, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 18, 13, 40, 13, 41, 13, 18, 13, 40, 13, 0, 18, 13, 40, 13, 2, 13, 13, 30, 0, 18, 13, 40, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 141, 5 ], [ 141, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 19, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 23, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 29, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 34, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 34, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 29, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 55, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 60, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 60, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 73, 78 ], [ 78, 79 ], [ 78, 80 ], [ 55, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 81, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 86, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 86, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 81, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 108, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 8, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 122, 123 ], [ 122, 124 ], [ 117, 125 ], [ 125, 126 ], [ 126, 127 ], [ 117, 128 ], [ 129, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 6, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ] ]
[ "import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] stack = new int[100];\n\t\tint sp = 0;\n\t\twhile(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] stack = new int[100];\n\t\tint sp = 0;\n\t\twhile(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] stack = new int[100];\n\t\tint sp = 0;\n\t\twhile(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] stack = new int[100];\n\t\tint sp = 0;\n\t\twhile(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int[] stack = new int[100];", "stack", "new int[100]", "100", "int sp = 0;", "sp", "0", "while(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}", "scan.hasNext()", "scan.hasNext", "scan", "{\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}", "String str = scan.next();", "str", "scan.next()", "scan.next", "scan", "if(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}", "str.equals(\"+\")", "str.equals", "str", "\"+\"", "{\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}", "int a = stack[--sp];", "a", "stack[--sp]", "stack", "--sp", "sp", "int b = stack[--sp];", "b", "stack[--sp]", "stack", "--sp", "sp", "stack[sp++] = a + b", "stack[sp++]", "stack", "sp++", "sp", "a + b", "a", "b", "if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}", "str.equals(\"-\")", "str.equals", "str", "\"-\"", "{\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}", "int a = stack[--sp];", "a", "stack[--sp]", "stack", "--sp", "sp", "int b = stack[--sp];", "b", "stack[--sp]", "stack", "--sp", "sp", "stack[sp++] = b - a", "stack[sp++]", "stack", "sp++", "sp", "b - a", "b", "a", "if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}", "str.equals(\"*\")", "str.equals", "str", "\"*\"", "{\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}", "int a = stack[--sp];", "a", "stack[--sp]", "stack", "--sp", "sp", "int b = stack[--sp];", "b", "stack[--sp]", "stack", "--sp", "sp", "stack[sp++] = a * b", "stack[sp++]", "stack", "sp++", "sp", "a * b", "a", "b", "{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}", "stack[sp++] = Integer.parseInt(str)", "stack[sp++]", "stack", "sp++", "sp", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "for(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < sp", "i", "sp", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(stack[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(stack[i]);\n\t\t}", "System.out.println(stack[i])", "System.out.println", "System.out", "System", "System.out", "stack[i]", "stack", "i", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] stack = new int[100];\n\t\tint sp = 0;\n\t\twhile(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] stack = new int[100];\n\t\tint sp = 0;\n\t\twhile(scan.hasNext()){\n\t\t\tString str = scan.next();\n\t\t\tif(str.equals(\"+\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a + b;\n\t\t\t}else if(str.equals(\"-\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = b - a;\n\t\t\t}else if(str.equals(\"*\")){\n\t\t\t\tint a = stack[--sp];\n\t\t\t\tint b = stack[--sp];\n\t\t\t\tstack[sp++] = a * b;\n\t\t\t}else{\n\t\t\t\tstack[sp++] = Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0;i < sp;i++){\n\t\t\tSystem.out.println(stack[i]);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int[] stack = new int[100]; int sp = 0; while(scan.hasNext()){ String str = scan.next(); if(str.equals("+")){ int a = stack[--sp]; int b = stack[--sp]; stack[sp++] = a + b; }else if(str.equals("-")){ int a = stack[--sp]; int b = stack[--sp]; stack[sp++] = b - a; }else if(str.equals("*")){ int a = stack[--sp]; int b = stack[--sp]; stack[sp++] = a * b; }else{ stack[sp++] = Integer.parseInt(str); } } for(int i = 0;i < sp;i++){ System.out.println(stack[i]); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 18, 13, 13, 30, 4, 18, 13, 18, 13, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 13, 29, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 189, 26 ], [ 189, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 35, 40 ], [ 29, 41 ], [ 41, 42 ], [ 41, 43 ], [ 29, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 44, 54 ], [ 54, 55 ], [ 55, 56 ], [ 44, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 59, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 59, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 79, 80 ], [ 72, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 83, 86 ], [ 86, 87 ], [ 87, 88 ], [ 72, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 89, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 106, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 120, 122 ], [ 106, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 124, 129 ], [ 123, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 137, 139 ], [ 123, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 140, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 154, 155 ], [ 154, 156 ], [ 29, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 157, 162 ], [ 162, 163 ], [ 163, 164 ], [ 27, 165 ], [ 165, 166 ], [ 189, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 172, 175 ], [ 169, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 178, 181 ], [ 169, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 167, 186 ], [ 186, 187 ], [ 0, 188 ], [ 188, 189 ], [ 188, 190 ] ]
[ "import java.io.*;\nimport java.util.*;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] line = br.readLine().split(\" \");\n Stack<String> stack = new Stack<String>();\n\n for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }\n\n System.out.println(stack.pop());\n }\n\n public static boolean isNumber(String term) {\n Pattern patternNum = Pattern.compile(\"-*[0-9]+\");\n Matcher matcherNum = patternNum.matcher(term);\n\n return matcherNum.matches();\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "import java.util.regex.Matcher;", "Matcher", "java.util.regex", "import java.util.regex.Pattern;", "Pattern", "java.util.regex", "public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] line = br.readLine().split(\" \");\n Stack<String> stack = new Stack<String>();\n\n for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }\n\n System.out.println(stack.pop());\n }\n\n public static boolean isNumber(String term) {\n Pattern patternNum = Pattern.compile(\"-*[0-9]+\");\n Matcher matcherNum = patternNum.matcher(term);\n\n return matcherNum.matches();\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] line = br.readLine().split(\" \");\n Stack<String> stack = new Stack<String>();\n\n for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }\n\n System.out.println(stack.pop());\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] line = br.readLine().split(\" \");\n Stack<String> stack = new Stack<String>();\n\n for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }\n\n System.out.println(stack.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] line = br.readLine().split(\" \");", "line", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Stack<String> stack = new Stack<String>();", "stack", "new Stack<String>()", "for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < line.length", "i", "line.length", "line", "line.length", "i++", "i++", "i", "{\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }", "{\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }", "if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }", "isNumber(line[i])", "isNumber", "line[i]", "line", "i", "{\n stack.push(line[i]);\n }", "stack.push(line[i])", "stack.push", "stack", "line[i]", "line", "i", "{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }", "int b = Integer.parseInt(stack.pop());", "b", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int a = Integer.parseInt(stack.pop());", "a", "Integer.parseInt(stack.pop())", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }", "line[i].equals(\"+\")", "line[i].equals", "line[i]", "line", "i", "\"+\"", "{\n stack.push(String.valueOf(a+b));\n }", "stack.push(String.valueOf(a+b))", "stack.push", "stack", "String.valueOf(a+b)", "String.valueOf", "String", "a+b", "a", "b", "if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }", "line[i].equals(\"-\")", "line[i].equals", "line[i]", "line", "i", "\"-\"", "{\n stack.push(String.valueOf(a-b));\n }", "stack.push(String.valueOf(a-b))", "stack.push", "stack", "String.valueOf(a-b)", "String.valueOf", "String", "a-b", "a", "b", "if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }", "line[i].equals(\"*\")", "line[i].equals", "line[i]", "line", "i", "\"*\"", "{\n stack.push(String.valueOf(a*b));\n }", "stack.push(String.valueOf(a*b))", "stack.push", "stack", "String.valueOf(a*b)", "String.valueOf", "String", "a*b", "a", "b", "if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }", "line[i].equals(\"/\")", "line[i].equals", "line[i]", "line", "i", "\"/\"", "{\n stack.push(String.valueOf(a/b));\n }", "stack.push(String.valueOf(a/b))", "stack.push", "stack", "String.valueOf(a/b)", "String.valueOf", "String", "a/b", "a", "b", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public static boolean isNumber(String term) {\n Pattern patternNum = Pattern.compile(\"-*[0-9]+\");\n Matcher matcherNum = patternNum.matcher(term);\n\n return matcherNum.matches();\n }", "isNumber", "{\n Pattern patternNum = Pattern.compile(\"-*[0-9]+\");\n Matcher matcherNum = patternNum.matcher(term);\n\n return matcherNum.matches();\n }", "Pattern patternNum = Pattern.compile(\"-*[0-9]+\");", "patternNum", "Pattern.compile(\"-*[0-9]+\")", "Pattern.compile", "Pattern", "\"-*[0-9]+\"", "Matcher matcherNum = patternNum.matcher(term);", "matcherNum", "patternNum.matcher(term)", "patternNum.matcher", "patternNum", "term", "return matcherNum.matches();", "matcherNum.matches()", "matcherNum.matches", "matcherNum", "String term", "term", "public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] line = br.readLine().split(\" \");\n Stack<String> stack = new Stack<String>();\n\n for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }\n\n System.out.println(stack.pop());\n }\n\n public static boolean isNumber(String term) {\n Pattern patternNum = Pattern.compile(\"-*[0-9]+\");\n Matcher matcherNum = patternNum.matcher(term);\n\n return matcherNum.matches();\n }\n}", "public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] line = br.readLine().split(\" \");\n Stack<String> stack = new Stack<String>();\n\n for(int i = 0; i < line.length; i++){\n if(isNumber(line[i])){\n stack.push(line[i]);\n }else{\n int b = Integer.parseInt(stack.pop());\n int a = Integer.parseInt(stack.pop()); \n if(line[i].equals(\"+\")){\n stack.push(String.valueOf(a+b));\n }else if(line[i].equals(\"-\")){\n stack.push(String.valueOf(a-b));\n }else if(line[i].equals(\"*\")){\n stack.push(String.valueOf(a*b));\n }else if(line[i].equals(\"/\")){\n stack.push(String.valueOf(a/b));\n }\n }\n }\n\n System.out.println(stack.pop());\n }\n\n public static boolean isNumber(String term) {\n Pattern patternNum = Pattern.compile(\"-*[0-9]+\");\n Matcher matcherNum = patternNum.matcher(term);\n\n return matcherNum.matches();\n }\n}", "Main" ]
import java.io.*; import java.util.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] line = br.readLine().split(" "); Stack<String> stack = new Stack<String>(); for(int i = 0; i < line.length; i++){ if(isNumber(line[i])){ stack.push(line[i]); }else{ int b = Integer.parseInt(stack.pop()); int a = Integer.parseInt(stack.pop()); if(line[i].equals("+")){ stack.push(String.valueOf(a+b)); }else if(line[i].equals("-")){ stack.push(String.valueOf(a-b)); }else if(line[i].equals("*")){ stack.push(String.valueOf(a*b)); }else if(line[i].equals("/")){ stack.push(String.valueOf(a/b)); } } } System.out.println(stack.pop()); } public static boolean isNumber(String term) { Pattern patternNum = Pattern.compile("-*[0-9]+"); Matcher matcherNum = patternNum.matcher(term); return matcherNum.matches(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 38, 5, 13, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 14, 4, 18, 18, 13, 2, 18, 13, 13, 17, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 14, 4, 18, 18, 13, 2, 18, 13, 13, 17, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 14, 4, 18, 18, 13, 2, 18, 13, 13, 17, 17, 30, 4, 18, 18, 13, 13, 2, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 199, 8 ], [ 199, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 32 ], [ 32, 33 ], [ 32, 34 ], [ 11, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 54, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 75, 77 ], [ 54, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 78, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 85, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 85, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 78, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 102, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 109, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 109, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 123, 125 ], [ 50, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 133, 134 ], [ 133, 135 ], [ 11, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 145 ], [ 137, 146 ], [ 136, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 148, 153 ], [ 153, 154 ], [ 153, 155 ], [ 136, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 165 ], [ 157, 166 ], [ 156, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 168, 173 ], [ 173, 174 ], [ 173, 175 ], [ 156, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 181, 185 ], [ 177, 186 ], [ 176, 187 ], [ 187, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 188, 193 ], [ 193, 194 ], [ 193, 195 ], [ 9, 196 ], [ 196, 197 ], [ 0, 198 ], [ 198, 199 ], [ 198, 200 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\tpublic static void main(String[] arg) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\t\tint first = 0;\n\t\tint sec = 0;\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\tpublic static void main(String[] arg) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\t\tint first = 0;\n\t\tint sec = 0;\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] arg) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\t\tint first = 0;\n\t\tint sec = 0;\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\t\tint first = 0;\n\t\tint sec = 0;\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] arr = line.split(\" \");", "arr", "line.split(\" \")", "line.split", "line", "\" \"", "int first = 0;", "first", "0", "int sec = 0;", "sec", "0", "Stack<Integer> st = new Stack<Integer>();", "st", "new Stack<Integer>()", "for(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "try {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}", "catch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}", "Exception e", "{\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}", "if(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}", "arr[i].equals(\"+\")", "arr[i].equals", "arr[i]", "arr", "i", "\"+\"", "{\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}", "sec = st.pop()", "sec", "st.pop()", "st.pop", "st", "first = st.pop()", "first", "st.pop()", "st.pop", "st", "st.push(first + sec)", "st.push", "st", "first + sec", "first", "sec", "if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}", "arr[i].equals(\"-\")", "arr[i].equals", "arr[i]", "arr", "i", "\"-\"", "{\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}", "sec = st.pop()", "sec", "st.pop()", "st.pop", "st", "first = st.pop()", "first", "st.pop()", "st.pop", "st", "st.push(first - sec)", "st.push", "st", "first - sec", "first", "sec", "if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}", "arr[i].equals(\"*\")", "arr[i].equals", "arr[i]", "arr", "i", "\"*\"", "{\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}", "sec = st.pop()", "sec", "st.pop()", "st.pop", "st", "first = st.pop()", "first", "st.pop()", "st.pop", "st", "st.push(first * sec)", "st.push", "st", "first * sec", "first", "sec", "{\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}", "st.push(Integer.parseInt(arr[i]))", "st.push", "st", "Integer.parseInt(arr[i])", "Integer.parseInt", "Integer", "arr[i]", "arr", "i", "if(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}", "arr[arr.length-1].equals(\"+\")", "arr[arr.length-1].equals", "arr[arr.length-1]", "arr", "arr.length-1", "arr.length", "arr", "arr.length", "1", "\"+\"", "{\n\t\t\tSystem.out.println(first+sec);\n\t\t}", "System.out.println(first+sec)", "System.out.println", "System.out", "System", "System.out", "first+sec", "first", "sec", "if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}", "arr[arr.length-1].equals(\"-\")", "arr[arr.length-1].equals", "arr[arr.length-1]", "arr", "arr.length-1", "arr.length", "arr", "arr.length", "1", "\"-\"", "{\n\t\t\tSystem.out.println(first-sec);\n\t\t}", "System.out.println(first-sec)", "System.out.println", "System.out", "System", "System.out", "first-sec", "first", "sec", "if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}", "arr[arr.length-1].equals(\"*\")", "arr[arr.length-1].equals", "arr[arr.length-1]", "arr", "arr.length-1", "arr.length", "arr", "arr.length", "1", "\"*\"", "{\n\t\t\tSystem.out.println(first*sec);\n\t\t}", "System.out.println(first*sec)", "System.out.println", "System.out", "System", "System.out", "first*sec", "first", "sec", "String[] arg", "arg", "public class Main {\n\tpublic static void main(String[] arg) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\t\tint first = 0;\n\t\tint sec = 0;\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] arg) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString line = sc.nextLine();\n\t\tString[] arr = line.split(\" \");\n\t\tint first = 0;\n\t\tint sec = 0;\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tStack<Integer> st = new Stack<Integer>();\n\t\tfor(int i = 0; i < arr.length; i++) {\n\t\t\ttry {\n\t\t\t\tst.push(Integer.parseInt(arr[i]));\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\tif(arr[i].equals(\"+\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first + sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"-\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first - sec);\n\t\t\t\t}\n\t\t\t\telse if(arr[i].equals(\"*\")) {\n\t\t\t\t\tsec = st.pop();\n\t\t\t\t\tfirst = st.pop();\n\t\t\t\t\tst.push(first * sec);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(arr[arr.length-1].equals(\"+\")) {\n\t\t\tSystem.out.println(first+sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"-\")) {\n\t\t\tSystem.out.println(first-sec);\n\t\t}\n\t\telse if(arr[arr.length-1].equals(\"*\")) {\n\t\t\tSystem.out.println(first*sec);\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] arg) { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] arr = line.split(" "); int first = 0; int sec = 0; //System.out.println(Arrays.toString(arr)); Stack<Integer> st = new Stack<Integer>(); for(int i = 0; i < arr.length; i++) { try { st.push(Integer.parseInt(arr[i])); } catch(Exception e){ if(arr[i].equals("+")) { sec = st.pop(); first = st.pop(); st.push(first + sec); } else if(arr[i].equals("-")) { sec = st.pop(); first = st.pop(); st.push(first - sec); } else if(arr[i].equals("*")) { sec = st.pop(); first = st.pop(); st.push(first * sec); } } } if(arr[arr.length-1].equals("+")) { System.out.println(first+sec); } else if(arr[arr.length-1].equals("-")) { System.out.println(first-sec); } else if(arr[arr.length-1].equals("*")) { System.out.println(first*sec); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 18, 13, 13, 41, 13, 40, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 13, 40, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 13, 40, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 13, 40, 13, 30, 0, 18, 13, 40, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 146, 8 ], [ 146, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 26, 27 ], [ 26, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 11, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 33, 43 ], [ 43, 44 ], [ 44, 45 ], [ 33, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 48, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 56, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 62, 68 ], [ 68, 69 ], [ 68, 70 ], [ 55, 71 ], [ 71, 72 ], [ 48, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 73, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 81, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 87, 93 ], [ 93, 94 ], [ 93, 95 ], [ 80, 96 ], [ 96, 97 ], [ 73, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 98, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 106, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 112, 118 ], [ 118, 119 ], [ 118, 120 ], [ 105, 121 ], [ 121, 122 ], [ 98, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 124, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 132, 133 ], [ 132, 134 ], [ 11, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 135, 140 ], [ 140, 141 ], [ 140, 142 ], [ 9, 143 ], [ 143, 144 ], [ 0, 145 ], [ 145, 146 ], [ 145, 147 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] ary = br.readLine().split(\" \");\n\t\tint[] stack = new int[ary.length];\n\t\tint stackCount = -1;\n\t\tfor(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack[stackCount]);\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] ary = br.readLine().split(\" \");\n\t\tint[] stack = new int[ary.length];\n\t\tint stackCount = -1;\n\t\tfor(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack[stackCount]);\n\t}\n\n}", "Main", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] ary = br.readLine().split(\" \");\n\t\tint[] stack = new int[ary.length];\n\t\tint stackCount = -1;\n\t\tfor(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack[stackCount]);\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] ary = br.readLine().split(\" \");\n\t\tint[] stack = new int[ary.length];\n\t\tint stackCount = -1;\n\t\tfor(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack[stackCount]);\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] ary = br.readLine().split(\" \");", "ary", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int[] stack = new int[ary.length];", "stack", "new int[ary.length]", "ary.length", "ary", "ary.length", "int stackCount = -1;", "stackCount", "-1", "1", "for(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < ary.length", "i", "ary.length", "ary", "ary.length", "i++", "i++", "i", "{\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}", "{\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}", "if(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}", "ary[i].equals(\"+\")", "ary[i].equals", "ary[i]", "ary", "i", "\"+\"", "{\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}", "stack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount]", "stack[stackCount - 1]", "stack", "stackCount - 1", "stackCount", "1", "stack[stackCount - 1] + stack[stackCount]", "stack[stackCount - 1]", "stack", "stackCount - 1", "stackCount", "1", "stack[stackCount]", "stack", "stackCount", "stackCount--", "stackCount", "if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}", "ary[i].equals(\"-\")", "ary[i].equals", "ary[i]", "ary", "i", "\"-\"", "{\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}", "stack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount]", "stack[stackCount - 1]", "stack", "stackCount - 1", "stackCount", "1", "stack[stackCount - 1] - stack[stackCount]", "stack[stackCount - 1]", "stack", "stackCount - 1", "stackCount", "1", "stack[stackCount]", "stack", "stackCount", "stackCount--", "stackCount", "if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}", "ary[i].equals(\"*\")", "ary[i].equals", "ary[i]", "ary", "i", "\"*\"", "{\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}", "stack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount]", "stack[stackCount - 1]", "stack", "stackCount - 1", "stackCount", "1", "stack[stackCount - 1] * stack[stackCount]", "stack[stackCount - 1]", "stack", "stackCount - 1", "stackCount", "1", "stack[stackCount]", "stack", "stackCount", "stackCount--", "stackCount", "{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}", "stack[++stackCount] = Integer.parseInt(ary[i])", "stack[++stackCount]", "stack", "++stackCount", "stackCount", "Integer.parseInt(ary[i])", "Integer.parseInt", "Integer", "ary[i]", "ary", "i", "System.out.println(stack[stackCount])", "System.out.println", "System.out", "System", "System.out", "stack[stackCount]", "stack", "stackCount", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] ary = br.readLine().split(\" \");\n\t\tint[] stack = new int[ary.length];\n\t\tint stackCount = -1;\n\t\tfor(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack[stackCount]);\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString[] ary = br.readLine().split(\" \");\n\t\tint[] stack = new int[ary.length];\n\t\tint stackCount = -1;\n\t\tfor(int i = 0 ; i < ary.length ; i++){\n\t\t\tif(ary[i].equals(\"+\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"-\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else if(ary[i].equals(\"*\")){\n\t\t\t\tstack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount];\n\t\t\t\tstackCount--;\n\t\t\t}else{\n\t\t\t\tstack[++stackCount] = Integer.parseInt(ary[i]);\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack[stackCount]);\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] ary = br.readLine().split(" "); int[] stack = new int[ary.length]; int stackCount = -1; for(int i = 0 ; i < ary.length ; i++){ if(ary[i].equals("+")){ stack[stackCount - 1] = stack[stackCount - 1] + stack[stackCount]; stackCount--; }else if(ary[i].equals("-")){ stack[stackCount - 1] = stack[stackCount - 1] - stack[stackCount]; stackCount--; }else if(ary[i].equals("*")){ stack[stackCount - 1] = stack[stackCount - 1] * stack[stackCount]; stackCount--; }else{ stack[++stackCount] = Integer.parseInt(ary[i]); } } System.out.println(stack[stackCount]); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 14, 4, 18, 13, 30, 41, 13, 4, 18, 13, 4, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 13, 41, 13, 4, 13, 35, 13, 34, 17, 1, 4, 13, 2, 13, 13, 3, 34, 17, 1, 4, 13, 2, 13, 13, 3, 34, 17, 1, 4, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 4, 13, 23, 13, 12, 13, 30, 0, 13, 17, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 2, 13, 17, 12, 13, 30, 14, 40, 4, 13, 30, 40, 13, 0, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 17, 23, 13, 12, 13, 30, 41, 13, 40, 17, 14, 40, 4, 13, 30, 0, 13, 18, 13, 13, 40, 13, 30, 4, 18, 18, 13, 13, 17, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 167, 5 ], [ 167, 6 ], [ 6, 7 ], [ 6, 8 ], [ 167, 10 ], [ 10, 11 ], [ 10, 12 ], [ 167, 13 ], [ 13, 14 ], [ 13, 15 ], [ 167, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 27, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 31, 37 ], [ 37, 38 ], [ 37, 39 ], [ 27, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 40, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 40, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 40, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 58, 64 ], [ 54, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 67, 73 ], [ 54, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 76, 82 ], [ 18, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 16, 90 ], [ 90, 91 ], [ 167, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 167, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 167, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 167, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 117, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 117, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 114, 136 ], [ 136, 137 ], [ 167, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 140, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 145, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 152, 154 ], [ 149, 155 ], [ 155, 156 ], [ 145, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 158, 163 ], [ 140, 164 ], [ 164, 165 ], [ 0, 166 ], [ 166, 167 ], [ 166, 168 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tstatic int[] s = new int[200]; // オペランド100個と演算子99個が収まる容量\n\tstatic int top = 0;\n\tstatic int max = 200;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\n\t}\n\n\t/* 配列によるスタックの実装 */\n\n\tprivate static void initialize() {\n\t\ttop = 0;\n\t}\n\n\tprivate static boolean isEmpty() {\n\t\treturn top == 0;\n\t}\n\n\tprivate static boolean isFull() {\n\t\treturn top >= max - 1;\n\t}\n\n\tprivate static void push(int x) {\n\t\tif (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}\n\t}\n\n\tprivate static int pop() {\n\t\tint ret = -1;\n\t\tif (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}\n\t\treturn ret;\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tstatic int[] s = new int[200]; // オペランド100個と演算子99個が収まる容量\n\tstatic int top = 0;\n\tstatic int max = 200;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\n\t}\n\n\t/* 配列によるスタックの実装 */\n\n\tprivate static void initialize() {\n\t\ttop = 0;\n\t}\n\n\tprivate static boolean isEmpty() {\n\t\treturn top == 0;\n\t}\n\n\tprivate static boolean isFull() {\n\t\treturn top >= max - 1;\n\t}\n\n\tprivate static void push(int x) {\n\t\tif (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}\n\t}\n\n\tprivate static int pop() {\n\t\tint ret = -1;\n\t\tif (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}\n\t\treturn ret;\n\t}\n\n}", "Main", "static int[] s = new int[200]; // オペランド100個と演算子99個が収まる容量", "s", "new int[200]", "200", "static int top = 0;", "top", "0", "static int max = 200;", "max", "200", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "sc.hasNextInt()", "sc.hasNextInt", "sc", "{\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t}", "int num = sc.nextInt();", "num", "sc.nextInt()", "sc.nextInt", "sc", "push(num)", "push", "num", "{\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "String str = sc.next();", "str", "sc.next()", "sc.next", "sc", "int a = pop();", "a", "pop()", "pop", "int b = pop();", "b", "pop()", "pop", "switch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "str", "case \"+\":", "\"+\"", "case \"+\":", "push(b + a)", "push", "b + a", "b", "a", "break;", "case \"-\":", "\"-\"", "case \"-\":", "push(b - a)", "push", "b - a", "b", "a", "break;", "case \"*\":", "\"*\"", "case \"*\":", "push(b * a)", "push", "b * a", "b", "a", "break;", "System.out.println(pop())", "System.out.println", "System.out", "System", "System.out", "pop()", "pop", "String[] args", "args", "private static void initialize() {\n\t\ttop = 0;\n\t}", "initialize", "{\n\t\ttop = 0;\n\t}", "top = 0", "top", "0", "private static boolean isEmpty() {\n\t\treturn top == 0;\n\t}", "isEmpty", "{\n\t\treturn top == 0;\n\t}", "return top == 0;", "top == 0", "top", "0", "private static boolean isFull() {\n\t\treturn top >= max - 1;\n\t}", "isFull", "{\n\t\treturn top >= max - 1;\n\t}", "return top >= max - 1;", "top >= max - 1", "top", "max - 1", "max", "1", "private static void push(int x) {\n\t\tif (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}\n\t}", "push", "{\n\t\tif (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}\n\t}", "if (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}", "!isFull()", "isFull()", "isFull", "{\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t}", "top++", "top", "s[top] = x", "s[top]", "s", "top", "x", "{\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}", "System.err.println(\"容量オーバーです。\")", "System.err.println", "System.err", "System", "System.err", "\"容量オーバーです。\"", "int x", "x", "private static int pop() {\n\t\tint ret = -1;\n\t\tif (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}\n\t\treturn ret;\n\t}", "pop", "{\n\t\tint ret = -1;\n\t\tif (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}\n\t\treturn ret;\n\t}", "int ret = -1;", "ret", "-1", "1", "if (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}", "!isEmpty()", "isEmpty()", "isEmpty", "{\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t}", "ret = s[top]", "ret", "s[top]", "s", "top", "top--", "top", "{\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}", "System.err.println(\"中身が空です。\")", "System.err.println", "System.err", "System", "System.err", "\"中身が空です。\"", "return ret;", "ret", "public class Main {\n\tstatic int[] s = new int[200]; // オペランド100個と演算子99個が収まる容量\n\tstatic int top = 0;\n\tstatic int max = 200;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\n\t}\n\n\t/* 配列によるスタックの実装 */\n\n\tprivate static void initialize() {\n\t\ttop = 0;\n\t}\n\n\tprivate static boolean isEmpty() {\n\t\treturn top == 0;\n\t}\n\n\tprivate static boolean isFull() {\n\t\treturn top >= max - 1;\n\t}\n\n\tprivate static void push(int x) {\n\t\tif (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}\n\t}\n\n\tprivate static int pop() {\n\t\tint ret = -1;\n\t\tif (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}\n\t\treturn ret;\n\t}\n\n}", "public class Main {\n\tstatic int[] s = new int[200]; // オペランド100個と演算子99個が収まる容量\n\tstatic int top = 0;\n\tstatic int max = 200;\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tif (sc.hasNextInt()) {\n\t\t\t\tint num = sc.nextInt();\n\t\t\t\tpush(num);\n\n\t\t\t} else {\n\t\t\t\tString str = sc.next();\n\t\t\t\tint a = pop();\n\t\t\t\tint b = pop();\n\n\t\t\t\tswitch (str) {\n\t\t\t\tcase \"+\":\n\t\t\t\t\tpush(b + a);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"-\":\n\t\t\t\t\tpush(b - a); // LIFO(後入れ先出し)\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"*\":\n\t\t\t\t\tpush(b * a);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(pop());\n\n\t}\n\n\t/* 配列によるスタックの実装 */\n\n\tprivate static void initialize() {\n\t\ttop = 0;\n\t}\n\n\tprivate static boolean isEmpty() {\n\t\treturn top == 0;\n\t}\n\n\tprivate static boolean isFull() {\n\t\treturn top >= max - 1;\n\t}\n\n\tprivate static void push(int x) {\n\t\tif (!isFull()) {\n\t\t\ttop++;\n\t\t\ts[top] = x;\n\t\t} else {\n\t\t\tSystem.err.println(\"容量オーバーです。\");\n\t\t}\n\t}\n\n\tprivate static int pop() {\n\t\tint ret = -1;\n\t\tif (!isEmpty()) {\n\t\t\tret = s[top];\n\t\t\ttop--;\n\t\t} else {\n\t\t\tSystem.err.println(\"中身が空です。\");\n\t\t}\n\t\treturn ret;\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { static int[] s = new int[200]; // オペランド100個と演算子99個が収まる容量 static int top = 0; static int max = 200; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { if (sc.hasNextInt()) { int num = sc.nextInt(); push(num); } else { String str = sc.next(); int a = pop(); int b = pop(); switch (str) { case "+": push(b + a); break; case "-": push(b - a); // LIFO(後入れ先出し) break; case "*": push(b * a); break; } } } System.out.println(pop()); } /* 配列によるスタックの実装 */ private static void initialize() { top = 0; } private static boolean isEmpty() { return top == 0; } private static boolean isFull() { return top >= max - 1; } private static void push(int x) { if (!isFull()) { top++; s[top] = x; } else { System.err.println("容量オーバーです。"); } } private static int pop() { int ret = -1; if (!isEmpty()) { ret = s[top]; top--; } else { System.err.println("中身が空です。"); } return ret; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 41, 13, 4, 18, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 4, 18, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 11, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 27, 30 ], [ 8, 31 ], [ 31, 32 ], [ 31, 33 ], [ 8, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 8, 39 ], [ 39, 40 ], [ 39, 41 ], [ 8, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 8, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 50, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 56, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 61, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 56, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 75, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 80, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 80, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 75, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 100, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 108, 112 ], [ 112, 113 ], [ 113, 114 ], [ 105, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 100, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 8, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 133, 134 ], [ 6, 135 ], [ 135, 136 ] ]
[ "import java.util.*;\n\nclass Main{\n\tpublic static void main(String args[]){\n\t\tint i;\n\t\tint stacksize = 100;\n\t\tString temp;\n\t\tint calc;\n\t\tint a,b;\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tScanner sc1 = new Scanner(System.in);\n\t\tString str = sc1.nextLine();\n\t\tScanner sc2 = new Scanner(str);\n\t\tsc2.useDelimiter(\" \");\n\t\t\n\t\twhile(sc2.hasNext()){\n\t\t\ttemp = sc2.next();\n\t\t\tif(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.removeFirst());\n\t}\n}", "import java.util.*;", "util.*", "java", "class Main{\n\tpublic static void main(String args[]){\n\t\tint i;\n\t\tint stacksize = 100;\n\t\tString temp;\n\t\tint calc;\n\t\tint a,b;\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tScanner sc1 = new Scanner(System.in);\n\t\tString str = sc1.nextLine();\n\t\tScanner sc2 = new Scanner(str);\n\t\tsc2.useDelimiter(\" \");\n\t\t\n\t\twhile(sc2.hasNext()){\n\t\t\ttemp = sc2.next();\n\t\t\tif(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.removeFirst());\n\t}\n}", "Main", "public static void main(String args[]){\n\t\tint i;\n\t\tint stacksize = 100;\n\t\tString temp;\n\t\tint calc;\n\t\tint a,b;\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tScanner sc1 = new Scanner(System.in);\n\t\tString str = sc1.nextLine();\n\t\tScanner sc2 = new Scanner(str);\n\t\tsc2.useDelimiter(\" \");\n\t\t\n\t\twhile(sc2.hasNext()){\n\t\t\ttemp = sc2.next();\n\t\t\tif(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.removeFirst());\n\t}", "main", "{\n\t\tint i;\n\t\tint stacksize = 100;\n\t\tString temp;\n\t\tint calc;\n\t\tint a,b;\n\t\tDeque<Integer> stack = new ArrayDeque<Integer>();\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tScanner sc1 = new Scanner(System.in);\n\t\tString str = sc1.nextLine();\n\t\tScanner sc2 = new Scanner(str);\n\t\tsc2.useDelimiter(\" \");\n\t\t\n\t\twhile(sc2.hasNext()){\n\t\t\ttemp = sc2.next();\n\t\t\tif(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.removeFirst());\n\t}", "int i;", "i", "int stacksize = 100;", "stacksize", "100", "String temp;", "temp", "int calc;", "calc", "int a", "a", "b;", "b", "Deque<Integer> stack = new ArrayDeque<Integer>();", "stack", "new ArrayDeque<Integer>()", "String separator = System.getProperty(\"line.separator\");", "separator", "System.getProperty(\"line.separator\")", "System.getProperty", "System", "\"line.separator\"", "Scanner sc1 = new Scanner(System.in);", "sc1", "new Scanner(System.in)", "String str = sc1.nextLine();", "str", "sc1.nextLine()", "sc1.nextLine", "sc1", "Scanner sc2 = new Scanner(str);", "sc2", "new Scanner(str)", "sc2.useDelimiter(\" \")", "sc2.useDelimiter", "sc2", "\" \"", "while(sc2.hasNext()){\n\t\t\ttemp = sc2.next();\n\t\t\tif(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}\n\t\t}", "sc2.hasNext()", "sc2.hasNext", "sc2", "{\n\t\t\ttemp = sc2.next();\n\t\t\tif(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}\n\t\t}", "temp = sc2.next()", "temp", "sc2.next()", "sc2.next", "sc2", "if(temp.equals(\"+\")){\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}", "temp.equals(\"+\")", "temp.equals", "temp", "\"+\"", "{\n\t\t\t\tcalc = stack.removeFirst() + stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}", "calc = stack.removeFirst() + stack.removeFirst()", "calc", "stack.removeFirst() + stack.removeFirst()", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst(calc)", "stack.addFirst", "stack", "calc", "if(temp.equals(\"-\")){\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}", "temp.equals(\"-\")", "temp.equals", "temp", "\"-\"", "{\n\t\t\t\ta = stack.removeFirst();\n\t\t\t\tb = stack.removeFirst();\n\t\t\t\tcalc = b - a;\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}", "a = stack.removeFirst()", "a", "stack.removeFirst()", "stack.removeFirst", "stack", "b = stack.removeFirst()", "b", "stack.removeFirst()", "stack.removeFirst", "stack", "calc = b - a", "calc", "b - a", "b", "a", "stack.addFirst(calc)", "stack.addFirst", "stack", "calc", "if(temp.equals(\"*\")){\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}else{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}", "temp.equals(\"*\")", "temp.equals", "temp", "\"*\"", "{\n\t\t\t\tcalc = stack.removeFirst() * stack.removeFirst();\n\t\t\t\tstack.addFirst(calc);\n\t\t\t}", "calc = stack.removeFirst() * stack.removeFirst()", "calc", "stack.removeFirst() * stack.removeFirst()", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst(calc)", "stack.addFirst", "stack", "calc", "{\n\t\t\t\tstack.addFirst(Integer.parseInt(temp));\n\t\t\t}", "stack.addFirst(Integer.parseInt(temp))", "stack.addFirst", "stack", "Integer.parseInt(temp)", "Integer.parseInt", "Integer", "temp", "System.out.println(stack.removeFirst())", "System.out.println", "System.out", "System", "System.out", "stack.removeFirst()", "stack.removeFirst", "stack", "String args[]", "args" ]
import java.util.*; class Main{ public static void main(String args[]){ int i; int stacksize = 100; String temp; int calc; int a,b; Deque<Integer> stack = new ArrayDeque<Integer>(); String separator = System.getProperty("line.separator"); Scanner sc1 = new Scanner(System.in); String str = sc1.nextLine(); Scanner sc2 = new Scanner(str); sc2.useDelimiter(" "); while(sc2.hasNext()){ temp = sc2.next(); if(temp.equals("+")){ calc = stack.removeFirst() + stack.removeFirst(); stack.addFirst(calc); }else if(temp.equals("-")){ a = stack.removeFirst(); b = stack.removeFirst(); calc = b - a; stack.addFirst(calc); }else if(temp.equals("*")){ calc = stack.removeFirst() * stack.removeFirst(); stack.addFirst(calc); }else{ stack.addFirst(Integer.parseInt(temp)); } } System.out.println(stack.removeFirst()); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 20, 17, 12, 13, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 40, 13, 29, 18, 13, 2, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 0, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 2, 13, 13, 30, 4, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 8, 10 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 15, 20 ], [ 12, 21 ], [ 21, 22 ], [ 4, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 31, 33 ], [ 4, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 36, 44 ], [ 44, 45 ], [ 36, 46 ], [ 46, 47 ], [ 46, 48 ], [ 36, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 49, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 53, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 59, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 64, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 59, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 78, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 83, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 78, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 97, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 102, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 97, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 36, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 128, 129 ], [ 34, 130 ], [ 130, 131 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n\t\n\tstatic int top;\n\tstatic int [] stack = new int[1000];\n \n\tstatic void push(int x){\n\t\tstack[++top] = x;\n\t}\n\n\tstatic int pop(){\n\t\ttop--;\n\t\treturn stack[top + 1];\n\t}\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s;\n\t\tint a,b;\n\t\ttop = 0;\n\t\twhile(sc.hasNext()){ \n \t\ts = sc.next();\n \t\tif(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}\n\t\t}\n\n\t\tSystem.out.println(pop());\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\t\n\tstatic int top;\n\tstatic int [] stack = new int[1000];\n \n\tstatic void push(int x){\n\t\tstack[++top] = x;\n\t}\n\n\tstatic int pop(){\n\t\ttop--;\n\t\treturn stack[top + 1];\n\t}\n\t\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s;\n\t\tint a,b;\n\t\ttop = 0;\n\t\twhile(sc.hasNext()){ \n \t\ts = sc.next();\n \t\tif(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}\n\t\t}\n\n\t\tSystem.out.println(pop());\n\t}\n}", "Main", "static int top;", "top", "static int [] stack = new int[1000];", "stack", "new int[1000]", "1000", "static void push(int x){\n\t\tstack[++top] = x;\n\t}", "push", "{\n\t\tstack[++top] = x;\n\t}", "stack[++top] = x", "stack[++top]", "stack", "++top", "top", "x", "int x", "x", "static int pop(){\n\t\ttop--;\n\t\treturn stack[top + 1];\n\t}", "pop", "{\n\t\ttop--;\n\t\treturn stack[top + 1];\n\t}", "top--", "top", "return stack[top + 1];", "stack[top + 1]", "stack", "top + 1", "top", "1", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s;\n\t\tint a,b;\n\t\ttop = 0;\n\t\twhile(sc.hasNext()){ \n \t\ts = sc.next();\n \t\tif(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}\n\t\t}\n\n\t\tSystem.out.println(pop());\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s;\n\t\tint a,b;\n\t\ttop = 0;\n\t\twhile(sc.hasNext()){ \n \t\ts = sc.next();\n \t\tif(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}\n\t\t}\n\n\t\tSystem.out.println(pop());\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String s;", "s", "int a", "a", "b;", "b", "top = 0", "top", "0", "while(sc.hasNext()){ \n \t\ts = sc.next();\n \t\tif(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{ \n \t\ts = sc.next();\n \t\tif(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}\n\t\t}", "s = sc.next()", "s", "sc.next()", "sc.next", "sc", "if(s.equals(\"+\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}\n \t\telse if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a + b);\n \t\t}", "a = pop()", "a", "pop()", "pop", "b = pop()", "b", "pop()", "pop", "push(a + b)", "push", "a + b", "a", "b", "if(s.equals(\"-\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}\n \t\telse if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(b - a);\n \t\t}", "a = pop()", "a", "pop()", "pop", "b = pop()", "b", "pop()", "pop", "push(b - a)", "push", "b - a", "b", "a", "if(s.equals(\"*\")){\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}\n \t\telse{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n \t\ta = pop();\n \t\tb = pop();\n \t\tpush(a * b);\n \t\t}", "a = pop()", "a", "pop()", "pop", "b = pop()", "b", "pop()", "pop", "push(a * b)", "push", "a * b", "a", "b", "{\n \t\tpush(Integer.parseInt(s));\t\n \t\t}", "push(Integer.parseInt(s))", "push", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "System.out.println(pop())", "System.out.println", "System.out", "System", "System.out", "pop()", "pop", "String[] args", "args" ]
import java.util.Scanner; class Main{ static int top; static int [] stack = new int[1000]; static void push(int x){ stack[++top] = x; } static int pop(){ top--; return stack[top + 1]; } public static void main(String[] args){ Scanner sc = new Scanner(System.in); String s; int a,b; top = 0; while(sc.hasNext()){ s = sc.next(); if(s.equals("+")){ a = pop(); b = pop(); push(a + b); } else if(s.equals("-")){ a = pop(); b = pop(); push(b - a); } else if(s.equals("*")){ a = pop(); b = pop(); push(a * b); } else{ push(Integer.parseInt(s)); } } System.out.println(pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 4, 18, 13, 0, 13, 4, 18, 13, 17, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 17, 35, 18, 13, 13, 34, 17, 30, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 3, 34, 17, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 0, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 3, 34, 17, 30, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 3, 34, 30, 30, 4, 18, 13, 18, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 17, 41, 13, 41, 13, 20, 13, 12, 13, 30, 0, 18, 36, 13, 17, 12, 13, 30, 0, 18, 18, 36, 13, 13, 13, 40, 13, 23, 13, 12, 13, 30, 40, 13, 29, 4, 18, 13, 18, 13, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 21, 24 ], [ 21, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 57, 61 ], [ 61, 62 ], [ 62, 63 ], [ 54, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 54, 71 ], [ 47, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 75, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 75, 98 ], [ 47, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 102, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 102, 119 ], [ 47, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 126, 128 ], [ 122, 129 ], [ 8, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 136, 137 ], [ 6, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 145, 146 ], [ 140, 147 ], [ 147, 148 ], [ 147, 149 ], [ 140, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 154, 158 ], [ 140, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 163, 167 ], [ 162, 168 ], [ 161, 169 ], [ 169, 170 ], [ 159, 171 ], [ 171, 172 ], [ 140, 173 ], [ 173, 174 ], [ 173, 175 ], [ 175, 176 ], [ 176, 177 ], [ 175, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 179, 182 ], [ 182, 183 ], [ 182, 184 ] ]
[ "import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tString[] stack;\n\t\tString line = stdIn.nextLine();\n\t\tstack = line.split(\" \", 0);\n\n\t\tStack stack1 = new Stack();\n\n\t\tfor (int i = 0; i < stack.length; i++) {\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack1.pop());\n\n\t}\n}\n\nclass Stack{\n\tint maxSize = 200;\n\tint pointer;\n\tString[] stack = new String[maxSize];\n\n\tpublic void initialize(){\n\t\tthis.pointer = 0;\n\t}\n\n\tpublic void push(String x) {\n\t\tthis.stack[pointer] = x;\n\t\tpointer++;\n\t}\n\n\tpublic int pop() {\n\t\tpointer--;\n\t\treturn Integer.parseInt(stack[pointer]);\n\t}\n\n}", "import java.util.*;", "util.*", "java", "class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tString[] stack;\n\t\tString line = stdIn.nextLine();\n\t\tstack = line.split(\" \", 0);\n\n\t\tStack stack1 = new Stack();\n\n\t\tfor (int i = 0; i < stack.length; i++) {\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack1.pop());\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tString[] stack;\n\t\tString line = stdIn.nextLine();\n\t\tstack = line.split(\" \", 0);\n\n\t\tStack stack1 = new Stack();\n\n\t\tfor (int i = 0; i < stack.length; i++) {\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack1.pop());\n\n\t}", "main", "{\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tString[] stack;\n\t\tString line = stdIn.nextLine();\n\t\tstack = line.split(\" \", 0);\n\n\t\tStack stack1 = new Stack();\n\n\t\tfor (int i = 0; i < stack.length; i++) {\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack1.pop());\n\n\t}", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "String[] stack;", "stack", "String line = stdIn.nextLine();", "line", "stdIn.nextLine()", "stdIn.nextLine", "stdIn", "stack = line.split(\" \", 0)", "stack", "line.split(\" \", 0)", "line.split", "line", "\" \"", "0", "Stack stack1 = new Stack();", "stack1", "new Stack()", "for (int i = 0; i < stack.length; i++) {\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < stack.length", "i", "stack.length", "stack", "stack.length", "i++", "i++", "i", "{\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tint tmp = 0;\n\t\t\tswitch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int tmp = 0;", "tmp", "0", "switch (stack[i]) {\n\t\t\t\tcase \"+\":{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t/*????????§??????????????§???*/\n\t\t\t\tcase \"-\":{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"*\":{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "stack[i]", "stack", "i", "case \"+\":", "\"+\"", "case \"+\":", "{\n\t\t\t\t\ttmp = stack1.pop() + stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}", "tmp = stack1.pop() + stack1.pop()", "tmp", "stack1.pop() + stack1.pop()", "stack1.pop()", "stack1.pop", "stack1", "stack1.pop()", "stack1.pop", "stack1", "stack1.push(String.valueOf(tmp))", "stack1.push", "stack1", "String.valueOf(tmp)", "String.valueOf", "String", "tmp", "break;", "case \"-\":", "\"-\"", "case \"-\":", "{\n\t\t\t\t\tint operand1 = stack1.pop();\n\t\t\t\t\tint operand2 = stack1.pop();\n\t\t\t\t\ttmp = operand2 - operand1;\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}", "int operand1 = stack1.pop();", "operand1", "stack1.pop()", "stack1.pop", "stack1", "int operand2 = stack1.pop();", "operand2", "stack1.pop()", "stack1.pop", "stack1", "tmp = operand2 - operand1", "tmp", "operand2 - operand1", "operand2", "operand1", "stack1.push(String.valueOf(tmp))", "stack1.push", "stack1", "String.valueOf(tmp)", "String.valueOf", "String", "tmp", "break;", "case \"*\":", "\"*\"", "case \"*\":", "{\n\t\t\t\t\ttmp = stack1.pop() * stack1.pop();\n\t\t\t\t\tstack1.push(String.valueOf(tmp));\n\t\t\t\t\tbreak;\n\t\t\t\t}", "tmp = stack1.pop() * stack1.pop()", "tmp", "stack1.pop() * stack1.pop()", "stack1.pop()", "stack1.pop", "stack1", "stack1.pop()", "stack1.pop", "stack1", "stack1.push(String.valueOf(tmp))", "stack1.push", "stack1", "String.valueOf(tmp)", "String.valueOf", "String", "tmp", "break;", "default:", "default:", "{\n\t\t\t\t\tstack1.push(stack[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}", "stack1.push(stack[i])", "stack1.push", "stack1", "stack[i]", "stack", "i", "break;", "System.out.println(stack1.pop())", "System.out.println", "System.out", "System", "System.out", "stack1.pop()", "stack1.pop", "stack1", "String[] args", "args", "class Stack{\n\tint maxSize = 200;\n\tint pointer;\n\tString[] stack = new String[maxSize];\n\n\tpublic void initialize(){\n\t\tthis.pointer = 0;\n\t}\n\n\tpublic void push(String x) {\n\t\tthis.stack[pointer] = x;\n\t\tpointer++;\n\t}\n\n\tpublic int pop() {\n\t\tpointer--;\n\t\treturn Integer.parseInt(stack[pointer]);\n\t}\n\n}", "Stack", "int maxSize = 200;", "maxSize", "200", "int pointer;", "pointer", "String[] stack = new String[maxSize];", "stack", "new String[maxSize]", "maxSize", "public void initialize(){\n\t\tthis.pointer = 0;\n\t}", "initialize", "{\n\t\tthis.pointer = 0;\n\t}", "this.pointer = 0", "this.pointer", "this", "this.pointer", "0", "public void push(String x) {\n\t\tthis.stack[pointer] = x;\n\t\tpointer++;\n\t}", "push", "{\n\t\tthis.stack[pointer] = x;\n\t\tpointer++;\n\t}", "this.stack[pointer] = x", "this.stack[pointer]", "this.stack", "this", "this.stack", "pointer", "x", "pointer++", "pointer", "String x", "x", "public int pop() {\n\t\tpointer--;\n\t\treturn Integer.parseInt(stack[pointer]);\n\t}", "pop", "{\n\t\tpointer--;\n\t\treturn Integer.parseInt(stack[pointer]);\n\t}", "pointer--", "pointer", "return Integer.parseInt(stack[pointer]);", "Integer.parseInt(stack[pointer])", "Integer.parseInt", "Integer", "stack[pointer]", "stack", "pointer" ]
import java.util.*; class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String[] stack; String line = stdIn.nextLine(); stack = line.split(" ", 0); Stack stack1 = new Stack(); for (int i = 0; i < stack.length; i++) { int tmp = 0; switch (stack[i]) { case "+":{ tmp = stack1.pop() + stack1.pop(); stack1.push(String.valueOf(tmp)); break; } /*????????§??????????????§???*/ case "-":{ int operand1 = stack1.pop(); int operand2 = stack1.pop(); tmp = operand2 - operand1; stack1.push(String.valueOf(tmp)); break; } case "*":{ tmp = stack1.pop() * stack1.pop(); stack1.push(String.valueOf(tmp)); break; } default:{ stack1.push(stack[i]); break; } } } System.out.println(stack1.pop()); } } class Stack{ int maxSize = 200; int pointer; String[] stack = new String[maxSize]; public void initialize(){ this.pointer = 0; } public void push(String x) { this.stack[pointer] = x; pointer++; } public int pop() { pointer--; return Integer.parseInt(stack[pointer]); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 4, 18, 13, 17, 17, 17, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 20, 41, 13, 4, 18, 20, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 20, 41, 13, 4, 18, 20, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 20, 41, 13, 4, 18, 20, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 33, 37 ], [ 31, 38 ], [ 31, 39 ], [ 17, 40 ], [ 40, 41 ], [ 40, 42 ], [ 17, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 43, 53 ], [ 53, 54 ], [ 54, 55 ], [ 43, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 58, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 65, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 65, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 82, 84 ], [ 58, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 85, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 92, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 92, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 85, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 112, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 119, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 119, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 136, 138 ], [ 112, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 143, 144 ], [ 143, 145 ], [ 17, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 146, 151 ], [ 151, 152 ], [ 152, 153 ], [ 15, 154 ], [ 154, 155 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\n\nclass Main {\n\tpublic static void main(String args[]) throws IOException{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\n\t\t\n\t\t\n\t\tString str = br.readLine();\n\t\tString[] stA = (str.replaceAll(\"\\\\s+\", \" \")).split(\" \", 0);\n\t\t\n\t\t//str.replaceAll(\"\\\\s+\", \" \") ??§??£?¶???????????????????????????????????????????????????????\n\t\t//?¬?????????????????????????????????????split(\" \", 0)?????§?????????????????????????????¨??????????????????String???????????????\n\t\t\n\t\tStack<String> stack = new Stack<String>();\n\t\t\n\t\tfor(int i = 0; i < stA.length; i++) {\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "class Main {\n\tpublic static void main(String args[]) throws IOException{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\n\t\t\n\t\t\n\t\tString str = br.readLine();\n\t\tString[] stA = (str.replaceAll(\"\\\\s+\", \" \")).split(\" \", 0);\n\t\t\n\t\t//str.replaceAll(\"\\\\s+\", \" \") ??§??£?¶???????????????????????????????????????????????????????\n\t\t//?¬?????????????????????????????????????split(\" \", 0)?????§?????????????????????????????¨??????????????????String???????????????\n\t\t\n\t\tStack<String> stack = new Stack<String>();\n\t\t\n\t\tfor(int i = 0; i < stA.length; i++) {\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}\n}", "Main", "public static void main(String args[]) throws IOException{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\n\t\t\n\t\t\n\t\tString str = br.readLine();\n\t\tString[] stA = (str.replaceAll(\"\\\\s+\", \" \")).split(\" \", 0);\n\t\t\n\t\t//str.replaceAll(\"\\\\s+\", \" \") ??§??£?¶???????????????????????????????????????????????????????\n\t\t//?¬?????????????????????????????????????split(\" \", 0)?????§?????????????????????????????¨??????????????????String???????????????\n\t\t\n\t\tStack<String> stack = new Stack<String>();\n\t\t\n\t\tfor(int i = 0; i < stA.length; i++) {\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "main", "{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\n\t\t\n\t\t\n\t\tString str = br.readLine();\n\t\tString[] stA = (str.replaceAll(\"\\\\s+\", \" \")).split(\" \", 0);\n\t\t\n\t\t//str.replaceAll(\"\\\\s+\", \" \") ??§??£?¶???????????????????????????????????????????????????????\n\t\t//?¬?????????????????????????????????????split(\" \", 0)?????§?????????????????????????????¨??????????????????String???????????????\n\t\t\n\t\tStack<String> stack = new Stack<String>();\n\t\t\n\t\tfor(int i = 0; i < stA.length; i++) {\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(stack.pop());\n\t}", "InputStreamReader isr = new InputStreamReader(System.in);", "isr", "new InputStreamReader(System.in)", "BufferedReader br = new BufferedReader(isr);", "br", "new BufferedReader(isr)", "String str = br.readLine();", "str", "br.readLine()", "br.readLine", "br", "String[] stA = (str.replaceAll(\"\\\\s+\", \" \")).split(\" \", 0);", "stA", "(str.replaceAll(\"\\\\s+\", \" \")).split(\" \", 0)", "(str.replaceAll(\"\\\\s+\", \" \")).split", "(str.replaceAll(\"\\\\s+\", \" \"))", "str.replaceAll", "str", "\"\\\\s+\"", "\" \"", "\" \"", "0", "Stack<String> stack = new Stack<String>();", "stack", "new Stack<String>()", "for(int i = 0; i < stA.length; i++) {\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < stA.length", "i", "stA.length", "stA", "stA.length", "i++", "i++", "i", "{\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}", "{\n\t\t\tif(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}\n\t\t}", "if(stA[i].equals(\"+\")) {\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}", "stA[i].equals(\"+\")", "stA[i].equals", "stA[i]", "stA", "i", "\"+\"", "{\n\t\t\t\t//\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b+a));\n\t\t\t\t\n\t\t\t}", "int a = new Integer(stack.pop().toString()).intValue();", "a", "new Integer(stack.pop().toString()).intValue()", "new Integer(stack.pop().toString()).intValue", "new Integer(stack.pop().toString())", "int b = new Integer(stack.pop().toString()).intValue();", "b", "new Integer(stack.pop().toString()).intValue()", "new Integer(stack.pop().toString()).intValue", "new Integer(stack.pop().toString())", "stack.push(String.valueOf(b+a))", "stack.push", "stack", "String.valueOf(b+a)", "String.valueOf", "String", "b+a", "b", "a", "if(stA[i].equals(\"-\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t} else if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}", "stA[i].equals(\"-\")", "stA[i].equals", "stA[i]", "stA", "i", "\"-\"", "{\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b-a));\n\t\t\t\t\n\t\t\t}", "int a = new Integer(stack.pop().toString()).intValue();", "a", "new Integer(stack.pop().toString()).intValue()", "new Integer(stack.pop().toString()).intValue", "new Integer(stack.pop().toString())", "int b = new Integer(stack.pop().toString()).intValue();", "b", "new Integer(stack.pop().toString()).intValue()", "new Integer(stack.pop().toString()).intValue", "new Integer(stack.pop().toString())", "stack.push(String.valueOf(b-a))", "stack.push", "stack", "String.valueOf(b-a)", "String.valueOf", "String", "b-a", "b", "a", "if(stA[i].equals(\"*\")) {\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}", "stA[i].equals(\"*\")", "stA[i].equals", "stA[i]", "stA", "i", "\"*\"", "{\n\t\t\t\tint a = new Integer(stack.pop().toString()).intValue();\n\t\t\t\tint b = new Integer(stack.pop().toString()).intValue();\n\t\t\t\t\n\t\t\t\tstack.push(String.valueOf(b*a));\n\t\t\t\t\n\t\t\t}", "int a = new Integer(stack.pop().toString()).intValue();", "a", "new Integer(stack.pop().toString()).intValue()", "new Integer(stack.pop().toString()).intValue", "new Integer(stack.pop().toString())", "int b = new Integer(stack.pop().toString()).intValue();", "b", "new Integer(stack.pop().toString()).intValue()", "new Integer(stack.pop().toString()).intValue", "new Integer(stack.pop().toString())", "stack.push(String.valueOf(b*a))", "stack.push", "stack", "String.valueOf(b*a)", "String.valueOf", "String", "b*a", "b", "a", "{\n\t\t\t\tstack.push(stA[i]);\n\t\t\t}", "stack.push(stA[i])", "stack.push", "stack", "stA[i]", "stA", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String args[]", "args" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; class Main { public static void main(String args[]) throws IOException{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String str = br.readLine(); String[] stA = (str.replaceAll("\\s+", " ")).split(" ", 0); //str.replaceAll("\\s+", " ") ??§??£?¶??????????????????????????????????????????????????????? //?¬?????????????????????????????????????split(" ", 0)?????§?????????????????????????????¨??????????????????String??????????????? Stack<String> stack = new Stack<String>(); for(int i = 0; i < stA.length; i++) { if(stA[i].equals("+")) { // int a = new Integer(stack.pop().toString()).intValue(); int b = new Integer(stack.pop().toString()).intValue(); stack.push(String.valueOf(b+a)); } else if(stA[i].equals("-")) { int a = new Integer(stack.pop().toString()).intValue(); int b = new Integer(stack.pop().toString()).intValue(); stack.push(String.valueOf(b-a)); } else if(stA[i].equals("*")) { int a = new Integer(stack.pop().toString()).intValue(); int b = new Integer(stack.pop().toString()).intValue(); stack.push(String.valueOf(b*a)); } else { stack.push(stA[i]); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 18, 13, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 8, 2, 13, 17, 2, 13, 13, 8, 2, 13, 17, 2, 13, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 116, 11 ], [ 116, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 36, 38 ], [ 29, 39 ], [ 39, 40 ], [ 40, 41 ], [ 29, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 43, 52 ], [ 52, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 54, 61 ], [ 61, 62 ], [ 61, 63 ], [ 52, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 64, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 92 ], [ 92, 93 ], [ 92, 94 ], [ 52, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 14, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 110, 111 ], [ 111, 112 ], [ 12, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "import java.util.ArrayDeque;\nimport java.util.Deque;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String[] s = sc.nextLine().split(\" \");\n Deque<Integer> deq = new ArrayDeque<Integer>();\n \n for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }\n \n System.out.println(deq.pop());\n }\n}", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String[] s = sc.nextLine().split(\" \");\n Deque<Integer> deq = new ArrayDeque<Integer>();\n \n for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }\n \n System.out.println(deq.pop());\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String[] s = sc.nextLine().split(\" \");\n Deque<Integer> deq = new ArrayDeque<Integer>();\n \n for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }\n \n System.out.println(deq.pop());\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n String[] s = sc.nextLine().split(\" \");\n Deque<Integer> deq = new ArrayDeque<Integer>();\n \n for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }\n \n System.out.println(deq.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String[] s = sc.nextLine().split(\" \");", "s", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "Deque<Integer> deq = new ArrayDeque<Integer>();", "deq", "new ArrayDeque<Integer>()", "for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < s.length", "i", "s.length", "s", "s.length", "i++", "i++", "i", "{\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }", "{\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }", "char ch = s[i].charAt(0);", "ch", "s[i].charAt(0)", "s[i].charAt", "s[i]", "s", "i", "0", "if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }", "ch == '+' || ch == '-' || ch == '*'", "ch == '+' || ch == '-' || ch == '*'", "ch == '+'", "ch", "'+'", "ch == '-'", "ch", "'-'", "ch == '*'", "ch", "'*'", "{\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n }", "int o2 = deq.pop();", "o2", "deq.pop()", "deq.pop", "deq", "int o1 = deq.pop();", "o1", "deq.pop()", "deq.pop", "deq", "deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2)", "deq.push", "deq", "(ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2", "(ch == '+')", "ch", "'+'", "o1 + o2", "o1", "o2", "(ch == '-') ? o1 - o2 : o1 * o2", "(ch == '-')", "ch", "'-'", "o1 - o2", "o1", "o2", "o1 * o2", "o1", "o2", "{\n deq.push(Integer.parseInt(s[i]));\n }", "deq.push(Integer.parseInt(s[i]))", "deq.push", "deq", "Integer.parseInt(s[i])", "Integer.parseInt", "Integer", "s[i]", "s", "i", "System.out.println(deq.pop())", "System.out.println", "System.out", "System", "System.out", "deq.pop()", "deq.pop", "deq", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String[] s = sc.nextLine().split(\" \");\n Deque<Integer> deq = new ArrayDeque<Integer>();\n \n for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }\n \n System.out.println(deq.pop());\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String[] s = sc.nextLine().split(\" \");\n Deque<Integer> deq = new ArrayDeque<Integer>();\n \n for (int i = 0; i < s.length; i++) {\n char ch = s[i].charAt(0);\n if (ch == '+' || ch == '-' || ch == '*') {\n int o2 = deq.pop();\n int o1 = deq.pop();\n \n deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2);\n \n } else {\n deq.push(Integer.parseInt(s[i]));\n }\n }\n \n System.out.println(deq.pop());\n }\n}", "Main" ]
import java.util.ArrayDeque; import java.util.Deque; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String[] s = sc.nextLine().split(" "); Deque<Integer> deq = new ArrayDeque<Integer>(); for (int i = 0; i < s.length; i++) { char ch = s[i].charAt(0); if (ch == '+' || ch == '-' || ch == '*') { int o2 = deq.pop(); int o1 = deq.pop(); deq.push((ch == '+') ? o1 + o2 : (ch == '-') ? o1 - o2 : o1 * o2); } else { deq.push(Integer.parseInt(s[i])); } } System.out.println(deq.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 35, 13, 34, 17, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 3, 34, 17, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 3, 34, 17, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 3, 34, 30, 30, 4, 18, 13, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 13, 12, 13, 30, 4, 18, 20, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 159, 8 ], [ 159, 9 ], [ 9, 10 ], [ 9, 11 ], [ 159, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 26, 29 ], [ 30, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 43, 44 ], [ 36, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 51, 52 ], [ 36, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 36, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 36, 65 ], [ 31, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 69, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 69, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 69, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 95, 96 ], [ 94, 97 ], [ 69, 98 ], [ 31, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 105, 108 ], [ 108, 109 ], [ 109, 110 ], [ 102, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 117, 118 ], [ 102, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 121, 123 ], [ 102, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 102, 131 ], [ 31, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 14, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 14, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 144, 149 ], [ 159, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 150, 156 ], [ 156, 157 ], [ 0, 158 ], [ 158, 159 ], [ 158, 160 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n // Input\n String[] rawInputs = sc.nextLine().split(\" \");\n\n // Solve\n Stack<String> stack = new Stack<>();\n for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }\n String result = stack.pop();\n\n // Output\n System.out.println(result);\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n // Input\n String[] rawInputs = sc.nextLine().split(\" \");\n\n // Solve\n Stack<String> stack = new Stack<>();\n for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }\n String result = stack.pop();\n\n // Output\n System.out.println(result);\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}", "Main", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "void solve() {\n // Input\n String[] rawInputs = sc.nextLine().split(\" \");\n\n // Solve\n Stack<String> stack = new Stack<>();\n for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }\n String result = stack.pop();\n\n // Output\n System.out.println(result);\n }", "solve", "{\n // Input\n String[] rawInputs = sc.nextLine().split(\" \");\n\n // Solve\n Stack<String> stack = new Stack<>();\n for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }\n String result = stack.pop();\n\n // Output\n System.out.println(result);\n }", "String[] rawInputs = sc.nextLine().split(\" \");", "rawInputs", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "Stack<String> stack = new Stack<>();", "stack", "new Stack<>()", "for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }", "String input", "rawInputs", "{\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }", "{\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }", "switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }", "input", "case \"+\":", "\"+\"", "case \"+\":", "{\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }", "Integer opl = Integer.valueOf(stack.pop());", "opl", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "Integer opr = Integer.valueOf(stack.pop());", "opr", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "Integer result = opr + opl;", "result", "opr + opl", "opr", "opl", "stack.push(String.valueOf(result))", "stack.push", "stack", "String.valueOf(result)", "String.valueOf", "String", "result", "break;", "case \"-\":", "\"-\"", "case \"-\":", "{\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }", "Integer opl = Integer.valueOf(stack.pop());", "opl", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "Integer opr = Integer.valueOf(stack.pop());", "opr", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "Integer result = opr - opl;", "result", "opr - opl", "opr", "opl", "stack.push(String.valueOf(result))", "stack.push", "stack", "String.valueOf(result)", "String.valueOf", "String", "result", "break;", "case \"*\":", "\"*\"", "case \"*\":", "{\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }", "Integer opl = Integer.valueOf(stack.pop());", "opl", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "Integer opr = Integer.valueOf(stack.pop());", "opr", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "Integer result = opr * opl;", "result", "opr * opl", "opr", "opl", "stack.push(String.valueOf(result))", "stack.push", "stack", "String.valueOf(result)", "String.valueOf", "String", "result", "break;", "default:", "default:", "{\n stack.push(input);\n }", "stack.push(input)", "stack.push", "stack", "input", "String result = stack.pop();", "result", "stack.pop()", "stack.pop", "stack", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "public static void main(String[] args) {\n new Main().solve();\n }", "main", "{\n new Main().solve();\n }", "new Main().solve()", "new Main().solve", "new Main()", "String[] args", "args", "public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n // Input\n String[] rawInputs = sc.nextLine().split(\" \");\n\n // Solve\n Stack<String> stack = new Stack<>();\n for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }\n String result = stack.pop();\n\n // Output\n System.out.println(result);\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}", "public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n // Input\n String[] rawInputs = sc.nextLine().split(\" \");\n\n // Solve\n Stack<String> stack = new Stack<>();\n for (String input : rawInputs) {\n switch (input) {\n case \"+\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr + opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"-\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr - opl;\n stack.push(String.valueOf(result));\n break;\n }\n case \"*\": {\n Integer opl = Integer.valueOf(stack.pop());\n Integer opr = Integer.valueOf(stack.pop());\n Integer result = opr * opl;\n stack.push(String.valueOf(result));\n break;\n }\n default: {\n stack.push(input);\n }\n }\n }\n String result = stack.pop();\n\n // Output\n System.out.println(result);\n }\n\n public static void main(String[] args) {\n new Main().solve();\n }\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { Scanner sc = new Scanner(System.in); void solve() { // Input String[] rawInputs = sc.nextLine().split(" "); // Solve Stack<String> stack = new Stack<>(); for (String input : rawInputs) { switch (input) { case "+": { Integer opl = Integer.valueOf(stack.pop()); Integer opr = Integer.valueOf(stack.pop()); Integer result = opr + opl; stack.push(String.valueOf(result)); break; } case "-": { Integer opl = Integer.valueOf(stack.pop()); Integer opr = Integer.valueOf(stack.pop()); Integer result = opr - opl; stack.push(String.valueOf(result)); break; } case "*": { Integer opl = Integer.valueOf(stack.pop()); Integer opr = Integer.valueOf(stack.pop()); Integer result = opr * opl; stack.push(String.valueOf(result)); break; } default: { stack.push(input); } } } String result = stack.pop(); // Output System.out.println(result); } public static void main(String[] args) { new Main().solve(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 18, 13, 13, 41, 13, 20, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 30, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 17, 12, 13, 30, 0, 13, 17, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 2, 13, 17, 12, 13, 30, 14, 4, 13, 30, 4, 18, 18, 13, 13, 17, 40, 13, 0, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 4, 13, 30, 4, 18, 18, 13, 13, 17, 40, 13, 29, 18, 13, 2, 13, 17 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 29, 30 ], [ 29, 31 ], [ 14, 32 ], [ 32, 33 ], [ 32, 34 ], [ 14, 35 ], [ 35, 36 ], [ 36, 37 ], [ 14, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 53, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 67, 68 ], [ 60, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 75, 76 ], [ 60, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 60, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 53, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 102, 103 ], [ 103, 104 ], [ 96, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 111, 112 ], [ 96, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 96, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 89, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 125, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 138, 139 ], [ 139, 140 ], [ 132, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 144, 145 ], [ 143, 146 ], [ 146, 147 ], [ 147, 148 ], [ 132, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 151, 153 ], [ 132, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 125, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 165, 167 ], [ 14, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 168, 173 ], [ 173, 174 ], [ 174, 175 ], [ 12, 176 ], [ 176, 177 ], [ 0, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 180, 182 ], [ 178, 183 ], [ 183, 184 ], [ 183, 185 ], [ 178, 186 ], [ 186, 187 ], [ 186, 188 ], [ 178, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 193, 195 ], [ 178, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 178, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 207, 209 ], [ 209, 210 ], [ 209, 211 ], [ 178, 212 ], [ 212, 213 ], [ 212, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 215, 218 ], [ 218, 219 ], [ 219, 220 ], [ 220, 221 ], [ 221, 222 ], [ 221, 223 ], [ 219, 224 ], [ 214, 225 ], [ 225, 226 ], [ 214, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 227, 231 ], [ 212, 232 ], [ 232, 233 ], [ 178, 234 ], [ 234, 235 ], [ 234, 236 ], [ 236, 237 ], [ 237, 238 ], [ 238, 239 ], [ 237, 240 ], [ 240, 241 ], [ 241, 242 ], [ 242, 243 ], [ 243, 244 ], [ 243, 245 ], [ 241, 246 ], [ 236, 247 ], [ 247, 248 ], [ 236, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 252, 254 ] ]
[ "\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\nclass Main {\n\n\n public static void main(String args[]) throws IOException{\n\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String[] string = br.readLine().split(\" \");\n\t String[] formula = new String[ string.length ];\n\n\n\t Stack stack = new Stack();\n stack.initialize();\n\n\n for(int i = 0;i < string.length; i++){\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }\n\n\n System.out.println(stack.pop());\n }\n}\n\nclass Stack {\n\tint top = 0;\n int MAX = 200;\n String[] S = new String[200];\n\n\n\tvoid initialize(){\n top = 0;\n }\n\n boolean isEmpty(){\n \treturn top == 0;\n }\n\n\n boolean isFull(){\n \treturn top >= MAX - 1;\n }\n\n void push(String x ){\n\n \tif(isFull()){System.out.println(\"??¨??????\");}\n \ttop++;\n S[top] = x;\n\n }\n\n String pop(){\n \tif(isEmpty()){System.out.println(\"??¨??????\");}\n \ttop--;\n \treturn S[top+1];\n }\n\n\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "class Main {\n\n\n public static void main(String args[]) throws IOException{\n\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String[] string = br.readLine().split(\" \");\n\t String[] formula = new String[ string.length ];\n\n\n\t Stack stack = new Stack();\n stack.initialize();\n\n\n for(int i = 0;i < string.length; i++){\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }\n\n\n System.out.println(stack.pop());\n }\n}", "Main", "public static void main(String args[]) throws IOException{\n\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String[] string = br.readLine().split(\" \");\n\t String[] formula = new String[ string.length ];\n\n\n\t Stack stack = new Stack();\n stack.initialize();\n\n\n for(int i = 0;i < string.length; i++){\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }\n\n\n System.out.println(stack.pop());\n }", "main", "{\n\n\t BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t String[] string = br.readLine().split(\" \");\n\t String[] formula = new String[ string.length ];\n\n\n\t Stack stack = new Stack();\n stack.initialize();\n\n\n for(int i = 0;i < string.length; i++){\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }\n\n\n System.out.println(stack.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] string = br.readLine().split(\" \");", "string", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "String[] formula = new String[ string.length ];", "formula", "new String[ string.length ]", "string.length", "string", "string.length", "Stack stack = new Stack();", "stack", "new Stack()", "stack.initialize()", "stack.initialize", "stack", "for(int i = 0;i < string.length; i++){\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < string.length", "i", "string.length", "string", "string.length", "i++", "i++", "i", "{\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }", "{\n\n\n \t if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }\n }", "if( string[i].equals(\"+\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }\n \t else if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }", "string[i].equals(\"+\")", "string[i].equals", "string[i]", "string", "i", "\"+\"", "{\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n int result = x + y;\n stack.push( String.valueOf(result) );\n \t }", "int x = Integer.parseInt(stack.pop() );", "x", "Integer.parseInt(stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int y = Integer.parseInt(stack.pop() );", "y", "Integer.parseInt(stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int result = x + y;", "result", "x + y", "x", "y", "stack.push( String.valueOf(result) )", "stack.push", "stack", "String.valueOf(result)", "String.valueOf", "String", "result", "if( string[i].equals(\"-\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }\n \t else if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }", "string[i].equals(\"-\")", "string[i].equals", "string[i]", "string", "i", "\"-\"", "{\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = y - x;\n stack.push( String.valueOf(result) );\n\n \t }", "int x = Integer.parseInt(stack.pop() );", "x", "Integer.parseInt(stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int y = Integer.parseInt(stack.pop() );", "y", "Integer.parseInt(stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int result = y - x;", "result", "y - x", "y", "x", "stack.push( String.valueOf(result) )", "stack.push", "stack", "String.valueOf(result)", "String.valueOf", "String", "result", "if( string[i].equals(\"*\") ){\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }\n \t else{\n \t\t stack.push( string[i] );\n \t }", "string[i].equals(\"*\")", "string[i].equals", "string[i]", "string", "i", "\"*\"", "{\n \t\t int x = Integer.parseInt(stack.pop() );\n \t\t int y = Integer.parseInt(stack.pop() );\n \t\t int result = x * y;\n stack.push( String.valueOf(result) );\n \t }", "int x = Integer.parseInt(stack.pop() );", "x", "Integer.parseInt(stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int y = Integer.parseInt(stack.pop() );", "y", "Integer.parseInt(stack.pop() )", "Integer.parseInt", "Integer", "stack.pop()", "stack.pop", "stack", "int result = x * y;", "result", "x * y", "x", "y", "stack.push( String.valueOf(result) )", "stack.push", "stack", "String.valueOf(result)", "String.valueOf", "String", "result", "{\n \t\t stack.push( string[i] );\n \t }", "stack.push( string[i] )", "stack.push", "stack", "string[i]", "string", "i", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String args[]", "args", "class Stack {\n\tint top = 0;\n int MAX = 200;\n String[] S = new String[200];\n\n\n\tvoid initialize(){\n top = 0;\n }\n\n boolean isEmpty(){\n \treturn top == 0;\n }\n\n\n boolean isFull(){\n \treturn top >= MAX - 1;\n }\n\n void push(String x ){\n\n \tif(isFull()){System.out.println(\"??¨??????\");}\n \ttop++;\n S[top] = x;\n\n }\n\n String pop(){\n \tif(isEmpty()){System.out.println(\"??¨??????\");}\n \ttop--;\n \treturn S[top+1];\n }\n\n\n\n}", "Stack", "int top = 0;", "top", "0", "int MAX = 200;", "MAX", "200", "String[] S = new String[200];", "S", "new String[200]", "200", "void initialize(){\n top = 0;\n }", "initialize", "{\n top = 0;\n }", "top = 0", "top", "0", "boolean isEmpty(){\n \treturn top == 0;\n }", "isEmpty", "{\n \treturn top == 0;\n }", "return top == 0;", "top == 0", "top", "0", "boolean isFull(){\n \treturn top >= MAX - 1;\n }", "isFull", "{\n \treturn top >= MAX - 1;\n }", "return top >= MAX - 1;", "top >= MAX - 1", "top", "MAX - 1", "MAX", "1", "void push(String x ){\n\n \tif(isFull()){System.out.println(\"??¨??????\");}\n \ttop++;\n S[top] = x;\n\n }", "push", "{\n\n \tif(isFull()){System.out.println(\"??¨??????\");}\n \ttop++;\n S[top] = x;\n\n }", "if(isFull()){System.out.println(\"??¨??????\");}", "isFull()", "isFull", "{System.out.println(\"??¨??????\");}", "System.out.println(\"??¨??????\")", "System.out.println", "System.out", "System", "System.out", "\"??¨??????\"", "top++", "top", "S[top] = x", "S[top]", "S", "top", "x", "String x", "x", "String pop(){\n \tif(isEmpty()){System.out.println(\"??¨??????\");}\n \ttop--;\n \treturn S[top+1];\n }", "pop", "{\n \tif(isEmpty()){System.out.println(\"??¨??????\");}\n \ttop--;\n \treturn S[top+1];\n }", "if(isEmpty()){System.out.println(\"??¨??????\");}", "isEmpty()", "isEmpty", "{System.out.println(\"??¨??????\");}", "System.out.println(\"??¨??????\")", "System.out.println", "System.out", "System", "System.out", "\"??¨??????\"", "top--", "top", "return S[top+1];", "S[top+1]", "S", "top+1", "top", "1" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main { public static void main(String args[]) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] string = br.readLine().split(" "); String[] formula = new String[ string.length ]; Stack stack = new Stack(); stack.initialize(); for(int i = 0;i < string.length; i++){ if( string[i].equals("+") ){ int x = Integer.parseInt(stack.pop() ); int y = Integer.parseInt(stack.pop() ); int result = x + y; stack.push( String.valueOf(result) ); } else if( string[i].equals("-") ){ int x = Integer.parseInt(stack.pop() ); int y = Integer.parseInt(stack.pop() ); int result = y - x; stack.push( String.valueOf(result) ); } else if( string[i].equals("*") ){ int x = Integer.parseInt(stack.pop() ); int y = Integer.parseInt(stack.pop() ); int result = x * y; stack.push( String.valueOf(result) ); } else{ stack.push( string[i] ); } } System.out.println(stack.pop()); } } class Stack { int top = 0; int MAX = 200; String[] S = new String[200]; void initialize(){ top = 0; } boolean isEmpty(){ return top == 0; } boolean isFull(){ return top >= MAX - 1; } void push(String x ){ if(isFull()){System.out.println("??¨??????");} top++; S[top] = x; } String pop(){ if(isEmpty()){System.out.println("??¨??????");} top--; return S[top+1]; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 28, 13, 13, 30, 30, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 17, 0, 18, 36, 13, 20, 13, 23, 13, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 2, 13, 17, 12, 13, 30, 14, 4, 13, 30, 4, 18, 18, 13, 13, 2, 13, 17, 30, 0, 18, 13, 40, 13, 13, 23, 13, 12, 13, 30, 14, 4, 13, 30, 4, 18, 18, 13, 13, 17, 29, 17, 30, 40, 13, 29, 18, 18, 36, 13, 2, 13, 17 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 14, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 23, 26 ], [ 27, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 28, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 33, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 28, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 44, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 63, 64 ], [ 63, 65 ], [ 59, 66 ], [ 55, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 55, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 55, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 8, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 103, 104 ], [ 6, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 107, 111 ], [ 111, 112 ], [ 107, 113 ], [ 113, 114 ], [ 107, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 117, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 117, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 115, 134 ], [ 134, 135 ], [ 107, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 107, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 149, 151 ], [ 107, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 159, 164 ], [ 164, 165 ], [ 164, 166 ], [ 155, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 171, 172 ], [ 168, 173 ], [ 152, 174 ], [ 174, 175 ], [ 107, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 179, 182 ], [ 182, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 185, 187 ], [ 183, 188 ], [ 182, 189 ], [ 189, 190 ], [ 179, 191 ], [ 191, 192 ], [ 192, 193 ], [ 191, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 195, 199 ], [ 199, 200 ], [ 199, 201 ] ]
[ "import java.io.*;\nclass Main {\n public static void main(String...args)throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] formula = br.readLine().split(\" \");\n Stack stack = new Stack(formula.length);\n for(String element : formula) {\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }\n System.out.println(stack.pop());\n }\n}\nclass Stack {\n int maxLen;\n int point;\n int [] stackAry;\n public Stack(int maxLen) {\n this.maxLen = maxLen;\n this.point = 0;\n this.stackAry = new int[maxLen];\n }\n \n public boolean isEmpty() {\n return point == 0;\n }\n\n public boolean isFull() {\n return point >= maxLen-1;\n }\n\n public void push(int x) {\n if(isFull()) {\n System.out.println(x + \"はプッシュできません\");\n } else {\n stackAry[++point] = x;\n }\n }\n public int pop() {\n if(isEmpty()) {\n System.out.println(\"要素がからです\");\n return 0;\n } else {\n point--;\n return this.stackAry[point+1];\n }\n }\n}\n \n\n \n\n", "import java.io.*;", "io.*", "java", "class Main {\n public static void main(String...args)throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] formula = br.readLine().split(\" \");\n Stack stack = new Stack(formula.length);\n for(String element : formula) {\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }\n System.out.println(stack.pop());\n }\n}", "Main", "public static void main(String...args)throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] formula = br.readLine().split(\" \");\n Stack stack = new Stack(formula.length);\n for(String element : formula) {\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }\n System.out.println(stack.pop());\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] formula = br.readLine().split(\" \");\n Stack stack = new Stack(formula.length);\n for(String element : formula) {\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }\n System.out.println(stack.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] formula = br.readLine().split(\" \");", "formula", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "Stack stack = new Stack(formula.length);", "stack", "new Stack(formula.length)", "for(String element : formula) {\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }", "String element", "formula", "{\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }", "{\n if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }\n }", "if(element.matches(\"[0-9]*?\") ){\n int elem = Integer.parseInt(element);\n stack.push(elem);\n } else {\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }", "element.matches(\"[0-9]*?\")", "element.matches", "element", "\"[0-9]*?\"", "{\n int elem = Integer.parseInt(element);\n stack.push(elem);\n }", "int elem = Integer.parseInt(element);", "elem", "Integer.parseInt(element)", "Integer.parseInt", "Integer", "element", "stack.push(elem)", "stack.push", "stack", "elem", "{\n int left = stack.pop();\n int right = stack.pop();\n switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }\n }", "int left = stack.pop();", "left", "stack.pop()", "stack.pop", "stack", "int right = stack.pop();", "right", "stack.pop()", "stack.pop", "stack", "switch (element) {\n \n case \"+\":\n stack.push(right + left);\n break;\n case \"-\":\n stack.push(right - left);\n break;\n case \"*\":\n stack.push(right * left);\n break;\n case \"/\":\n stack.push(right / left);\n break;\n }", "element", "case \"+\":", "\"+\"", "case \"+\":", "stack.push(right + left)", "stack.push", "stack", "right + left", "right", "left", "break;", "case \"-\":", "\"-\"", "case \"-\":", "stack.push(right - left)", "stack.push", "stack", "right - left", "right", "left", "break;", "case \"*\":", "\"*\"", "case \"*\":", "stack.push(right * left)", "stack.push", "stack", "right * left", "right", "left", "break;", "case \"/\":", "\"/\"", "case \"/\":", "stack.push(right / left)", "stack.push", "stack", "right / left", "right", "left", "break;", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String...args", "args", "class Stack {\n int maxLen;\n int point;\n int [] stackAry;\n public Stack(int maxLen) {\n this.maxLen = maxLen;\n this.point = 0;\n this.stackAry = new int[maxLen];\n }\n \n public boolean isEmpty() {\n return point == 0;\n }\n\n public boolean isFull() {\n return point >= maxLen-1;\n }\n\n public void push(int x) {\n if(isFull()) {\n System.out.println(x + \"はプッシュできません\");\n } else {\n stackAry[++point] = x;\n }\n }\n public int pop() {\n if(isEmpty()) {\n System.out.println(\"要素がからです\");\n return 0;\n } else {\n point--;\n return this.stackAry[point+1];\n }\n }\n}", "Stack", "int maxLen;", "maxLen", "int point;", "point", "int [] stackAry;", "stackAry", "public Stack(int maxLen) {\n this.maxLen = maxLen;\n this.point = 0;\n this.stackAry = new int[maxLen];\n }", "Stack", "{\n this.maxLen = maxLen;\n this.point = 0;\n this.stackAry = new int[maxLen];\n }", "this.maxLen = maxLen", "this.maxLen", "this", "this.maxLen", "maxLen", "this.point = 0", "this.point", "this", "this.point", "0", "this.stackAry = new int[maxLen]", "this.stackAry", "this", "this.stackAry", "new int[maxLen]", "maxLen", "int maxLen", "maxLen", "public boolean isEmpty() {\n return point == 0;\n }", "isEmpty", "{\n return point == 0;\n }", "return point == 0;", "point == 0", "point", "0", "public boolean isFull() {\n return point >= maxLen-1;\n }", "isFull", "{\n return point >= maxLen-1;\n }", "return point >= maxLen-1;", "point >= maxLen-1", "point", "maxLen-1", "maxLen", "1", "public void push(int x) {\n if(isFull()) {\n System.out.println(x + \"はプッシュできません\");\n } else {\n stackAry[++point] = x;\n }\n }", "push", "{\n if(isFull()) {\n System.out.println(x + \"はプッシュできません\");\n } else {\n stackAry[++point] = x;\n }\n }", "if(isFull()) {\n System.out.println(x + \"はプッシュできません\");\n } else {\n stackAry[++point] = x;\n }", "isFull()", "isFull", "{\n System.out.println(x + \"はプッシュできません\");\n }", "System.out.println(x + \"はプッシュできません\")", "System.out.println", "System.out", "System", "System.out", "x + \"はプッシュできません\"", "x", "\"はプッシュできません\"", "{\n stackAry[++point] = x;\n }", "stackAry[++point] = x", "stackAry[++point]", "stackAry", "++point", "point", "x", "int x", "x", "public int pop() {\n if(isEmpty()) {\n System.out.println(\"要素がからです\");\n return 0;\n } else {\n point--;\n return this.stackAry[point+1];\n }\n }", "pop", "{\n if(isEmpty()) {\n System.out.println(\"要素がからです\");\n return 0;\n } else {\n point--;\n return this.stackAry[point+1];\n }\n }", "if(isEmpty()) {\n System.out.println(\"要素がからです\");\n return 0;\n } else {\n point--;\n return this.stackAry[point+1];\n }", "isEmpty()", "isEmpty", "{\n System.out.println(\"要素がからです\");\n return 0;\n }", "System.out.println(\"要素がからです\")", "System.out.println", "System.out", "System", "System.out", "\"要素がからです\"", "return 0;", "0", "{\n point--;\n return this.stackAry[point+1];\n }", "point--", "point", "return this.stackAry[point+1];", "this.stackAry[point+1]", "this.stackAry", "this", "this.stackAry", "point+1", "point", "1" ]
import java.io.*; class Main { public static void main(String...args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] formula = br.readLine().split(" "); Stack stack = new Stack(formula.length); for(String element : formula) { if(element.matches("[0-9]*?") ){ int elem = Integer.parseInt(element); stack.push(elem); } else { int left = stack.pop(); int right = stack.pop(); switch (element) { case "+": stack.push(right + left); break; case "-": stack.push(right - left); break; case "*": stack.push(right * left); break; case "/": stack.push(right / left); break; } } } System.out.println(stack.pop()); } } class Stack { int maxLen; int point; int [] stackAry; public Stack(int maxLen) { this.maxLen = maxLen; this.point = 0; this.stackAry = new int[maxLen]; } public boolean isEmpty() { return point == 0; } public boolean isFull() { return point >= maxLen-1; } public void push(int x) { if(isFull()) { System.out.println(x + "はプッシュできません"); } else { stackAry[++point] = x; } } public int pop() { if(isEmpty()) { System.out.println("要素がからです"); return 0; } else { point--; return this.stackAry[point+1]; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 18, 13, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 4, 18, 13, 4, 18, 13, 18, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 14, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 23, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 37, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 61, 63 ], [ 46, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 64, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 75, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 75, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 100, 103 ], [ 103, 104 ], [ 103, 105 ], [ 99, 106 ], [ 8, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 113, 114 ], [ 6, 115 ], [ 115, 116 ] ]
[ "import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString[] str = stdIn.nextLine().split(\" \");\n\t\tDeque<Integer> stack = new LinkedList<Integer>();\n\n\t\tfor (int i=0; i<str.length; i++) {\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack.poll());\n\t}\n}", "import java.util.*;", "util.*", "java", "class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString[] str = stdIn.nextLine().split(\" \");\n\t\tDeque<Integer> stack = new LinkedList<Integer>();\n\n\t\tfor (int i=0; i<str.length; i++) {\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack.poll());\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString[] str = stdIn.nextLine().split(\" \");\n\t\tDeque<Integer> stack = new LinkedList<Integer>();\n\n\t\tfor (int i=0; i<str.length; i++) {\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack.poll());\n\t}", "main", "{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString[] str = stdIn.nextLine().split(\" \");\n\t\tDeque<Integer> stack = new LinkedList<Integer>();\n\n\t\tfor (int i=0; i<str.length; i++) {\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(stack.poll());\n\t}", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "String[] str = stdIn.nextLine().split(\" \");", "str", "stdIn.nextLine().split(\" \")", "stdIn.nextLine().split", "stdIn.nextLine()", "stdIn.nextLine", "stdIn", "\" \"", "Deque<Integer> stack = new LinkedList<Integer>();", "stack", "new LinkedList<Integer>()", "for (int i=0; i<str.length; i++) {\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<str.length", "i", "str.length", "str", "str.length", "i++", "i++", "i", "{\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tchar c = str[i].charAt(0);\n\t\t\tif(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "char c = str[i].charAt(0);", "c", "str[i].charAt(0)", "str[i].charAt", "str[i]", "str", "i", "0", "if(c>='0' && c<='9'){\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}else {\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}", "c>='0' && c<='9'", "c>='0'", "c", "'0'", "c<='9'", "c", "'9'", "{\n\t\t\t\tstack.add(Integer.parseInt(str[i]));\n\t\t\t}", "stack.add(Integer.parseInt(str[i]))", "stack.add", "stack", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "{\n\t\t\t\tint x = stack.pollLast();\n\t\t\t\tint y = stack.pollLast();\n\t\t\t\tswitch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}\n\t\t\t}", "int x = stack.pollLast();", "x", "stack.pollLast()", "stack.pollLast", "stack", "int y = stack.pollLast();", "y", "stack.pollLast()", "stack.pollLast", "stack", "switch(c){\n\t\t\t\t\tcase '+':stack.add(x+y); break;\n\t\t\t\t\tcase '-':stack.add(y-x); break;\n\t\t\t\t\tcase '*':stack.add(x*y); break;\n\t\t\t\t}", "c", "case '+':", "'+'", "case '+':", "stack.add(x+y)", "stack.add", "stack", "x+y", "x", "y", "break;", "case '-':", "'-'", "case '-':", "stack.add(y-x)", "stack.add", "stack", "y-x", "y", "x", "break;", "case '*':", "'*'", "case '*':", "stack.add(x*y)", "stack.add", "stack", "x*y", "x", "y", "break;", "System.out.println(stack.poll())", "System.out.println", "System.out", "System", "System.out", "stack.poll()", "stack.poll", "stack", "String[] args", "args" ]
import java.util.*; class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); String[] str = stdIn.nextLine().split(" "); Deque<Integer> stack = new LinkedList<Integer>(); for (int i=0; i<str.length; i++) { char c = str[i].charAt(0); if(c>='0' && c<='9'){ stack.add(Integer.parseInt(str[i])); }else { int x = stack.pollLast(); int y = stack.pollLast(); switch(c){ case '+':stack.add(x+y); break; case '-':stack.add(y-x); break; case '*':stack.add(x*y); break; } } } System.out.println(stack.poll()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 14, 4, 18, 18, 13, 13, 17, 30, 0, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 40, 13, 4, 18, 18, 13, 13, 18, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 14, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 27, 37 ], [ 37, 38 ], [ 38, 39 ], [ 27, 40 ], [ 41, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 42, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 50, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 49, 61 ], [ 61, 62 ], [ 42, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 63, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 71, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 70, 82 ], [ 82, 83 ], [ 63, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 84, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 91, 103 ], [ 103, 104 ], [ 84, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 105, 116 ], [ 116, 117 ], [ 8, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 6, 126 ], [ 126, 127 ] ]
[ "import java.io.*;\n\nclass Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n String[] exp = br.readLine().split(\" \");\n int[] stack = new int[199];\n int top = 0;\n\n for (int i = 0; i < exp.length; i++) {\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }\n\n System.out.println(stack[0]);\n }\n}", "import java.io.*;", "io.*", "java", "class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n String[] exp = br.readLine().split(\" \");\n int[] stack = new int[199];\n int top = 0;\n\n for (int i = 0; i < exp.length; i++) {\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }\n\n System.out.println(stack[0]);\n }\n}", "Main", "public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n String[] exp = br.readLine().split(\" \");\n int[] stack = new int[199];\n int top = 0;\n\n for (int i = 0; i < exp.length; i++) {\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }\n\n System.out.println(stack[0]);\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n String[] exp = br.readLine().split(\" \");\n int[] stack = new int[199];\n int top = 0;\n\n for (int i = 0; i < exp.length; i++) {\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }\n\n System.out.println(stack[0]);\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] exp = br.readLine().split(\" \");", "exp", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int[] stack = new int[199];", "stack", "new int[199]", "199", "int top = 0;", "top", "0", "for (int i = 0; i < exp.length; i++) {\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < exp.length", "i", "exp.length", "exp", "exp.length", "i++", "i++", "i", "{\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }", "{\n if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }\n }", "if (exp[i].equals(\"+\")) {\n stack[top - 2] += stack[top - 1];\n top--;\n } else if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }", "exp[i].equals(\"+\")", "exp[i].equals", "exp[i]", "exp", "i", "\"+\"", "{\n stack[top - 2] += stack[top - 1];\n top--;\n }", "stack[top - 2] += stack[top - 1]", "stack[top - 2]", "stack", "top - 2", "top", "2", "stack[top - 1]", "stack", "top - 1", "top", "1", "top--", "top", "if (exp[i].equals(\"-\")) {\n stack[top - 2] -= stack[top - 1];\n top--;\n } else if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }", "exp[i].equals(\"-\")", "exp[i].equals", "exp[i]", "exp", "i", "\"-\"", "{\n stack[top - 2] -= stack[top - 1];\n top--;\n }", "stack[top - 2] -= stack[top - 1]", "stack[top - 2]", "stack", "top - 2", "top", "2", "stack[top - 1]", "stack", "top - 1", "top", "1", "top--", "top", "if (exp[i].equals(\"*\")) {\n stack[top - 2] *= stack[top - 1];\n top--;\n } else {\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }", "exp[i].equals(\"*\")", "exp[i].equals", "exp[i]", "exp", "i", "\"*\"", "{\n stack[top - 2] *= stack[top - 1];\n top--;\n }", "stack[top - 2] *= stack[top - 1]", "stack[top - 2]", "stack", "top - 2", "top", "2", "stack[top - 1]", "stack", "top - 1", "top", "1", "top--", "top", "{\n stack[top] = Integer.parseInt(exp[i]);\n top++;\n }", "stack[top] = Integer.parseInt(exp[i])", "stack[top]", "stack", "top", "Integer.parseInt(exp[i])", "Integer.parseInt", "Integer", "exp[i]", "exp", "i", "top++", "top", "System.out.println(stack[0])", "System.out.println", "System.out", "System", "System.out", "stack[0]", "stack", "0", "String[] args", "args" ]
import java.io.*; class Main { public static void main (String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] exp = br.readLine().split(" "); int[] stack = new int[199]; int top = 0; for (int i = 0; i < exp.length; i++) { if (exp[i].equals("+")) { stack[top - 2] += stack[top - 1]; top--; } else if (exp[i].equals("-")) { stack[top - 2] -= stack[top - 1]; top--; } else if (exp[i].equals("*")) { stack[top - 2] *= stack[top - 1]; top--; } else { stack[top] = Integer.parseInt(exp[i]); top++; } } System.out.println(stack[0]); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 11, 1, 0, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 14, 4, 18, 18, 13, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 9, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], [ 14, 15 ], [ 14, 16 ], [ 11, 17 ], [ 17, 18 ], [ 17, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 25, 30 ], [ 11, 31 ], [ 31, 32 ], [ 31, 33 ], [ 11, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 34, 44 ], [ 44, 45 ], [ 45, 46 ], [ 34, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 49, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 56, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 56, 73 ], [ 48, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 74, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 81, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 81, 98 ], [ 48, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 99, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 106, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 106, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 120, 121 ], [ 120, 122 ], [ 106, 123 ], [ 48, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 124, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 135, 136 ], [ 131, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 131, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 145, 146 ], [ 145, 147 ], [ 131, 148 ], [ 48, 149 ], [ 149, 150 ], [ 150, 151 ], [ 149, 152 ], [ 152, 153 ], [ 153, 154 ], [ 152, 155 ], [ 155, 156 ], [ 155, 157 ], [ 11, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 158, 163 ], [ 163, 164 ], [ 164, 165 ], [ 9, 166 ], [ 166, 167 ] ]
[ "import java.util.*;\nimport java.io.*;\nclass Main{\n public static void main(String args[]) throws IOException{\n\tint i,a=0,b=0;\n BufferedReader d = new BufferedReader(new InputStreamReader(System.in));\n String[] s = d.readLine().split(\" \");\n\tStack<Integer> stk = new Stack<Integer>();\n\t\n for (i=0;i<s.length;i++) {\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }\n System.out.println(stk.pop());\n }\n}\n\n\n", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "class Main{\n public static void main(String args[]) throws IOException{\n\tint i,a=0,b=0;\n BufferedReader d = new BufferedReader(new InputStreamReader(System.in));\n String[] s = d.readLine().split(\" \");\n\tStack<Integer> stk = new Stack<Integer>();\n\t\n for (i=0;i<s.length;i++) {\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }\n System.out.println(stk.pop());\n }\n}", "Main", "public static void main(String args[]) throws IOException{\n\tint i,a=0,b=0;\n BufferedReader d = new BufferedReader(new InputStreamReader(System.in));\n String[] s = d.readLine().split(\" \");\n\tStack<Integer> stk = new Stack<Integer>();\n\t\n for (i=0;i<s.length;i++) {\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }\n System.out.println(stk.pop());\n }", "main", "{\n\tint i,a=0,b=0;\n BufferedReader d = new BufferedReader(new InputStreamReader(System.in));\n String[] s = d.readLine().split(\" \");\n\tStack<Integer> stk = new Stack<Integer>();\n\t\n for (i=0;i<s.length;i++) {\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }\n System.out.println(stk.pop());\n }", "int i", "i", "a=0", "a", "0", "b=0;", "b", "0", "BufferedReader d = new BufferedReader(new InputStreamReader(System.in));", "d", "new BufferedReader(new InputStreamReader(System.in))", "String[] s = d.readLine().split(\" \");", "s", "d.readLine().split(\" \")", "d.readLine().split", "d.readLine()", "d.readLine", "d", "\" \"", "Stack<Integer> stk = new Stack<Integer>();", "stk", "new Stack<Integer>()", "for (i=0;i<s.length;i++) {\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }", "i=0;", "i=0", "i", "0", "i<s.length", "i", "s.length", "s", "s.length", "i++", "i++", "i", "{\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }", "{\n if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }\n if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }\n stk.push(Integer.parseInt(s[i]));\n }", "if (s[i].equals(\"+\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }", "s[i].equals(\"+\")", "s[i].equals", "s[i]", "s", "i", "\"+\"", "{\n a = stk.pop();\n b = stk.pop();\n stk.push(b + a);\n continue;\n }", "a = stk.pop()", "a", "stk.pop()", "stk.pop", "stk", "b = stk.pop()", "b", "stk.pop()", "stk.pop", "stk", "stk.push(b + a)", "stk.push", "stk", "b + a", "b", "a", "continue;", "if (s[i].equals(\"-\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }", "s[i].equals(\"-\")", "s[i].equals", "s[i]", "s", "i", "\"-\"", "{\n a = stk.pop();\n b = stk.pop();\n stk.push(b - a);\n continue;\n }", "a = stk.pop()", "a", "stk.pop()", "stk.pop", "stk", "b = stk.pop()", "b", "stk.pop()", "stk.pop", "stk", "stk.push(b - a)", "stk.push", "stk", "b - a", "b", "a", "continue;", "if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }", "s[i].equals(\"*\")", "s[i].equals", "s[i]", "s", "i", "\"*\"", "{\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }", "a = stk.pop()", "a", "stk.pop()", "stk.pop", "stk", "b = stk.pop()", "b", "stk.pop()", "stk.pop", "stk", "stk.push(b * a)", "stk.push", "stk", "b * a", "b", "a", "continue;", "if (s[i].equals(\"*\")) {\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }", "s[i].equals(\"*\")", "s[i].equals", "s[i]", "s", "i", "\"*\"", "{\n a = stk.pop();\n b = stk.pop();\n stk.push(b * a);\n continue;\n }", "a = stk.pop()", "a", "stk.pop()", "stk.pop", "stk", "b = stk.pop()", "b", "stk.pop()", "stk.pop", "stk", "stk.push(b * a)", "stk.push", "stk", "b * a", "b", "a", "continue;", "stk.push(Integer.parseInt(s[i]))", "stk.push", "stk", "Integer.parseInt(s[i])", "Integer.parseInt", "Integer", "s[i]", "s", "i", "System.out.println(stk.pop())", "System.out.println", "System.out", "System", "System.out", "stk.pop()", "stk.pop", "stk", "String args[]", "args" ]
import java.util.*; import java.io.*; class Main{ public static void main(String args[]) throws IOException{ int i,a=0,b=0; BufferedReader d = new BufferedReader(new InputStreamReader(System.in)); String[] s = d.readLine().split(" "); Stack<Integer> stk = new Stack<Integer>(); for (i=0;i<s.length;i++) { if (s[i].equals("+")) { a = stk.pop(); b = stk.pop(); stk.push(b + a); continue; } if (s[i].equals("-")) { a = stk.pop(); b = stk.pop(); stk.push(b - a); continue; } if (s[i].equals("*")) { a = stk.pop(); b = stk.pop(); stk.push(b * a); continue; } if (s[i].equals("*")) { a = stk.pop(); b = stk.pop(); stk.push(b * a); continue; } stk.push(Integer.parseInt(s[i])); } System.out.println(stk.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 41, 13, 28, 13, 13, 30, 30, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 17, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 155, 17 ], [ 155, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 20, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 34, 38 ], [ 20, 39 ], [ 39, 40 ], [ 20, 41 ], [ 41, 42 ], [ 20, 43 ], [ 43, 44 ], [ 43, 45 ], [ 43, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 48, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 53, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 48, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 70, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 75, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 70, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 92, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 97, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 97, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 92, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 114, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 119, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 119, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 133, 134 ], [ 133, 135 ], [ 114, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 137, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 20, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 144, 149 ], [ 149, 150 ], [ 150, 151 ], [ 18, 152 ], [ 152, 153 ], [ 0, 154 ], [ 154, 155 ], [ 154, 156 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n Deque<Long> stack = new ArrayDeque<>();\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n \n String s = buf.readLine();\n String[] splited = s.split(\" \", 0);\n \n //????????????????????¨??£?????????.(?¨?????????????second op first)??¨???\n long first;\n long second;\n for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }\n System.out.println(stack.removeFirst());\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "public class Main {\n \n public static void main(String[] args) throws IOException {\n Deque<Long> stack = new ArrayDeque<>();\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n \n String s = buf.readLine();\n String[] splited = s.split(\" \", 0);\n \n //????????????????????¨??£?????????.(?¨?????????????second op first)??¨???\n long first;\n long second;\n for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }\n System.out.println(stack.removeFirst());\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n Deque<Long> stack = new ArrayDeque<>();\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n \n String s = buf.readLine();\n String[] splited = s.split(\" \", 0);\n \n //????????????????????¨??£?????????.(?¨?????????????second op first)??¨???\n long first;\n long second;\n for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }\n System.out.println(stack.removeFirst());\n }", "main", "{\n Deque<Long> stack = new ArrayDeque<>();\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n \n String s = buf.readLine();\n String[] splited = s.split(\" \", 0);\n \n //????????????????????¨??£?????????.(?¨?????????????second op first)??¨???\n long first;\n long second;\n for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }\n System.out.println(stack.removeFirst());\n }", "Deque<Long> stack = new ArrayDeque<>();", "stack", "new ArrayDeque<>()", "BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));", "buf", "new BufferedReader(new InputStreamReader(System.in))", "String s = buf.readLine();", "s", "buf.readLine()", "buf.readLine", "buf", "String[] splited = s.split(\" \", 0);", "splited", "s.split(\" \", 0)", "s.split", "s", "\" \"", "0", "long first;", "first", "long second;", "second", "for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }", "String currentString", "splited", "{\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }", "{\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }", "if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }", "\"+\".equals(currentString)", "\"+\".equals", "\"+\"", "currentString", "{\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n }", "first = stack.removeFirst()", "first", "stack.removeFirst()", "stack.removeFirst", "stack", "second = stack.removeFirst()", "second", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst((second + first))", "stack.addFirst", "stack", "(second + first)", "second", "first", "if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }", "\"-\".equals(currentString)", "\"-\".equals", "\"-\"", "currentString", "{\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n }", "first = stack.removeFirst()", "first", "stack.removeFirst()", "stack.removeFirst", "stack", "second = stack.removeFirst()", "second", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst((second - first))", "stack.addFirst", "stack", "(second - first)", "second", "first", "if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }", "\"*\".equals(currentString)", "\"*\".equals", "\"*\"", "currentString", "{\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n }", "first = stack.removeFirst()", "first", "stack.removeFirst()", "stack.removeFirst", "stack", "second = stack.removeFirst()", "second", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst((second * first))", "stack.addFirst", "stack", "(second * first)", "second", "first", "if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }", "\"/\".equals(currentString)", "\"/\".equals", "\"/\"", "currentString", "{\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n }", "first = stack.removeFirst()", "first", "stack.removeFirst()", "stack.removeFirst", "stack", "second = stack.removeFirst()", "second", "stack.removeFirst()", "stack.removeFirst", "stack", "stack.addFirst((second / first))", "stack.addFirst", "stack", "(second / first)", "second", "first", "{\n stack.addFirst(Long.parseLong(currentString));\n }", "stack.addFirst(Long.parseLong(currentString))", "stack.addFirst", "stack", "Long.parseLong(currentString)", "Long.parseLong", "Long", "currentString", "System.out.println(stack.removeFirst())", "System.out.println", "System.out", "System", "System.out", "stack.removeFirst()", "stack.removeFirst", "stack", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) throws IOException {\n Deque<Long> stack = new ArrayDeque<>();\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n \n String s = buf.readLine();\n String[] splited = s.split(\" \", 0);\n \n //????????????????????¨??£?????????.(?¨?????????????second op first)??¨???\n long first;\n long second;\n for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }\n System.out.println(stack.removeFirst());\n }\n}", "public class Main {\n \n public static void main(String[] args) throws IOException {\n Deque<Long> stack = new ArrayDeque<>();\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n \n String s = buf.readLine();\n String[] splited = s.split(\" \", 0);\n \n //????????????????????¨??£?????????.(?¨?????????????second op first)??¨???\n long first;\n long second;\n for (String currentString : splited) {\n if (\"+\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second + first));\n } else if (\"-\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second - first)); \n } else if (\"*\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second * first)); \n } else if (\"/\".equals(currentString)) {\n first = stack.removeFirst();\n second = stack.removeFirst();\n stack.addFirst((second / first));\n } else {\n stack.addFirst(Long.parseLong(currentString));\n }\n }\n System.out.println(stack.removeFirst());\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; public class Main { public static void main(String[] args) throws IOException { Deque<Long> stack = new ArrayDeque<>(); BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); String s = buf.readLine(); String[] splited = s.split(" ", 0); //????????????????????¨??£?????????.(?¨?????????????second op first)??¨??? long first; long second; for (String currentString : splited) { if ("+".equals(currentString)) { first = stack.removeFirst(); second = stack.removeFirst(); stack.addFirst((second + first)); } else if ("-".equals(currentString)) { first = stack.removeFirst(); second = stack.removeFirst(); stack.addFirst((second - first)); } else if ("*".equals(currentString)) { first = stack.removeFirst(); second = stack.removeFirst(); stack.addFirst((second * first)); } else if ("/".equals(currentString)) { first = stack.removeFirst(); second = stack.removeFirst(); stack.addFirst((second / first)); } else { stack.addFirst(Long.parseLong(currentString)); } } System.out.println(stack.removeFirst()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 42, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 40, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 4, 18, 4, 18, 13, 13, 4, 18, 13, 17, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 4, 18, 13, 13, 4, 18, 13, 17, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 4, 18, 13, 13, 4, 18, 13, 17, 17, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 178, 5 ], [ 178, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 29, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 38, 39 ], [ 8, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 40, 50 ], [ 50, 51 ], [ 51, 52 ], [ 40, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 55, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 55, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 77, 78 ], [ 78, 79 ], [ 71, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 71, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 89, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 95, 99 ], [ 88, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 101, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 88, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 111, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 117, 121 ], [ 110, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 129, 131 ], [ 110, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 133, 139 ], [ 139, 140 ], [ 140, 141 ], [ 139, 142 ], [ 139, 143 ], [ 132, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 148, 149 ], [ 149, 150 ], [ 148, 151 ], [ 151, 152 ], [ 151, 153 ], [ 132, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 161, 162 ], [ 161, 163 ], [ 8, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 164, 169 ], [ 169, 170 ], [ 170, 171 ], [ 169, 172 ], [ 172, 173 ], [ 173, 174 ], [ 6, 175 ], [ 175, 176 ], [ 0, 177 ], [ 177, 178 ], [ 177, 179 ] ]
[ "import java.util.*;\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tStack<String> seq = new Stack<String>();\n\t\tString opers = \"+-/*\";\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tScanner out = new Scanner(System.in);\n\t\tString line = out.nextLine();\n\t\tScanner in = new Scanner(line);\n\t\twhile(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}\n\t\tfor(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Integer.valueOf(seq.pop()));\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tStack<String> seq = new Stack<String>();\n\t\tString opers = \"+-/*\";\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tScanner out = new Scanner(System.in);\n\t\tString line = out.nextLine();\n\t\tScanner in = new Scanner(line);\n\t\twhile(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}\n\t\tfor(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Integer.valueOf(seq.pop()));\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tStack<String> seq = new Stack<String>();\n\t\tString opers = \"+-/*\";\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tScanner out = new Scanner(System.in);\n\t\tString line = out.nextLine();\n\t\tScanner in = new Scanner(line);\n\t\twhile(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}\n\t\tfor(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Integer.valueOf(seq.pop()));\n\t}", "main", "{\n\t\tStack<String> seq = new Stack<String>();\n\t\tString opers = \"+-/*\";\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tScanner out = new Scanner(System.in);\n\t\tString line = out.nextLine();\n\t\tScanner in = new Scanner(line);\n\t\twhile(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}\n\t\tfor(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Integer.valueOf(seq.pop()));\n\t}", "Stack<String> seq = new Stack<String>();", "seq", "new Stack<String>()", "String opers = \"+-/*\";", "opers", "\"+-/*\"", "ArrayList<String> arr = new ArrayList<String>();", "arr", "new ArrayList<String>()", "Scanner out = new Scanner(System.in);", "out", "new Scanner(System.in)", "String line = out.nextLine();", "line", "out.nextLine()", "out.nextLine", "out", "Scanner in = new Scanner(line);", "in", "new Scanner(line)", "while(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}", "in.hasNext()", "in.hasNext", "in", "{\n\t\t\tarr.add(in.next());\n\t\t}", "arr.add(in.next())", "arr.add", "arr", "in.next()", "in.next", "in", "for(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < arr.size()", "i", "arr.size()", "arr.size", "arr", "i++", "i++", "i", "{\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "if(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}", "!opers.contains(arr.get(i))", "opers.contains(arr.get(i))", "opers.contains", "opers", "arr.get(i)", "arr.get", "arr", "i", "seq.push(arr.get(i))", "seq.push", "seq", "arr.get(i)", "arr.get", "arr", "i", "{\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}", "int num = Integer.valueOf(seq.pop());", "num", "Integer.valueOf(seq.pop())", "Integer.valueOf", "Integer", "seq.pop()", "seq.pop", "seq", "int num1 = Integer.valueOf(seq.pop());", "num1", "Integer.valueOf(seq.pop())", "Integer.valueOf", "Integer", "seq.pop()", "seq.pop", "seq", "if(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}", "arr.get(i).equals(opers.substring(0, 1))", "arr.get(i).equals", "arr.get(i)", "arr.get", "arr", "i", "opers.substring(0, 1)", "opers.substring", "opers", "0", "1", "{\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}", "seq.push(String.valueOf(num1 + num))", "seq.push", "seq", "String.valueOf(num1 + num)", "String.valueOf", "String", "num1 + num", "num1", "num", "if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}", "arr.get(i).equals(opers.substring(1, 2))", "arr.get(i).equals", "arr.get(i)", "arr.get", "arr", "i", "opers.substring(1, 2)", "opers.substring", "opers", "1", "2", "{\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}", "seq.push(String.valueOf(num1 - num))", "seq.push", "seq", "String.valueOf(num1 - num)", "String.valueOf", "String", "num1 - num", "num1", "num", "if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}", "arr.get(i).equals(opers.substring(2, 3))", "arr.get(i).equals", "arr.get(i)", "arr.get", "arr", "i", "opers.substring(2, 3)", "opers.substring", "opers", "2", "3", "{\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}", "seq.push(String.valueOf(num1 / num))", "seq.push", "seq", "String.valueOf(num1 / num)", "String.valueOf", "String", "num1 / num", "num1", "num", "{\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}", "seq.push(String.valueOf(num1 * num))", "seq.push", "seq", "String.valueOf(num1 * num)", "String.valueOf", "String", "num1 * num", "num1", "num", "System.out.println(Integer.valueOf(seq.pop()))", "System.out.println", "System.out", "System", "System.out", "Integer.valueOf(seq.pop())", "Integer.valueOf", "Integer", "seq.pop()", "seq.pop", "seq", "String[] args", "args", "public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tStack<String> seq = new Stack<String>();\n\t\tString opers = \"+-/*\";\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tScanner out = new Scanner(System.in);\n\t\tString line = out.nextLine();\n\t\tScanner in = new Scanner(line);\n\t\twhile(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}\n\t\tfor(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Integer.valueOf(seq.pop()));\n\t}\n\n}", "public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tStack<String> seq = new Stack<String>();\n\t\tString opers = \"+-/*\";\n\t\tArrayList<String> arr = new ArrayList<String>();\n\t\tScanner out = new Scanner(System.in);\n\t\tString line = out.nextLine();\n\t\tScanner in = new Scanner(line);\n\t\twhile(in.hasNext()) {\n\t\t\tarr.add(in.next());\n\t\t}\n\t\tfor(int i = 0; i < arr.size(); i++) {\n\t\t\tif(!opers.contains(arr.get(i))) seq.push(arr.get(i));\n\t\t\telse {\n\t\t\t\tint num = Integer.valueOf(seq.pop());\n\t\t\t\tint num1 = Integer.valueOf(seq.pop());\n\t\t\t\tif(arr.get(i).equals(opers.substring(0, 1))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 + num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(1, 2))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 - num));\n\t\t\t\t}\n\t\t\t\telse if(arr.get(i).equals(opers.substring(2, 3))) {\n\t\t\t\t\tseq.push(String.valueOf(num1 / num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tseq.push(String.valueOf(num1 * num));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(Integer.valueOf(seq.pop()));\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Stack<String> seq = new Stack<String>(); String opers = "+-/*"; ArrayList<String> arr = new ArrayList<String>(); Scanner out = new Scanner(System.in); String line = out.nextLine(); Scanner in = new Scanner(line); while(in.hasNext()) { arr.add(in.next()); } for(int i = 0; i < arr.size(); i++) { if(!opers.contains(arr.get(i))) seq.push(arr.get(i)); else { int num = Integer.valueOf(seq.pop()); int num1 = Integer.valueOf(seq.pop()); if(arr.get(i).equals(opers.substring(0, 1))) { seq.push(String.valueOf(num1 + num)); } else if(arr.get(i).equals(opers.substring(1, 2))) { seq.push(String.valueOf(num1 - num)); } else if(arr.get(i).equals(opers.substring(2, 3))) { seq.push(String.valueOf(num1 / num)); } else { seq.push(String.valueOf(num1 * num)); } } } System.out.println(Integer.valueOf(seq.pop())); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 13, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 4, 18, 13, 2, 13, 13, 3, 30, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 38, 5, 13, 30, 29, 17, 30, 4, 18, 13, 13, 29, 17, 23, 13, 12, 13, 30, 29, 2, 2, 4, 18, 13, 17, 4, 18, 13, 17, 4, 18, 13, 17, 23, 13, 6, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 4, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 29, 13, 12, 13, 30, 29, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 184, 11 ], [ 184, 12 ], [ 12, 13 ], [ 12, 14 ], [ 184, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 21, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 25, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 35, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 54, 56 ], [ 50, 57 ], [ 46, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 60, 67 ], [ 46, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 31, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 17, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 92, 93 ], [ 15, 94 ], [ 94, 95 ], [ 184, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 99, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 105, 110 ], [ 110, 111 ], [ 96, 112 ], [ 112, 113 ], [ 184, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 117, 118 ], [ 119, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 119, 128 ], [ 128, 129 ], [ 129, 130 ], [ 128, 131 ], [ 114, 132 ], [ 132, 133 ], [ 0, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 134, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 134, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 147, 150 ], [ 144, 151 ], [ 151, 152 ], [ 134, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 161, 162 ], [ 162, 163 ], [ 163, 164 ], [ 161, 165 ], [ 155, 166 ], [ 166, 167 ], [ 167, 168 ], [ 166, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 169, 173 ], [ 155, 174 ], [ 174, 175 ], [ 134, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 0, 183 ], [ 183, 184 ], [ 183, 185 ] ]
[ "import java.util.List;\nimport java.util.ArrayList;\n\nimport java.util.Scanner;\n\npublic class Main {\n private static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) {\n Stack<Integer> stack = new Stack<>();\n while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }\n \n System.out.println(stack.pop());\n }\n \n static boolean isNumber(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }\n }\n \n static boolean isOperand(String s) {\n return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");\n }\n}\n\nclass Stack<T> {\n private List<T> list;\n \n public Stack() {\n list = new ArrayList<>();\n }\n \n public void push(T t) {\n list.add(t);\n }\n \n public T pop() {\n T t = list.get(list.size()-1);\n list.remove(list.size()-1);\n return t;\n }\n \n public boolean isEmpty() {\n return list.isEmpty();\n }\n}", "import java.util.List;", "List", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n private static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) {\n Stack<Integer> stack = new Stack<>();\n while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }\n \n System.out.println(stack.pop());\n }\n \n static boolean isNumber(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }\n }\n \n static boolean isOperand(String s) {\n return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");\n }\n}", "Main", "private static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args) {\n Stack<Integer> stack = new Stack<>();\n while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }\n \n System.out.println(stack.pop());\n }", "main", "{\n Stack<Integer> stack = new Stack<>();\n while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }\n \n System.out.println(stack.pop());\n }", "Stack<Integer> stack = new Stack<>();", "stack", "new Stack<>()", "while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }", "isOperand(s)", "isOperand", "s", "{\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n }", "int a = stack.pop();", "a", "stack.pop()", "stack.pop", "stack", "int b = stack.pop();", "b", "stack.pop()", "stack.pop", "stack", "switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }", "s", "case \"+\":", "\"+\"", "case \"+\":", "stack.push(a+b)", "stack.push", "stack", "a+b", "a", "b", "break;", "case \"-\":", "\"-\"", "case \"-\":", "stack.push(b-a)", "stack.push", "stack", "b-a", "b", "a", "break;", "case \"*\":", "\"*\"", "case \"*\":", "stack.push(a*b)", "stack.push", "stack", "a*b", "a", "b", "break;", "{\n stack.push(Integer.parseInt(s));\n }", "stack.push(Integer.parseInt(s))", "stack.push", "stack", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "static boolean isNumber(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "isNumber", "{\n try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }", "catch (Exception e) {\n return false;\n }", "Exception e", "{\n return false;\n }", "return false;", "false", "{\n Integer.parseInt(s);\n return true;\n }", "Integer.parseInt(s)", "Integer.parseInt", "Integer", "s", "return true;", "true", "String s", "s", "static boolean isOperand(String s) {\n return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");\n }", "isOperand", "{\n return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");\n }", "return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");", "s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")", "s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\")", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "String s", "s", "class Stack<T> {\n private List<T> list;\n \n public Stack() {\n list = new ArrayList<>();\n }\n \n public void push(T t) {\n list.add(t);\n }\n \n public T pop() {\n T t = list.get(list.size()-1);\n list.remove(list.size()-1);\n return t;\n }\n \n public boolean isEmpty() {\n return list.isEmpty();\n }\n}", "Stack", "private List<T> list;", "list", "public Stack() {\n list = new ArrayList<>();\n }", "Stack", "{\n list = new ArrayList<>();\n }", "list = new ArrayList<>()", "list", "new ArrayList<>()", "public void push(T t) {\n list.add(t);\n }", "push", "{\n list.add(t);\n }", "list.add(t)", "list.add", "list", "t", "T t", "t", "public T pop() {\n T t = list.get(list.size()-1);\n list.remove(list.size()-1);\n return t;\n }", "pop", "{\n T t = list.get(list.size()-1);\n list.remove(list.size()-1);\n return t;\n }", "T t = list.get(list.size()-1);", "t", "list.get(list.size()-1)", "list.get", "list", "list.size()-1", "list.size()", "list.size", "list", "1", "list.remove(list.size()-1)", "list.remove", "list", "list.size()-1", "list.size()", "list.size", "list", "1", "return t;", "t", "public boolean isEmpty() {\n return list.isEmpty();\n }", "isEmpty", "{\n return list.isEmpty();\n }", "return list.isEmpty();", "list.isEmpty()", "list.isEmpty", "list", "public class Main {\n private static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) {\n Stack<Integer> stack = new Stack<>();\n while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }\n \n System.out.println(stack.pop());\n }\n \n static boolean isNumber(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }\n }\n \n static boolean isOperand(String s) {\n return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");\n }\n}", "public class Main {\n private static Scanner sc = new Scanner(System.in);\n public static void main(String[] args) {\n Stack<Integer> stack = new Stack<>();\n while (sc.hasNext()) {\n String s = sc.next();\n if (isOperand(s)) {\n int a = stack.pop();\n int b = stack.pop();\n switch(s) {\n case \"+\":\n stack.push(a+b);\n break;\n case \"-\":\n stack.push(b-a);\n break;\n case \"*\":\n stack.push(a*b);\n break;\n }\n } else {\n stack.push(Integer.parseInt(s));\n }\n }\n \n System.out.println(stack.pop());\n }\n \n static boolean isNumber(String s) {\n try {\n Integer.parseInt(s);\n return true;\n } catch (Exception e) {\n return false;\n }\n }\n \n static boolean isOperand(String s) {\n return s.equals(\"+\") || s.equals(\"-\") || s.equals(\"*\");\n }\n}", "Main" ]
import java.util.List; import java.util.ArrayList; import java.util.Scanner; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { Stack<Integer> stack = new Stack<>(); while (sc.hasNext()) { String s = sc.next(); if (isOperand(s)) { int a = stack.pop(); int b = stack.pop(); switch(s) { case "+": stack.push(a+b); break; case "-": stack.push(b-a); break; case "*": stack.push(a*b); break; } } else { stack.push(Integer.parseInt(s)); } } System.out.println(stack.pop()); } static boolean isNumber(String s) { try { Integer.parseInt(s); return true; } catch (Exception e) { return false; } } static boolean isOperand(String s) { return s.equals("+") || s.equals("-") || s.equals("*"); } } class Stack<T> { private List<T> list; public Stack() { list = new ArrayList<>(); } public void push(T t) { list.add(t); } public T pop() { T t = list.get(list.size()-1); list.remove(list.size()-1); return t; } public boolean isEmpty() { return list.isEmpty(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 4, 18, 20, 17, 41, 13, 20, 28, 13, 13, 30, 30, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 30, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 137, 8 ], [ 137, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 14, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 23, 26 ], [ 27, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 28, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 40, 41 ], [ 33, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 48, 49 ], [ 33, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 56, 58 ], [ 28, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 59, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 71, 72 ], [ 64, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 75, 78 ], [ 78, 79 ], [ 79, 80 ], [ 64, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 59, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 90, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 101, 102 ], [ 102, 103 ], [ 95, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 110, 111 ], [ 95, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 118, 120 ], [ 90, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 11, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 132, 133 ], [ 9, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.util.Scanner;\nimport java.util.Stack;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t String[] chars = new Scanner(System.in).nextLine().split(\" \");\n\t Stack<String> stack = new Stack<String>();\n\t for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }\n\t System.out.println(stack.pop());\n\t}\n\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Stack;", "Stack", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t String[] chars = new Scanner(System.in).nextLine().split(\" \");\n\t Stack<String> stack = new Stack<String>();\n\t for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }\n\t System.out.println(stack.pop());\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t String[] chars = new Scanner(System.in).nextLine().split(\" \");\n\t Stack<String> stack = new Stack<String>();\n\t for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }\n\t System.out.println(stack.pop());\n\t}", "main", "{\n\t String[] chars = new Scanner(System.in).nextLine().split(\" \");\n\t Stack<String> stack = new Stack<String>();\n\t for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }\n\t System.out.println(stack.pop());\n\t}", "String[] chars = new Scanner(System.in).nextLine().split(\" \");", "chars", "new Scanner(System.in).nextLine().split(\" \")", "new Scanner(System.in).nextLine().split", "new Scanner(System.in).nextLine()", "new Scanner(System.in).nextLine", "new Scanner(System.in)", "\" \"", "Stack<String> stack = new Stack<String>();", "stack", "new Stack<String>()", "for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }", "String s", "chars", "{\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }", "{\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }", "if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }", "int b = Integer.valueOf(stack.pop())", "b", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "a = Integer.valueOf(stack.pop());", "a", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(Integer.toString(a+b))", "stack.push", "stack", "Integer.toString(a+b)", "Integer.toString", "Integer", "a+b", "a", "b", "if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }", "int b = Integer.valueOf(stack.pop())", "b", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "a = Integer.valueOf(stack.pop());", "a", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(Integer.toString(a-b))", "stack.push", "stack", "Integer.toString(a-b)", "Integer.toString", "Integer", "a-b", "a", "b", "if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }", "int b = Integer.valueOf(stack.pop())", "b", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "a = Integer.valueOf(stack.pop());", "a", "Integer.valueOf(stack.pop())", "Integer.valueOf", "Integer", "stack.pop()", "stack.pop", "stack", "stack.push(Integer.toString(a*b))", "stack.push", "stack", "Integer.toString(a*b)", "Integer.toString", "Integer", "a*b", "a", "b", "{\n\t \t\t stack.push(s);\n\t \t }", "stack.push(s)", "stack.push", "stack", "s", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t String[] chars = new Scanner(System.in).nextLine().split(\" \");\n\t Stack<String> stack = new Stack<String>();\n\t for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }\n\t System.out.println(stack.pop());\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t String[] chars = new Scanner(System.in).nextLine().split(\" \");\n\t Stack<String> stack = new Stack<String>();\n\t for(String s: chars) {\n\t \t if(s.equals(\"+\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a+b));\n\t \t }\n\t \t else if(s.equals(\"-\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a-b));\n\t \t }\n\t \t else if(s.equals(\"*\")) {\n\t \t\t int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop());\n\t \t\t stack.push(Integer.toString(a*b));\n\t \t }\n\t \t else {\n\t \t\t stack.push(s);\n\t \t }\n\t }\n\t System.out.println(stack.pop());\n\t}\n\n}", "Main" ]
import java.util.Scanner; import java.util.Stack; public class Main { public static void main(String[] args) { String[] chars = new Scanner(System.in).nextLine().split(" "); Stack<String> stack = new Stack<String>(); for(String s: chars) { if(s.equals("+")) { int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop()); stack.push(Integer.toString(a+b)); } else if(s.equals("-")) { int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop()); stack.push(Integer.toString(a-b)); } else if(s.equals("*")) { int b = Integer.valueOf(stack.pop()), a = Integer.valueOf(stack.pop()); stack.push(Integer.toString(a*b)); } else { stack.push(s); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 4, 18, 13, 0, 13, 4, 18, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 35, 18, 13, 13, 34, 17, 1, 0, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 0, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 0, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 0, 13, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 4, 18, 13, 17, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 18, 13, 13, 3, 4, 18, 18, 13, 13, 4, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 219, 5 ], [ 219, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 20, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 8, 29 ], [ 29, 30 ], [ 29, 31 ], [ 8, 32 ], [ 32, 33 ], [ 32, 34 ], [ 8, 35 ], [ 35, 36 ], [ 35, 37 ], [ 8, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 65, 69 ], [ 59, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 73, 77 ], [ 59, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 80, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 83, 87 ], [ 59, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 91, 95 ], [ 59, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 59, 102 ], [ 53, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 111, 115 ], [ 105, 116 ], [ 116, 117 ], [ 117, 118 ], [ 116, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 119, 123 ], [ 105, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 129, 133 ], [ 105, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 137, 141 ], [ 105, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 145, 146 ], [ 145, 147 ], [ 105, 148 ], [ 53, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 157, 161 ], [ 151, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 165, 169 ], [ 151, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 172, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 175, 179 ], [ 151, 180 ], [ 180, 181 ], [ 181, 182 ], [ 180, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 183, 187 ], [ 151, 188 ], [ 188, 189 ], [ 189, 190 ], [ 188, 191 ], [ 191, 192 ], [ 191, 193 ], [ 151, 194 ], [ 53, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 198, 199 ], [ 197, 200 ], [ 200, 201 ], [ 201, 202 ], [ 200, 203 ], [ 203, 204 ], [ 203, 205 ], [ 196, 206 ], [ 8, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 207, 212 ], [ 212, 213 ], [ 213, 214 ], [ 212, 215 ], [ 6, 216 ], [ 216, 217 ], [ 0, 218 ], [ 218, 219 ], [ 218, 220 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] linesp = new String[line.length()];\n linesp=line.split(\" \");\n \n ArrayList<Integer> figure = new ArrayList<Integer>();\n int save1=0;\n int save2=0;\n \n for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }\n \n System.out.println(figure.get(0));\n \n } \n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] linesp = new String[line.length()];\n linesp=line.split(\" \");\n \n ArrayList<Integer> figure = new ArrayList<Integer>();\n int save1=0;\n int save2=0;\n \n for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }\n \n System.out.println(figure.get(0));\n \n } \n}", "Main", "public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] linesp = new String[line.length()];\n linesp=line.split(\" \");\n \n ArrayList<Integer> figure = new ArrayList<Integer>();\n int save1=0;\n int save2=0;\n \n for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }\n \n System.out.println(figure.get(0));\n \n }", "main", "{\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] linesp = new String[line.length()];\n linesp=line.split(\" \");\n \n ArrayList<Integer> figure = new ArrayList<Integer>();\n int save1=0;\n int save2=0;\n \n for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }\n \n System.out.println(figure.get(0));\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] linesp = new String[line.length()];", "linesp", "new String[line.length()]", "line.length()", "line.length", "line", "linesp=line.split(\" \")", "linesp", "line.split(\" \")", "line.split", "line", "\" \"", "ArrayList<Integer> figure = new ArrayList<Integer>();", "figure", "new ArrayList<Integer>()", "int save1=0;", "save1", "0", "int save2=0;", "save2", "0", "for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }", "int i=0;", "int i=0;", "i", "0", "i<linesp.length", "i", "linesp.length", "linesp", "linesp.length", "i++", "i++", "i", "{ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }", "{ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }", "switch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}", "linesp[i]", "linesp", "i", "case \"+\":", "\"+\"", "case \"+\":", "save1=figure.get(figure.size()-1)", "save1", "figure.get(figure.size()-1)", "figure.get", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.remove(figure.size()-1)", "figure.remove", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "save2=figure.get(figure.size()-1)", "save2", "figure.get(figure.size()-1)", "figure.get", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.remove(figure.size()-1)", "figure.remove", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.add(save1+save2)", "figure.add", "figure", "save1+save2", "save1", "save2", "break;", "case \"-\":", "\"-\"", "case \"-\":", "save1=figure.get(figure.size()-1)", "save1", "figure.get(figure.size()-1)", "figure.get", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.remove(figure.size()-1)", "figure.remove", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "save2=figure.get(figure.size()-1)", "save2", "figure.get(figure.size()-1)", "figure.get", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.remove(figure.size()-1)", "figure.remove", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.add(save2-save1)", "figure.add", "figure", "save2-save1", "save2", "save1", "break;", "case \"*\":", "\"*\"", "case \"*\":", "save1=figure.get(figure.size()-1)", "save1", "figure.get(figure.size()-1)", "figure.get", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.remove(figure.size()-1)", "figure.remove", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "save2=figure.get(figure.size()-1)", "save2", "figure.get(figure.size()-1)", "figure.get", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.remove(figure.size()-1)", "figure.remove", "figure", "figure.size()-1", "figure.size()", "figure.size", "figure", "1", "figure.add(save1*save2)", "figure.add", "figure", "save1*save2", "save1", "save2", "break;", "default:", "default:", "figure.add(Integer.parseInt(linesp[i]))", "figure.add", "figure", "Integer.parseInt(linesp[i])", "Integer.parseInt", "Integer", "linesp[i]", "linesp", "i", "break;", "System.out.println(figure.get(0))", "System.out.println", "System.out", "System", "System.out", "figure.get(0)", "figure.get", "figure", "0", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] linesp = new String[line.length()];\n linesp=line.split(\" \");\n \n ArrayList<Integer> figure = new ArrayList<Integer>();\n int save1=0;\n int save2=0;\n \n for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }\n \n System.out.println(figure.get(0));\n \n } \n}", "public class Main {\n public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n String line = sc.nextLine();\n String[] linesp = new String[line.length()];\n linesp=line.split(\" \");\n \n ArrayList<Integer> figure = new ArrayList<Integer>();\n int save1=0;\n int save2=0;\n \n for(int i=0;i<linesp.length;i++){ \t\n \tswitch(linesp[i]){\n \tcase \"+\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t figure.add(save1+save2);\n \t\tbreak;\n \tcase \"-\":save1=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t save2=figure.get(figure.size()-1);\n\t\t\t\t\t figure.remove(figure.size()-1);\n\t\t\t\t\t figure.add(save2-save1);\n \t\tbreak; \t\n \tcase \"*\":save1=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t save2=figure.get(figure.size()-1);\n\t\t\t \t\t figure.remove(figure.size()-1);\n\t\t\t \t\t figure.add(save1*save2);\n \tbreak;\n \tdefault:figure.add(Integer.parseInt(linesp[i]));\n \t\t\tbreak;\n \t}\n }\n \n System.out.println(figure.get(0));\n \n } \n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String line = sc.nextLine(); String[] linesp = new String[line.length()]; linesp=line.split(" "); ArrayList<Integer> figure = new ArrayList<Integer>(); int save1=0; int save2=0; for(int i=0;i<linesp.length;i++){ switch(linesp[i]){ case "+":save1=figure.get(figure.size()-1); figure.remove(figure.size()-1); save2=figure.get(figure.size()-1); figure.remove(figure.size()-1); figure.add(save1+save2); break; case "-":save1=figure.get(figure.size()-1); figure.remove(figure.size()-1); save2=figure.get(figure.size()-1); figure.remove(figure.size()-1); figure.add(save2-save1); break; case "*":save1=figure.get(figure.size()-1); figure.remove(figure.size()-1); save2=figure.get(figure.size()-1); figure.remove(figure.size()-1); figure.add(save1*save2); break; default:figure.add(Integer.parseInt(linesp[i])); break; } } System.out.println(figure.get(0)); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 13, 20, 13, 23, 13, 12, 13, 30, 0, 13, 17, 12, 13, 30, 29, 2, 13, 17, 12, 13, 30, 29, 2, 13, 2, 13, 17, 12, 13, 30, 14, 4, 13, 30, 37, 20, 40, 13, 0, 18, 13, 18, 36, 13, 13, 23, 13, 12, 13, 30, 14, 4, 13, 30, 37, 20, 40, 13, 29, 18, 13, 2, 18, 36, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 4, 18, 13, 42, 4, 18, 13, 30, 14, 4, 18, 13, 30, 4, 18, 13, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 40, 4, 18, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 13, 2, 4, 18, 13, 4, 18, 13, 30, 37, 20, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 4, 8 ], [ 8, 9 ], [ 4, 10 ], [ 10, 11 ], [ 4, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 12, 24 ], [ 24, 25 ], [ 4, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 4, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 4, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 4, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 54, 55 ], [ 55, 56 ], [ 50, 57 ], [ 57, 58 ], [ 50, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 59, 65 ], [ 48, 66 ], [ 66, 67 ], [ 4, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 71, 74 ], [ 74, 75 ], [ 75, 76 ], [ 70, 77 ], [ 77, 78 ], [ 70, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 0, 87 ], [ 189, 88 ], [ 189, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 98, 99 ], [ 99, 100 ], [ 91, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 101, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 106, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 114, 115 ], [ 115, 116 ], [ 106, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 117, 123 ], [ 123, 124 ], [ 117, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 125, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 133, 137 ], [ 137, 138 ], [ 138, 139 ], [ 125, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 140, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 148, 153 ], [ 153, 154 ], [ 154, 155 ], [ 140, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 156, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 164, 168 ], [ 168, 169 ], [ 169, 170 ], [ 156, 171 ], [ 171, 172 ], [ 172, 173 ], [ 117, 174 ], [ 174, 175 ], [ 175, 176 ], [ 174, 177 ], [ 91, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 178, 183 ], [ 183, 184 ], [ 184, 185 ], [ 89, 186 ], [ 186, 187 ], [ 0, 188 ], [ 188, 189 ], [ 188, 190 ] ]
[ "import java.util.*;\n\nclass IntStack {\n int[] arr;\n int top;\n int MAX;\n\n public IntStack(int max) {\n this.MAX = max;\n arr = new int[max];\n }\n\n void initialize() {\n top = 0;\n }\n\n boolean isEmpty() {\n return top == 0;\n }\n\n boolean isFull() {\n return top >= MAX - 1;\n }\n\n void push(int x) {\n if (isFull()) {\n throw new RuntimeException(\"オーバーフロー\");\n }\n top++;\n arr[this.top] = x;\n }\n\n int pop() {\n if (isEmpty()) {\n throw new RuntimeException(\"アンダーフロー\");\n }\n top--;\n return arr[this.top + 1];\n }\n}\n\npublic class Main {\n \n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n IntStack stack = new IntStack(200);\n stack.initialize();\n\n while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "import java.util.*;", "util.*", "java", "class IntStack {\n int[] arr;\n int top;\n int MAX;\n\n public IntStack(int max) {\n this.MAX = max;\n arr = new int[max];\n }\n\n void initialize() {\n top = 0;\n }\n\n boolean isEmpty() {\n return top == 0;\n }\n\n boolean isFull() {\n return top >= MAX - 1;\n }\n\n void push(int x) {\n if (isFull()) {\n throw new RuntimeException(\"オーバーフロー\");\n }\n top++;\n arr[this.top] = x;\n }\n\n int pop() {\n if (isEmpty()) {\n throw new RuntimeException(\"アンダーフロー\");\n }\n top--;\n return arr[this.top + 1];\n }\n}", "IntStack", "int[] arr;", "arr", "int top;", "top", "int MAX;", "MAX", "public IntStack(int max) {\n this.MAX = max;\n arr = new int[max];\n }", "IntStack", "{\n this.MAX = max;\n arr = new int[max];\n }", "this.MAX = max", "this.MAX", "this", "this.MAX", "max", "arr = new int[max]", "arr", "new int[max]", "max", "int max", "max", "void initialize() {\n top = 0;\n }", "initialize", "{\n top = 0;\n }", "top = 0", "top", "0", "boolean isEmpty() {\n return top == 0;\n }", "isEmpty", "{\n return top == 0;\n }", "return top == 0;", "top == 0", "top", "0", "boolean isFull() {\n return top >= MAX - 1;\n }", "isFull", "{\n return top >= MAX - 1;\n }", "return top >= MAX - 1;", "top >= MAX - 1", "top", "MAX - 1", "MAX", "1", "void push(int x) {\n if (isFull()) {\n throw new RuntimeException(\"オーバーフロー\");\n }\n top++;\n arr[this.top] = x;\n }", "push", "{\n if (isFull()) {\n throw new RuntimeException(\"オーバーフロー\");\n }\n top++;\n arr[this.top] = x;\n }", "if (isFull()) {\n throw new RuntimeException(\"オーバーフロー\");\n }", "isFull()", "isFull", "{\n throw new RuntimeException(\"オーバーフロー\");\n }", "throw new RuntimeException(\"オーバーフロー\");", "new RuntimeException(\"オーバーフロー\")", "top++", "top", "arr[this.top] = x", "arr[this.top]", "arr", "this.top", "this", "this.top", "x", "int x", "x", "int pop() {\n if (isEmpty()) {\n throw new RuntimeException(\"アンダーフロー\");\n }\n top--;\n return arr[this.top + 1];\n }", "pop", "{\n if (isEmpty()) {\n throw new RuntimeException(\"アンダーフロー\");\n }\n top--;\n return arr[this.top + 1];\n }", "if (isEmpty()) {\n throw new RuntimeException(\"アンダーフロー\");\n }", "isEmpty()", "isEmpty", "{\n throw new RuntimeException(\"アンダーフロー\");\n }", "throw new RuntimeException(\"アンダーフロー\");", "new RuntimeException(\"アンダーフロー\")", "top--", "top", "return arr[this.top + 1];", "arr[this.top + 1]", "arr", "this.top + 1", "this.top", "this", "this.top", "1", "public class Main {\n \n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n IntStack stack = new IntStack(200);\n stack.initialize();\n\n while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "Main", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n IntStack stack = new IntStack(200);\n stack.initialize();\n\n while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }\n\n System.out.println(stack.pop());\n }", "main", "{\n\n Scanner sc = new Scanner(System.in);\n IntStack stack = new IntStack(200);\n stack.initialize();\n\n while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }\n\n System.out.println(stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "IntStack stack = new IntStack(200);", "stack", "new IntStack(200)", "stack.initialize()", "stack.initialize", "stack", "while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }", "sc.hasNext()", "sc.hasNext", "sc", "{\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }", "if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }", "sc.hasNextInt()", "sc.hasNextInt", "sc", "{\n stack.push(sc.nextInt());\n }", "stack.push(sc.nextInt())", "stack.push", "stack", "sc.nextInt()", "sc.nextInt", "sc", "{\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }", "String s = sc.next();", "s", "sc.next()", "sc.next", "sc", "int res;", "res", "if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }", "s.equals(\"+\")", "s.equals", "s", "\"+\"", "{\n res = stack.pop() + stack.pop();\n }", "res = stack.pop() + stack.pop()", "res", "stack.pop() + stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }", "s.equals(\"-\")", "s.equals", "s", "\"-\"", "{\n res = - stack.pop() + stack.pop();\n }", "res = - stack.pop() + stack.pop()", "res", "- stack.pop() + stack.pop()", "- stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }", "s.equals(\"*\")", "s.equals", "s", "\"*\"", "{\n res = stack.pop() * stack.pop();\n }", "res = stack.pop() * stack.pop()", "res", "stack.pop() * stack.pop()", "stack.pop()", "stack.pop", "stack", "stack.pop()", "stack.pop", "stack", "{\n throw new RuntimeException(\"hoge\");\n }", "throw new RuntimeException(\"hoge\");", "new RuntimeException(\"hoge\")", "stack.push(res)", "stack.push", "stack", "res", "System.out.println(stack.pop())", "System.out.println", "System.out", "System", "System.out", "stack.pop()", "stack.pop", "stack", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n IntStack stack = new IntStack(200);\n stack.initialize();\n\n while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "public class Main {\n \n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n IntStack stack = new IntStack(200);\n stack.initialize();\n\n while (sc.hasNext()) {\n if (sc.hasNextInt()) {\n stack.push(sc.nextInt());\n } else {\n String s = sc.next();\n int res;\n if (s.equals(\"+\")) {\n res = stack.pop() + stack.pop();\n } else if (s.equals(\"-\")) {\n res = - stack.pop() + stack.pop();\n } else if (s.equals(\"*\")) {\n res = stack.pop() * stack.pop();\n } else {\n throw new RuntimeException(\"hoge\");\n }\n stack.push(res);\n }\n }\n\n System.out.println(stack.pop());\n }\n}", "Main" ]
import java.util.*; class IntStack { int[] arr; int top; int MAX; public IntStack(int max) { this.MAX = max; arr = new int[max]; } void initialize() { top = 0; } boolean isEmpty() { return top == 0; } boolean isFull() { return top >= MAX - 1; } void push(int x) { if (isFull()) { throw new RuntimeException("オーバーフロー"); } top++; arr[this.top] = x; } int pop() { if (isEmpty()) { throw new RuntimeException("アンダーフロー"); } top--; return arr[this.top + 1]; } } public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); IntStack stack = new IntStack(200); stack.initialize(); while (sc.hasNext()) { if (sc.hasNextInt()) { stack.push(sc.nextInt()); } else { String s = sc.next(); int res; if (s.equals("+")) { res = stack.pop() + stack.pop(); } else if (s.equals("-")) { res = - stack.pop() + stack.pop(); } else if (s.equals("*")) { res = stack.pop() * stack.pop(); } else { throw new RuntimeException("hoge"); } stack.push(res); } } System.out.println(stack.pop()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 17, 41, 13, 17, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 14, 4, 18, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 14, 4, 18, 13, 17, 30, 0, 18, 13, 2, 13, 17, 2, 18, 13, 2, 13, 17, 18, 13, 2, 13, 17, 40, 13, 30, 41, 13, 4, 18, 13, 13, 0, 18, 13, 40, 13, 13, 4, 18, 18, 13, 13, 18, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 138, 5 ], [ 138, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 6, 17 ], [ 17, 18 ], [ 138, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 21, 26 ], [ 26, 27 ], [ 26, 28 ], [ 21, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 29, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 33, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 39, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 45, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 51, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 44, 62 ], [ 62, 63 ], [ 39, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 64, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 70, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 76, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 69, 87 ], [ 87, 88 ], [ 64, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 89, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 101, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 94, 112 ], [ 112, 113 ], [ 89, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 117, 120 ], [ 114, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 121, 126 ], [ 21, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 132, 133 ], [ 132, 134 ], [ 19, 135 ], [ 135, 136 ], [ 0, 137 ], [ 137, 138 ], [ 137, 139 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n int[] stack = new int[200];\n int idx = 0;\n while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }\n System.out.println(stack[0]);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n int[] stack = new int[200];\n int idx = 0;\n while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }\n System.out.println(stack[0]);\n }\n}", "Main", "public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }", "main", "{\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }", "try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }", "{\n solve(in);\n }", "Scanner in = new Scanner(System.in)", "Scanner in = new Scanner(System.in)", "new Scanner(System.in)", "solve(in)", "solve", "in", "String[] args", "args", "private static void solve(Scanner in) {\n int[] stack = new int[200];\n int idx = 0;\n while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }\n System.out.println(stack[0]);\n }", "solve", "{\n int[] stack = new int[200];\n int idx = 0;\n while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }\n System.out.println(stack[0]);\n }", "int[] stack = new int[200];", "stack", "new int[200]", "200", "int idx = 0;", "idx", "0", "while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }", "in.hasNext()", "in.hasNext", "in", "{\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }", "String next = in.next();", "next", "in.next()", "in.next", "in", "if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }", "next.equals(\"+\")", "next.equals", "next", "\"+\"", "{\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n }", "stack[idx - 2] = stack[idx - 2] + stack[idx - 1]", "stack[idx - 2]", "stack", "idx - 2", "idx", "2", "stack[idx - 2] + stack[idx - 1]", "stack[idx - 2]", "stack", "idx - 2", "idx", "2", "stack[idx - 1]", "stack", "idx - 1", "idx", "1", "idx--", "idx", "if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }", "next.equals(\"-\")", "next.equals", "next", "\"-\"", "{\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n }", "stack[idx - 2] = stack[idx - 2] - stack[idx - 1]", "stack[idx - 2]", "stack", "idx - 2", "idx", "2", "stack[idx - 2] - stack[idx - 1]", "stack[idx - 2]", "stack", "idx - 2", "idx", "2", "stack[idx - 1]", "stack", "idx - 1", "idx", "1", "idx--", "idx", "if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }", "next.equals(\"*\")", "next.equals", "next", "\"*\"", "{\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n }", "stack[idx - 2] = stack[idx - 2] * stack[idx - 1]", "stack[idx - 2]", "stack", "idx - 2", "idx", "2", "stack[idx - 2] * stack[idx - 1]", "stack[idx - 2]", "stack", "idx - 2", "idx", "2", "stack[idx - 1]", "stack", "idx - 1", "idx", "1", "idx--", "idx", "{\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }", "int n = Integer.valueOf(next);", "n", "Integer.valueOf(next)", "Integer.valueOf", "Integer", "next", "stack[idx++] = n", "stack[idx++]", "stack", "idx++", "idx", "n", "System.out.println(stack[0])", "System.out.println", "System.out", "System", "System.out", "stack[0]", "stack", "0", "Scanner in", "in", "public class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n int[] stack = new int[200];\n int idx = 0;\n while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }\n System.out.println(stack[0]);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n int[] stack = new int[200];\n int idx = 0;\n while (in.hasNext()) {\n String next = in.next();\n if (next.equals(\"+\")) {\n stack[idx - 2] = stack[idx - 2] + stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"-\")) {\n stack[idx - 2] = stack[idx - 2] - stack[idx - 1];\n idx--;\n\n } else if (next.equals(\"*\")) {\n stack[idx - 2] = stack[idx - 2] * stack[idx - 1];\n idx--;\n\n } else {\n int n = Integer.valueOf(next);\n stack[idx++] = n;\n }\n }\n System.out.println(stack[0]);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { try (Scanner in = new Scanner(System.in)) { solve(in); } } private static void solve(Scanner in) { int[] stack = new int[200]; int idx = 0; while (in.hasNext()) { String next = in.next(); if (next.equals("+")) { stack[idx - 2] = stack[idx - 2] + stack[idx - 1]; idx--; } else if (next.equals("-")) { stack[idx - 2] = stack[idx - 2] - stack[idx - 1]; idx--; } else if (next.equals("*")) { stack[idx - 2] = stack[idx - 2] * stack[idx - 1]; idx--; } else { int n = Integer.valueOf(next); stack[idx++] = n; } } System.out.println(stack[0]); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 35, 18, 13, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 162, 17 ], [ 162, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 26, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 20, 35 ], [ 35, 36 ], [ 35, 37 ], [ 20, 38 ], [ 38, 39 ], [ 38, 40 ], [ 20, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 41, 51 ], [ 51, 52 ], [ 52, 53 ], [ 41, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 62, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 62, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 76, 77 ], [ 76, 78 ], [ 62, 79 ], [ 56, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 82, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 82, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 96, 98 ], [ 82, 99 ], [ 56, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 102, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 111, 112 ], [ 102, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 116, 118 ], [ 102, 119 ], [ 56, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 126, 127 ], [ 122, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 131, 132 ], [ 122, 133 ], [ 133, 134 ], [ 134, 135 ], [ 133, 136 ], [ 136, 137 ], [ 136, 138 ], [ 122, 139 ], [ 56, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 142, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 148, 149 ], [ 148, 150 ], [ 20, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 151, 156 ], [ 156, 157 ], [ 157, 158 ], [ 18, 159 ], [ 159, 160 ], [ 0, 161 ], [ 161, 162 ], [ 161, 163 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayDeque;\nimport java.util.Deque;\n\npublic class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] stringArray = br.readLine().split(\"\\\\s\");\n\n Deque<Integer> que = new ArrayDeque<>();\n int a = 0;\n int b = 0;\n for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }\n System.out.println(que.pop());\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Deque;", "Deque", "java.util", "public class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] stringArray = br.readLine().split(\"\\\\s\");\n\n Deque<Integer> que = new ArrayDeque<>();\n int a = 0;\n int b = 0;\n for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }\n System.out.println(que.pop());\n }\n}", "Main", "public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] stringArray = br.readLine().split(\"\\\\s\");\n\n Deque<Integer> que = new ArrayDeque<>();\n int a = 0;\n int b = 0;\n for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }\n System.out.println(que.pop());\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] stringArray = br.readLine().split(\"\\\\s\");\n\n Deque<Integer> que = new ArrayDeque<>();\n int a = 0;\n int b = 0;\n for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }\n System.out.println(que.pop());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] stringArray = br.readLine().split(\"\\\\s\");", "stringArray", "br.readLine().split(\"\\\\s\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"\\\\s\"", "Deque<Integer> que = new ArrayDeque<>();", "que", "new ArrayDeque<>()", "int a = 0;", "a", "0", "int b = 0;", "b", "0", "for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < stringArray.length", "i", "stringArray.length", "stringArray", "stringArray.length", "i++", "i++", "i", "{\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }", "{\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }", "switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }", "stringArray[i]", "stringArray", "i", "case \"+\":", "\"+\"", "case \"+\":", "a = que.pollFirst()", "a", "que.pollFirst()", "que.pollFirst", "que", "b = que.pollFirst()", "b", "que.pollFirst()", "que.pollFirst", "que", "que.addFirst(b + a)", "que.addFirst", "que", "b + a", "b", "a", "break;", "case \"-\":", "\"-\"", "case \"-\":", "a = que.pollFirst()", "a", "que.pollFirst()", "que.pollFirst", "que", "b = que.pollFirst()", "b", "que.pollFirst()", "que.pollFirst", "que", "que.addFirst(b - a)", "que.addFirst", "que", "b - a", "b", "a", "break;", "case \"/\":", "\"/\"", "case \"/\":", "a = que.pollFirst()", "a", "que.pollFirst()", "que.pollFirst", "que", "b = que.pollFirst()", "b", "que.pollFirst()", "que.pollFirst", "que", "que.addFirst(b / a)", "que.addFirst", "que", "b / a", "b", "a", "break;", "case \"*\":", "\"*\"", "case \"*\":", "a = que.pollFirst()", "a", "que.pollFirst()", "que.pollFirst", "que", "b = que.pollFirst()", "b", "que.pollFirst()", "que.pollFirst", "que", "que.addFirst(b * a)", "que.addFirst", "que", "b * a", "b", "a", "break;", "default:", "default:", "que.addFirst(Integer.parseInt(stringArray[i]))", "que.addFirst", "que", "Integer.parseInt(stringArray[i])", "Integer.parseInt", "Integer", "stringArray[i]", "stringArray", "i", "System.out.println(que.pop())", "System.out.println", "System.out", "System", "System.out", "que.pop()", "que.pop", "que", "String args[]", "args", "public class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] stringArray = br.readLine().split(\"\\\\s\");\n\n Deque<Integer> que = new ArrayDeque<>();\n int a = 0;\n int b = 0;\n for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }\n System.out.println(que.pop());\n }\n}", "public class Main {\n public static void main(String args[]) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] stringArray = br.readLine().split(\"\\\\s\");\n\n Deque<Integer> que = new ArrayDeque<>();\n int a = 0;\n int b = 0;\n for (int i = 0; i < stringArray.length; i++) {\n switch (stringArray[i]) {\n case \"+\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b + a);\n break;\n case \"-\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b - a);\n break;\n case \"/\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b / a);\n break;\n case \"*\":\n a = que.pollFirst();\n b = que.pollFirst();\n que.addFirst(b * a);\n break;\n default:\n que.addFirst(Integer.parseInt(stringArray[i]));\n }\n }\n System.out.println(que.pop());\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayDeque; import java.util.Deque; public class Main { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] stringArray = br.readLine().split("\\s"); Deque<Integer> que = new ArrayDeque<>(); int a = 0; int b = 0; for (int i = 0; i < stringArray.length; i++) { switch (stringArray[i]) { case "+": a = que.pollFirst(); b = que.pollFirst(); que.addFirst(b + a); break; case "-": a = que.pollFirst(); b = que.pollFirst(); que.addFirst(b - a); break; case "/": a = que.pollFirst(); b = que.pollFirst(); que.addFirst(b / a); break; case "*": a = que.pollFirst(); b = que.pollFirst(); que.addFirst(b * a); break; default: que.addFirst(Integer.parseInt(stringArray[i])); } } System.out.println(que.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 35, 18, 13, 13, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 17, 1, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 3, 34, 1, 4, 18, 13, 4, 18, 13, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 139, 14 ], [ 139, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 32, 34 ], [ 17, 35 ], [ 35, 36 ], [ 35, 37 ], [ 17, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 45, 47 ], [ 38, 48 ], [ 48, 49 ], [ 49, 50 ], [ 38, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 59, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 70, 71 ], [ 71, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 59, 76 ], [ 53, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 79, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 79, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 79, 96 ], [ 53, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 99, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 113, 115 ], [ 99, 116 ], [ 53, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 123, 124 ], [ 122, 125 ], [ 125, 126 ], [ 125, 127 ], [ 17, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 134, 135 ], [ 15, 136 ], [ 136, 137 ], [ 0, 138 ], [ 138, 139 ], [ 138, 140 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Stack;\n\n\npublic class Main{\n public static void main(String args[]) throws IOException{\n\tBufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n String[] str=buf.readLine().split(\"\\\\s\");\n\tStack<Integer> box = new Stack<Integer>();\n\tint tmp1=0;\n\tint tmp2=0;\n\tfor(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}\n\tSystem.out.println(box.pop());\n }\n \n}\n", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Stack;", "Stack", "java.util", "public class Main{\n public static void main(String args[]) throws IOException{\n\tBufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n String[] str=buf.readLine().split(\"\\\\s\");\n\tStack<Integer> box = new Stack<Integer>();\n\tint tmp1=0;\n\tint tmp2=0;\n\tfor(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}\n\tSystem.out.println(box.pop());\n }\n \n}", "Main", "public static void main(String args[]) throws IOException{\n\tBufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n String[] str=buf.readLine().split(\"\\\\s\");\n\tStack<Integer> box = new Stack<Integer>();\n\tint tmp1=0;\n\tint tmp2=0;\n\tfor(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}\n\tSystem.out.println(box.pop());\n }", "main", "{\n\tBufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n String[] str=buf.readLine().split(\"\\\\s\");\n\tStack<Integer> box = new Stack<Integer>();\n\tint tmp1=0;\n\tint tmp2=0;\n\tfor(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}\n\tSystem.out.println(box.pop());\n }", "BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));", "buf", "new BufferedReader(new InputStreamReader(System.in))", "String[] str=buf.readLine().split(\"\\\\s\");", "str", "buf.readLine().split(\"\\\\s\")", "buf.readLine().split", "buf.readLine()", "buf.readLine", "buf", "\"\\\\s\"", "Stack<Integer> box = new Stack<Integer>();", "box", "new Stack<Integer>()", "int tmp1=0;", "tmp1", "0", "int tmp2=0;", "tmp2", "0", "for(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}", "int i=0;", "int i=0;", "i", "0", "i<str.length", "i", "str.length", "str", "str.length", "i++", "i++", "i", "{\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}", "{\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}", "switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }", "str[i]", "str", "i", "case \"+\":", "\"+\"", "case \"+\":", "tmp1 = box.pop()", "tmp1", "box.pop()", "box.pop", "box", "tmp2 = box.pop()", "tmp2", "box.pop()", "box.pop", "box", "box.add(tmp2 + tmp1)", "box.add", "box", "tmp2 + tmp1", "tmp2", "tmp1", "break;", "case \"-\":", "\"-\"", "case \"-\":", "tmp1 = box.pop()", "tmp1", "box.pop()", "box.pop", "box", "tmp2 = box.pop()", "tmp2", "box.pop()", "box.pop", "box", "box.add(tmp2 - tmp1)", "box.add", "box", "tmp2 - tmp1", "tmp2", "tmp1", "break;", "case \"*\":", "\"*\"", "case \"*\":", "tmp1 = box.pop()", "tmp1", "box.pop()", "box.pop", "box", "tmp2 = box.pop()", "tmp2", "box.pop()", "box.pop", "box", "box.add(tmp2 * tmp1)", "box.add", "box", "tmp2 * tmp1", "tmp2", "tmp1", "break;", "default:", "default:", "box.add(Integer.parseInt(str[i]))", "box.add", "box", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "System.out.println(box.pop())", "System.out.println", "System.out", "System", "System.out", "box.pop()", "box.pop", "box", "String args[]", "args", "public class Main{\n public static void main(String args[]) throws IOException{\n\tBufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n String[] str=buf.readLine().split(\"\\\\s\");\n\tStack<Integer> box = new Stack<Integer>();\n\tint tmp1=0;\n\tint tmp2=0;\n\tfor(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}\n\tSystem.out.println(box.pop());\n }\n \n}", "public class Main{\n public static void main(String args[]) throws IOException{\n\tBufferedReader buf=new BufferedReader(new InputStreamReader(System.in));\n String[] str=buf.readLine().split(\"\\\\s\");\n\tStack<Integer> box = new Stack<Integer>();\n\tint tmp1=0;\n\tint tmp2=0;\n\tfor(int i=0;i<str.length;i++){\n\t \n\t switch (str[i]) {\n case \"+\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 + tmp1);\n break;\n case \"-\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 - tmp1);\n break;\n case \"*\":\n tmp1 = box.pop();\n tmp2 = box.pop();\n box.add(tmp2 * tmp1);\n break;\n default:\n box.add(Integer.parseInt(str[i]));\n }\n\n\t \n\n\t\t\t\t\t\t \n\t}\n\tSystem.out.println(box.pop());\n }\n \n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class Main{ public static void main(String args[]) throws IOException{ BufferedReader buf=new BufferedReader(new InputStreamReader(System.in)); String[] str=buf.readLine().split("\\s"); Stack<Integer> box = new Stack<Integer>(); int tmp1=0; int tmp2=0; for(int i=0;i<str.length;i++){ switch (str[i]) { case "+": tmp1 = box.pop(); tmp2 = box.pop(); box.add(tmp2 + tmp1); break; case "-": tmp1 = box.pop(); tmp2 = box.pop(); box.add(tmp2 - tmp1); break; case "*": tmp1 = box.pop(); tmp2 = box.pop(); box.add(tmp2 * tmp1); break; default: box.add(Integer.parseInt(str[i])); } } System.out.println(box.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 35, 13, 34, 17, 1, 4, 18, 13, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 4, 18, 13, 4, 18, 13, 2, 2, 40, 17, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 4, 18, 13, 4, 18, 13, 2, 2, 17, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 3, 34, 17, 1, 4, 18, 13, 4, 18, 13, 2, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 3, 34, 1, 4, 18, 13, 13, 3, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2, 13, 13, 30, 4, 18, 18, 13, 13, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 163, 8 ], [ 163, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 11, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 18, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 43, 44 ], [ 44, 45 ], [ 39, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 50, 51 ], [ 32, 52 ], [ 28, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 70, 71 ], [ 62, 72 ], [ 72, 73 ], [ 73, 74 ], [ 72, 75 ], [ 75, 76 ], [ 76, 77 ], [ 55, 78 ], [ 28, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 94, 95 ], [ 95, 96 ], [ 88, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 100, 101 ], [ 101, 102 ], [ 81, 103 ], [ 28, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 110, 111 ], [ 111, 112 ], [ 110, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 114, 117 ], [ 117, 118 ], [ 118, 119 ], [ 113, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 123, 124 ], [ 124, 125 ], [ 106, 126 ], [ 28, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 129, 132 ], [ 128, 133 ], [ 11, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 136, 139 ], [ 139, 140 ], [ 140, 141 ], [ 11, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 147, 152 ], [ 142, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 154, 159 ], [ 9, 160 ], [ 160, 161 ], [ 0, 162 ], [ 162, 163 ], [ 162, 164 ] ]
[ "import java.io.*;\nimport java.util.*;\npublic class Main{\n public static void main(String[] args){\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n public static void main(String[] args){\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }\n }\n}", "Main", "public static void main(String[] args){\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }\n }", "main", "{\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }\n }", "Deque<String> formula = new ArrayDeque<String>();", "formula", "new ArrayDeque<String>()", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }", "scan.hasNext()", "scan.hasNext", "scan", "{\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }", "String input = scan.next();", "input", "scan.next()", "scan.next", "scan", "switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }", "input", "case \"+\":", "\"+\"", "case \"+\":", "formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())))", "formula.push", "formula", "String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))", "String.valueOf", "String", "Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "break;", "case \"-\":", "\"-\"", "case \"-\":", "formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())))", "formula.push", "formula", "String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))", "String.valueOf", "String", "-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())", "-1*Double.parseDouble(formula.poll())", "-1", "1", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "break;", "case \"/\":", "\"/\"", "case \"/\":", "formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())))", "formula.push", "formula", "String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll()))", "String.valueOf", "String", "1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())", "1.0/Double.parseDouble(formula.poll())", "1.0", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "break;", "case \"*\":", "\"*\"", "case \"*\":", "formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())))", "formula.push", "formula", "String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll()))", "String.valueOf", "String", "Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "break;", "default:", "default:", "formula.push(input)", "formula.push", "formula", "input", "break;", "double ans = Double.parseDouble(formula.poll());", "ans", "Double.parseDouble(formula.poll())", "Double.parseDouble", "Double", "formula.poll()", "formula.poll", "formula", "if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }", "ans==(int)ans", "ans", "(int)ans", "{\n System.out.println((int)ans);\n }", "System.out.println((int)ans)", "System.out.println", "System.out", "System", "System.out", "(int)ans", "{\n System.out.println(ans);\n }", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Deque<String> formula = new ArrayDeque<String>();\n Scanner scan = new Scanner(System.in);\n while(scan.hasNext()){\n String input = scan.next();\n switch(input){\n case \"+\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll())));\n break;\n case \"-\":\n formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); \n break;\n case \"/\":\n formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n case \"*\":\n formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll())));\n break;\n default:\n formula.push(input);\n break;\n }\n }\n double ans = Double.parseDouble(formula.poll());\n if(ans==(int)ans){\n System.out.println((int)ans);\n }else{\n System.out.println(ans);\n }\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Deque<String> formula = new ArrayDeque<String>(); Scanner scan = new Scanner(System.in); while(scan.hasNext()){ String input = scan.next(); switch(input){ case "+": formula.push(String.valueOf(Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); break; case "-": formula.push(String.valueOf(-1*Double.parseDouble(formula.poll())+Double.parseDouble(formula.poll()))); break; case "/": formula.push(String.valueOf(1.0/Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll()))); break; case "*": formula.push(String.valueOf(Double.parseDouble(formula.poll())*Double.parseDouble(formula.poll()))); break; default: formula.push(input); break; } } double ans = Double.parseDouble(formula.poll()); if(ans==(int)ans){ System.out.println((int)ans); }else{ System.out.println(ans); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 13, 18, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 14, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 130, 5 ], [ 130, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 26, 36 ], [ 36, 37 ], [ 37, 38 ], [ 26, 39 ], [ 40, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 43, 45 ], [ 40, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 46, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 51, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 46, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 68, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 73, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 68, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 90, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 99, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 95, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 90, 112 ], [ 112, 113 ], [ 113, 114 ], [ 112, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 8, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 124, 125 ], [ 125, 126 ], [ 6, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String [] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> Stack = new ArrayDeque<>();\n String S = sc.nextLine();\n String list [] = S.split(\" \");\n for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }\n System.out.println(Stack.pop());\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String [] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> Stack = new ArrayDeque<>();\n String S = sc.nextLine();\n String list [] = S.split(\" \");\n for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }\n System.out.println(Stack.pop());\n }\n}", "Main", "public static void main(String [] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> Stack = new ArrayDeque<>();\n String S = sc.nextLine();\n String list [] = S.split(\" \");\n for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }\n System.out.println(Stack.pop());\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n Deque<Integer> Stack = new ArrayDeque<>();\n String S = sc.nextLine();\n String list [] = S.split(\" \");\n for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }\n System.out.println(Stack.pop());\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Deque<Integer> Stack = new ArrayDeque<>();", "Stack", "new ArrayDeque<>()", "String S = sc.nextLine();", "S", "sc.nextLine()", "sc.nextLine", "sc", "String list [] = S.split(\" \");", "list", "S.split(\" \")", "S.split", "S", "\" \"", "for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }", "int i=0;", "int i=0;", "i", "0", "i<list.length", "i", "list.length", "list", "list.length", "i++", "i++", "i", "{\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }", "{\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }", "S = list[i]", "S", "list[i]", "list", "i", "if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));", "S.equals(\"+\")", "S.equals", "S", "\"+\"", "{\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }", "int n1 = Stack.pop();", "n1", "Stack.pop()", "Stack.pop", "Stack", "int n2 = Stack.pop();", "n2", "Stack.pop()", "Stack.pop", "Stack", "Stack.push(n1+n2)", "Stack.push", "Stack", "n1+n2", "n1", "n2", "if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));", "S.equals(\"-\")", "S.equals", "S", "\"-\"", "{\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }", "int n1 = Stack.pop();", "n1", "Stack.pop()", "Stack.pop", "Stack", "int n2 = Stack.pop();", "n2", "Stack.pop()", "Stack.pop", "Stack", "Stack.push(n2-n1)", "Stack.push", "Stack", "n2-n1", "n2", "n1", "if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));", "S.equals(\"*\")", "S.equals", "S", "\"*\"", "{\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }", "int n1 = Stack.pop();", "n1", "Stack.pop()", "Stack.pop", "Stack", "int n2 = Stack.pop();", "n2", "Stack.pop()", "Stack.pop", "Stack", "Stack.push(n1*n2)", "Stack.push", "Stack", "n1*n2", "n1", "n2", "Stack.push(Integer.parseInt(S))", "Stack.push", "Stack", "Integer.parseInt(S)", "Integer.parseInt", "Integer", "S", "System.out.println(Stack.pop())", "System.out.println", "System.out", "System", "System.out", "Stack.pop()", "Stack.pop", "Stack", "String [] args", "args", "public class Main {\n public static void main(String [] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> Stack = new ArrayDeque<>();\n String S = sc.nextLine();\n String list [] = S.split(\" \");\n for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }\n System.out.println(Stack.pop());\n }\n}", "public class Main {\n public static void main(String [] args) {\n Scanner sc = new Scanner(System.in);\n Deque<Integer> Stack = new ArrayDeque<>();\n String S = sc.nextLine();\n String list [] = S.split(\" \");\n for(int i=0;i<list.length;i++){\n S = list[i];\n if(S.equals(\"+\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1+n2);\n }\n else if(S.equals(\"-\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n2-n1);\n }\n else if(S.equals(\"*\")){\n int n1 = Stack.pop();\n int n2 = Stack.pop();\n Stack.push(n1*n2);\n }\n else Stack.push(Integer.parseInt(S));\n }\n System.out.println(Stack.pop());\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String [] args) { Scanner sc = new Scanner(System.in); Deque<Integer> Stack = new ArrayDeque<>(); String S = sc.nextLine(); String list [] = S.split(" "); for(int i=0;i<list.length;i++){ S = list[i]; if(S.equals("+")){ int n1 = Stack.pop(); int n2 = Stack.pop(); Stack.push(n1+n2); } else if(S.equals("-")){ int n1 = Stack.pop(); int n2 = Stack.pop(); Stack.push(n2-n1); } else if(S.equals("*")){ int n1 = Stack.pop(); int n2 = Stack.pop(); Stack.push(n1*n2); } else Stack.push(Integer.parseInt(S)); } System.out.println(Stack.pop()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 13, 4, 18, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 42, 40, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 13, 17, 30, 0, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 30, 0, 13, 13, 4, 18, 13, 13, 4, 18, 13, 2, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 14, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 51, 52 ], [ 46, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 56, 57 ], [ 57, 58 ], [ 14, 59 ], [ 59, 60 ], [ 59, 61 ], [ 14, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 62, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 67, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 78, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 94, 94 ], [ 94, 95 ], [ 94, 96 ], [ 94, 97 ], [ 78, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 12, 112 ], [ 112, 113 ] ]
[ "import java.util.ArrayDeque;\nimport java.util.Queue;\nimport java.util.Scanner;\n\nclass Main {public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tQueue<String> name = new ArrayDeque<>();\n\t\tQueue<Integer> time = new ArrayDeque<>();\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint t = 0;\n\t\twhile(!name.isEmpty()) {\n\t\t\tString tmpname = name.poll();\n\t\t\tint tmptime = time.poll();\n\t\t\t\n\t\t\tif(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}\n\t\t}\n\t}\n}", "import java.util.ArrayDeque;", "ArrayDeque", "java.util", "import java.util.Queue;", "Queue", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "class Main {public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tQueue<String> name = new ArrayDeque<>();\n\t\tQueue<Integer> time = new ArrayDeque<>();\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint t = 0;\n\t\twhile(!name.isEmpty()) {\n\t\t\tString tmpname = name.poll();\n\t\t\tint tmptime = time.poll();\n\t\t\t\n\t\t\tif(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}\n\t\t}\n\t}\n}", "Main", "public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tQueue<String> name = new ArrayDeque<>();\n\t\tQueue<Integer> time = new ArrayDeque<>();\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint t = 0;\n\t\twhile(!name.isEmpty()) {\n\t\t\tString tmpname = name.poll();\n\t\t\tint tmptime = time.poll();\n\t\t\t\n\t\t\tif(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tQueue<String> name = new ArrayDeque<>();\n\t\tQueue<Integer> time = new ArrayDeque<>();\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint q = sc.nextInt();\n\t\t\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}\n\t\t\n\t\tint t = 0;\n\t\twhile(!name.isEmpty()) {\n\t\t\tString tmpname = name.poll();\n\t\t\tint tmptime = time.poll();\n\t\t\t\n\t\t\tif(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "Queue<String> name = new ArrayDeque<>();", "name", "new ArrayDeque<>()", "Queue<Integer> time = new ArrayDeque<>();", "time", "new ArrayDeque<>()", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int q = sc.nextInt();", "q", "sc.nextInt()", "sc.nextInt", "sc", "for(int i = 0; i < n; i++) {\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}", "{\n\t\t\tname.add(sc.next());\n\t\t\ttime.add(sc.nextInt());\n\t\t}", "name.add(sc.next())", "name.add", "name", "sc.next()", "sc.next", "sc", "time.add(sc.nextInt())", "time.add", "time", "sc.nextInt()", "sc.nextInt", "sc", "int t = 0;", "t", "0", "while(!name.isEmpty()) {\n\t\t\tString tmpname = name.poll();\n\t\t\tint tmptime = time.poll();\n\t\t\t\n\t\t\tif(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}\n\t\t}", "!name.isEmpty()", "name.isEmpty()", "name.isEmpty", "name", "{\n\t\t\tString tmpname = name.poll();\n\t\t\tint tmptime = time.poll();\n\t\t\t\n\t\t\tif(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}\n\t\t}", "String tmpname = name.poll();", "tmpname", "name.poll()", "name.poll", "name", "int tmptime = time.poll();", "tmptime", "time.poll()", "time.poll", "time", "if(tmptime - q <= 0) {\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}else {\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}", "tmptime - q <= 0", "tmptime - q", "tmptime", "q", "0", "{\n\t\t\t\tt += tmptime;\n\t\t\t\tSystem.out.println(tmpname + \" \" + t);\n\t\t\t}", "t += tmptime", "t", "tmptime", "System.out.println(tmpname + \" \" + t)", "System.out.println", "System.out", "System", "System.out", "tmpname + \" \" + t", "tmpname + \" \" + t", "tmpname", "\" \"", "t", "{\n\t\t\t\tt += q;\n\t\t\t\tname.add(tmpname);\n\t\t\t\ttime.add(tmptime - q);\n\t\t\t}", "t += q", "t", "q", "name.add(tmpname)", "name.add", "name", "tmpname", "time.add(tmptime - q)", "time.add", "time", "tmptime - q", "tmptime", "q", "String args[]", "args" ]
import java.util.ArrayDeque; import java.util.Queue; import java.util.Scanner; class Main {public static void main(String args[]) { Scanner sc = new Scanner(System.in); Queue<String> name = new ArrayDeque<>(); Queue<Integer> time = new ArrayDeque<>(); int n = sc.nextInt(); int q = sc.nextInt(); for(int i = 0; i < n; i++) { name.add(sc.next()); time.add(sc.nextInt()); } int t = 0; while(!name.isEmpty()) { String tmpname = name.poll(); int tmptime = time.poll(); if(tmptime - q <= 0) { t += tmptime; System.out.println(tmpname + " " + t); }else { t += q; name.add(tmpname); time.add(tmptime - q); } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 4, 18, 13, 17, 41, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 4, 18, 13, 13, 41, 13, 17, 41, 13, 20, 13, 41, 13, 17, 42, 40, 4, 18, 13, 30, 41, 13, 4, 18, 13, 14, 2, 18, 13, 13, 13, 30, 0, 13, 18, 13, 13, 0, 18, 13, 13, 13, 0, 18, 13, 40, 13, 13, 14, 2, 18, 13, 13, 13, 30, 0, 18, 13, 13, 13, 0, 13, 13, 4, 18, 13, 13, 30, 0, 13, 13, 0, 18, 13, 13, 13, 0, 18, 13, 40, 13, 13, 28, 13, 13, 30, 30, 4, 18, 13, 2, 2, 2, 18, 13, 13, 17, 18, 13, 13, 17, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 240, 20 ], [ 240, 21 ], [ 21, 22 ], [ 240, 23 ], [ 23, 24 ], [ 240, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 27, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 36, 41 ], [ 27, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 27, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 55, 57 ], [ 27, 58 ], [ 58, 59 ], [ 58, 60 ], [ 27, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 61, 69 ], [ 69, 70 ], [ 70, 71 ], [ 61, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 76, 81 ], [ 73, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 73, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 90, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 73, 95 ], [ 95, 96 ], [ 95, 97 ], [ 73, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 27, 102 ], [ 102, 103 ], [ 102, 104 ], [ 27, 105 ], [ 105, 106 ], [ 105, 107 ], [ 27, 109 ], [ 109, 110 ], [ 109, 111 ], [ 27, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 112, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 121, 122 ], [ 117, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 123, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 132, 134 ], [ 129, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 129, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 140, 145 ], [ 123, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 146, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 152, 158 ], [ 158, 159 ], [ 158, 160 ], [ 152, 161 ], [ 161, 162 ], [ 162, 163 ], [ 161, 164 ], [ 146, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 169, 173 ], [ 165, 174 ], [ 174, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 174, 179 ], [ 27, 180 ], [ 180, 181 ], [ 180, 182 ], [ 180, 183 ], [ 184, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 190, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 190, 194 ], [ 189, 195 ], [ 195, 196 ], [ 195, 197 ], [ 190, 198 ], [ 27, 199 ], [ 199, 200 ], [ 200, 201 ], [ 25, 202 ], [ 202, 203 ], [ 240, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 204, 208 ], [ 208, 209 ], [ 204, 210 ], [ 210, 211 ], [ 204, 212 ], [ 212, 213 ], [ 212, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 216, 218 ], [ 215, 219 ], [ 214, 220 ], [ 220, 221 ], [ 221, 222 ], [ 221, 223 ], [ 220, 224 ], [ 212, 225 ], [ 225, 226 ], [ 212, 227 ], [ 227, 228 ], [ 204, 229 ], [ 229, 230 ], [ 229, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 233, 235 ], [ 232, 236 ], [ 229, 237 ], [ 237, 238 ], [ 0, 239 ], [ 239, 240 ], [ 239, 241 ] ]
[ "import java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.IOException;\nimport java.util.LinkedList;\n\npublic class Main{\n\n static int n, q;\n\n static class Process {\n String pid;\n int task;\n int end;\n\n public Process(String pid, int task) {\n this.pid = pid;\n this.task = task;\n }\n\n public void setEnd(int end) {\n this.end = end;\n }\n }\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n String[] st = br.readLine().split(\" \");\n n = Integer.parseInt(st[0]);\n q = Integer.parseInt(st[1]);\n LinkedList<Process> Queue = new LinkedList<>();\n for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }\n\n int ePosition = 0;\n Process[] endProcess = new Process[n];\n int time = 0;\n while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }\n\n for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }\n bw.flush();\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.BufferedWriter;", "BufferedWriter", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.OutputStreamWriter;", "OutputStreamWriter", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.util.LinkedList;", "LinkedList", "java.util", "public class Main{\n\n static int n, q;\n\n static class Process {\n String pid;\n int task;\n int end;\n\n public Process(String pid, int task) {\n this.pid = pid;\n this.task = task;\n }\n\n public void setEnd(int end) {\n this.end = end;\n }\n }\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n String[] st = br.readLine().split(\" \");\n n = Integer.parseInt(st[0]);\n q = Integer.parseInt(st[1]);\n LinkedList<Process> Queue = new LinkedList<>();\n for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }\n\n int ePosition = 0;\n Process[] endProcess = new Process[n];\n int time = 0;\n while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }\n\n for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }\n bw.flush();\n }\n}", "Main", "static int n", "n", "q;", "q", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n String[] st = br.readLine().split(\" \");\n n = Integer.parseInt(st[0]);\n q = Integer.parseInt(st[1]);\n LinkedList<Process> Queue = new LinkedList<>();\n for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }\n\n int ePosition = 0;\n Process[] endProcess = new Process[n];\n int time = 0;\n while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }\n\n for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }\n bw.flush();\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n String[] st = br.readLine().split(\" \");\n n = Integer.parseInt(st[0]);\n q = Integer.parseInt(st[1]);\n LinkedList<Process> Queue = new LinkedList<>();\n for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }\n\n int ePosition = 0;\n Process[] endProcess = new Process[n];\n int time = 0;\n while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }\n\n for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }\n bw.flush();\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));", "bw", "new BufferedWriter(new OutputStreamWriter(System.out))", "String[] st = br.readLine().split(\" \");", "st", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "n = Integer.parseInt(st[0])", "n", "Integer.parseInt(st[0])", "Integer.parseInt", "Integer", "st[0]", "st", "0", "q = Integer.parseInt(st[1])", "q", "Integer.parseInt(st[1])", "Integer.parseInt", "Integer", "st[1]", "st", "1", "LinkedList<Process> Queue = new LinkedList<>();", "Queue", "new LinkedList<>()", "for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }", "{\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }", "st = br.readLine().split(\" \")", "st", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "String pid = st[0];", "pid", "st[0]", "st", "0", "int task = Integer.parseInt(st[1]);", "task", "Integer.parseInt(st[1])", "Integer.parseInt", "Integer", "st[1]", "st", "1", "Process p = new Process(pid, task);", "p", "new Process(pid, task)", "Queue.add(p)", "Queue.add", "Queue", "p", "int ePosition = 0;", "ePosition", "0", "Process[] endProcess = new Process[n];", "endProcess", "new Process[n]", "n", "int time = 0;", "time", "0", "while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }", "!Queue.isEmpty()", "Queue.isEmpty()", "Queue.isEmpty", "Queue", "{\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }", "Process p = Queue.pollFirst();", "p", "Queue.pollFirst()", "Queue.pollFirst", "Queue", "if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }", "p.task < q", "p.task", "p", "p.task", "q", "{\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n }", "time += p.task", "time", "p.task", "p", "p.task", "p.end = time", "p.end", "p", "p.end", "time", "endProcess[ePosition++] = p", "endProcess[ePosition++]", "endProcess", "ePosition++", "ePosition", "p", "if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }", "p.task > q", "p.task", "p", "p.task", "q", "{\n p.task -= q;\n time += q;\n Queue.add(p);\n }", "p.task -= q", "p.task", "p", "p.task", "q", "time += q", "time", "q", "Queue.add(p)", "Queue.add", "Queue", "p", "{\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }", "time += q", "time", "q", "p.end = time", "p.end", "p", "p.end", "time", "endProcess[ePosition++] = p", "endProcess[ePosition++]", "endProcess", "ePosition++", "ePosition", "p", "for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }", "Process p", "endProcess", "{\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }", "{\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }", "bw.append(p.pid + \" \" + p.end + \"\\n\")", "bw.append", "bw", "p.pid + \" \" + p.end + \"\\n\"", "p.end", "p.pid + \" \" + p.end + \"\\n\"", "p.pid", "p", "p.pid", "\" \"", "p.end", "p", "p.end", "\"\\n\"", "bw.flush()", "bw.flush", "bw", "String[] args", "args", "static class Process {\n String pid;\n int task;\n int end;\n\n public Process(String pid, int task) {\n this.pid = pid;\n this.task = task;\n }\n\n public void setEnd(int end) {\n this.end = end;\n }\n }", "Process", "String pid;", "pid", "int task;", "task", "int end;", "end", "public Process(String pid, int task) {\n this.pid = pid;\n this.task = task;\n }", "Process", "{\n this.pid = pid;\n this.task = task;\n }", "this.pid = pid", "this.pid", "this", "this.pid", "pid", "this.task = task", "this.task", "this", "this.task", "task", "String pid", "pid", "int task", "task", "public void setEnd(int end) {\n this.end = end;\n }", "setEnd", "{\n this.end = end;\n }", "this.end = end", "this.end", "this", "this.end", "end", "int end", "end", "public class Main{\n\n static int n, q;\n\n static class Process {\n String pid;\n int task;\n int end;\n\n public Process(String pid, int task) {\n this.pid = pid;\n this.task = task;\n }\n\n public void setEnd(int end) {\n this.end = end;\n }\n }\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n String[] st = br.readLine().split(\" \");\n n = Integer.parseInt(st[0]);\n q = Integer.parseInt(st[1]);\n LinkedList<Process> Queue = new LinkedList<>();\n for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }\n\n int ePosition = 0;\n Process[] endProcess = new Process[n];\n int time = 0;\n while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }\n\n for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }\n bw.flush();\n }\n}", "public class Main{\n\n static int n, q;\n\n static class Process {\n String pid;\n int task;\n int end;\n\n public Process(String pid, int task) {\n this.pid = pid;\n this.task = task;\n }\n\n public void setEnd(int end) {\n this.end = end;\n }\n }\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n String[] st = br.readLine().split(\" \");\n n = Integer.parseInt(st[0]);\n q = Integer.parseInt(st[1]);\n LinkedList<Process> Queue = new LinkedList<>();\n for (int i = 0; i < n; i++) {\n st = br.readLine().split(\" \");\n String pid = st[0];\n int task = Integer.parseInt(st[1]);\n Process p = new Process(pid, task);\n Queue.add(p);\n }\n\n int ePosition = 0;\n Process[] endProcess = new Process[n];\n int time = 0;\n while (!Queue.isEmpty()) {\n Process p = Queue.pollFirst();\n if (p.task < q) {\n time += p.task;\n p.end = time;\n endProcess[ePosition++] = p;\n } else if (p.task > q) {\n p.task -= q;\n time += q;\n Queue.add(p);\n } else {\n time += q;\n p.end = time;\n endProcess[ePosition++] = p;\n }\n }\n\n for (Process p : endProcess) {\n bw.append(p.pid + \" \" + p.end + \"\\n\");\n }\n bw.flush();\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.IOException; import java.util.LinkedList; public class Main{ static int n, q; static class Process { String pid; int task; int end; public Process(String pid, int task) { this.pid = pid; this.task = task; } public void setEnd(int end) { this.end = end; } } public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String[] st = br.readLine().split(" "); n = Integer.parseInt(st[0]); q = Integer.parseInt(st[1]); LinkedList<Process> Queue = new LinkedList<>(); for (int i = 0; i < n; i++) { st = br.readLine().split(" "); String pid = st[0]; int task = Integer.parseInt(st[1]); Process p = new Process(pid, task); Queue.add(p); } int ePosition = 0; Process[] endProcess = new Process[n]; int time = 0; while (!Queue.isEmpty()) { Process p = Queue.pollFirst(); if (p.task < q) { time += p.task; p.end = time; endProcess[ePosition++] = p; } else if (p.task > q) { p.task -= q; time += q; Queue.add(p); } else { time += q; p.end = time; endProcess[ePosition++] = p; } } for (Process p : endProcess) { bw.append(p.pid + " " + p.end + "\n"); } bw.flush(); } }