node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
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, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 9, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 9, 14, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 142, 11 ], [ 142, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 20, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 20, 54 ], [ 54, 55 ], [ 54, 56 ], [ 20, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 82, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 93, 94 ], [ 93, 95 ], [ 88, 96 ], [ 96, 97 ], [ 97, 98 ], [ 88, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 106, 107 ], [ 106, 108 ], [ 101, 109 ], [ 100, 110 ], [ 110, 111 ], [ 113, 112 ], [ 124, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 114, 120 ], [ 113, 121 ], [ 121, 122 ], [ 121, 123 ], [ 124, 124 ], [ 124, 125 ], [ 124, 126 ], [ 113, 127 ], [ 127, 128 ], [ 127, 129 ], [ 110, 130 ], [ 130, 131 ], [ 131, 132 ], [ 20, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 133, 138 ], [ 12, 139 ], [ 139, 140 ], [ 0, 141 ], [ 141, 142 ], [ 141, 143 ] ]
[ "import java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.io.IOException;\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\twhile (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}", "String[] strAry = br.readLine().split(\" \");", "strAry", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(strAry[0]);", "n", "Integer.parseInt(strAry[0])", "Integer.parseInt", "Integer", "strAry[0]", "strAry", "0", "int x = Integer.parseInt(strAry[1]);", "x", "Integer.parseInt(strAry[1])", "Integer.parseInt", "Integer", "strAry[1]", "strAry", "1", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i ++", "i ++", "i", "{\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (j < i) continue;", "j < i", "j", "i", "continue;", "for (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "if (k < i || k < j) continue;", "k < i || k < j", "k < i", "k", "i", "k < j", "k", "j", "continue;", "if ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}", "(i + j + k) == x && i != j && j != k && k != i", "j != k", "(i + j + k) == x && i != j && j != k && k != i", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "i != j", "i", "j", "j != k", "j", "k", "k != i", "k", "i", "{\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "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\twhile (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}\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\twhile (true) {\n\t\t\tString[] strAry = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(strAry[0]);\n\t\t\tint x = Integer.parseInt(strAry[1]);\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\t\tfor (int i = 1; i <= n; i ++) {\n\t\t\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\t\t\tif (j < i) continue;\n\t\t\t\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\t\t\t\tif (k < i || k < j) continue;\n\t\t\t\t\t\t\t\tif ((i + j + k) == x && i != j && j != k && k != i) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main" ]
import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while (true) { String[] strAry = br.readLine().split(" "); int n = Integer.parseInt(strAry[0]); int x = Integer.parseInt(strAry[1]); if (n == 0 && x == 0) break; int count = 0; for (int i = 1; i <= n; i ++) { for (int j = 1; j <= n; j++) { if (j < i) continue; for (int k = 1; k <= n; k++) { if (k < i || k < j) continue; if ((i + j + k) == x && i != j && j != k && k != i) { count++; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 17, 1, 0, 13, 17, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 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 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 12, 17 ], [ 17, 18 ], [ 17, 19 ], [ 12, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 12, 24 ], [ 25, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 25, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 25, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 25, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 50, 52 ], [ 25, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 25, 63 ], [ 63, 64 ], [ 63, 65 ], [ 25, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 66, 76 ], [ 76, 77 ], [ 77, 78 ], [ 66, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 81, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 81, 93 ], [ 93, 94 ], [ 94, 95 ], [ 81, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 105, 106 ], [ 105, 107 ], [ 98, 108 ], [ 108, 109 ], [ 109, 110 ], [ 98, 111 ], [ 112, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 116, 116 ], [ 116, 117 ], [ 116, 118 ], [ 116, 119 ], [ 114, 120 ], [ 113, 121 ], [ 121, 122 ], [ 122, 123 ], [ 25, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 124, 129 ], [ 6, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }\n }\n}", "Main", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }\n }", "main", "{\n\n Scanner sc = new Scanner(System.in);\n\n for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < 1", "i", "1", "i = 0", "i = 0", "i", "0", "{\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }", "{\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "String[] l = line.split(\" \");", "l", "line.split(\" \")", "line.split", "line", "\" \"", "int n = Integer.parseInt(l[0]);", "n", "Integer.parseInt(l[0])", "Integer.parseInt", "Integer", "l[0]", "l", "0", "int x = Integer.parseInt(l[1]);", "x", "Integer.parseInt(l[1])", "Integer.parseInt", "Integer", "l[1]", "l", "1", "if(n == 0 && x == 0) {\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "int count = 0;", "count", "0", "for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= n - 2", "a", "n - 2", "n", "2", "a++", "a++", "a", "{\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }", "{\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }", "for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }", "int b = a + 1;", "int b = a + 1;", "b", "a + 1", "a", "1", "b <= n - 1", "b", "n - 1", "n", "1", "b++", "b++", "b", "{\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }", "{\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }", "for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }", "int c = b + 1;", "int c = b + 1;", "c", "b + 1", "b", "1", "c <= n", "c", "n", "c++", "c++", "c", "{\n if(a + b + c == x) {\n count++;\n }\n }", "{\n if(a + b + c == x) {\n count++;\n }\n }", "if(a + b + c == x) {\n count++;\n }", "a + b + c == x", "a + b + c", "a + b + c", "a", "b", "c", "x", "{\n count++;\n }", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n\n for(int i = 0; i < 1; i = 0) {\n String line = sc.nextLine();\n String[] l = line.split(\" \");\n int n = Integer.parseInt(l[0]);\n int x = Integer.parseInt(l[1]);\n\n if(n == 0 && x == 0) {\n break;\n }\n\n int count = 0;\n for(int a = 1; a <= n - 2; a++) {\n for(int b = a + 1; b <= n - 1; b++) {\n for(int c = b + 1; c <= n; c++) {\n if(a + b + c == x) {\n count++;\n }\n }\n }\n }\n\n System.out.println(count);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for(int i = 0; i < 1; i = 0) { String line = sc.nextLine(); String[] l = line.split(" "); int n = Integer.parseInt(l[0]); int x = Integer.parseInt(l[1]); if(n == 0 && x == 0) { break; } int count = 0; for(int a = 1; a <= n - 2; a++) { for(int b = a + 1; b <= n - 1; b++) { for(int c = b + 1; c <= n; c++) { if(a + b + c == x) { count++; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 9, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 134, 11 ], [ 134, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 37, 39 ], [ 20, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 45, 46 ], [ 45, 47 ], [ 20, 48 ], [ 48, 49 ], [ 48, 50 ], [ 20, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 59, 60 ], [ 20, 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 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 87, 95 ], [ 95, 96 ], [ 96, 97 ], [ 87, 98 ], [ 99, 99 ], [ 99, 100 ], [ 100, 101 ], [ 102, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 106, 107 ], [ 106, 108 ], [ 102, 109 ], [ 109, 110 ], [ 109, 111 ], [ 100, 112 ], [ 112, 113 ], [ 99, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 115, 121 ], [ 114, 122 ], [ 122, 123 ], [ 123, 124 ], [ 20, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 12, 131 ], [ 131, 132 ], [ 0, 133 ], [ 133, 134 ], [ 133, 135 ] ]
[ "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 br = new BufferedReader(new InputStreamReader(System.in));\n\n\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\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 br = new BufferedReader(new InputStreamReader(System.in));\n\n\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "String str = br.readLine();", "str", "br.readLine()", "br.readLine", "br", "String[] s = str.split(\" \");", "s", "str.split(\" \")", "str.split", "str", "\" \"", "int limit = Integer.parseInt(s[0]);", "limit", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "int num= Integer.parseInt(s[1]);", "num", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "int count = 0;", "count", "0", "if((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}", "(limit == 0)&&(num == 0)", "(limit == 0)", "limit", "0", "(num == 0)", "num", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 3;", "int i = 3;", "i", "3", "i <= limit", "i", "limit", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 2;", "int j = 2;", "j", "2", "j <= i", "j", "i", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= j", "k", "j", "k++", "k++", "k", "{\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}", "(i == j)||(j == k)||(k == i)", "(i == j)||(j == k)||(k == i)", "(i == j)", "i", "j", "(j == k)", "j", "k", "(k == i)", "k", "i", "{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}", "continue;", "if((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "(i + j + k)==num", "(i + j + k)", "i + j + k", "i", "j", "k", "num", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "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\n\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\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\n\n\n\t\twhile(true){\n\t\t\tString str = br.readLine();\n\t\t\tString[] s = str.split(\" \");\n\n\t\t\tint limit = Integer.parseInt(s[0]);\n\t\t\tint num= Integer.parseInt(s[1]);\n\t\t\tint count = 0;\n\n\t\t\tif((limit == 0)&&(num == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(int i = 3; i <= limit; i++){\n\t\t\t\tfor(int j = 2; j <= i; j++){\n\t\t\t\t\tfor(int k = 1; k <= j; k++){\n\t\t\t\t\t\tif((i == j)||(j == k)||(k == i)){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((i + j + k)==num){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\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 br = new BufferedReader(new InputStreamReader(System.in)); while(true){ String str = br.readLine(); String[] s = str.split(" "); int limit = Integer.parseInt(s[0]); int num= Integer.parseInt(s[1]); int count = 0; if((limit == 0)&&(num == 0)){ break; } for(int i = 3; i <= limit; i++){ for(int j = 2; j <= i; j++){ for(int k = 1; k <= j; k++){ if((i == j)||(j == k)||(k == i)){ continue; } if((i + j + k)==num){ count++; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 41, 13, 41, 13, 41, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 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 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 25, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 35, 40 ], [ 40, 41 ], [ 35, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 45, 55 ], [ 55, 56 ], [ 56, 57 ], [ 45, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 60, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 60, 72 ], [ 72, 73 ], [ 73, 74 ], [ 60, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 77, 84 ], [ 84, 85 ], [ 84, 86 ], [ 77, 87 ], [ 87, 88 ], [ 88, 89 ], [ 77, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 92, 100 ], [ 100, 101 ], [ 91, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 103, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 35, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 6, 119 ], [ 119, 120 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while(true){ \n \t\n \tint n = scan.nextInt();\n int x = scan.nextInt();\n \tif(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}\n }\n \t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while(true){ \n \t\n \tint n = scan.nextInt();\n int x = scan.nextInt();\n \tif(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}\n }\n \t}\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while(true){ \n \t\n \tint n = scan.nextInt();\n int x = scan.nextInt();\n \tif(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}\n }\n \t}", "main", "{\n Scanner scan = new Scanner(System.in);\n\n while(true){ \n \t\n \tint n = scan.nextInt();\n int x = scan.nextInt();\n \tif(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}\n }\n \t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "while(true){ \n \t\n \tint n = scan.nextInt();\n int x = scan.nextInt();\n \tif(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}\n }", "true", "{ \n \t\n \tint n = scan.nextInt();\n int x = scan.nextInt();\n \tif(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}\n }", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(n==0 && x==0){\n\t \t\tbreak;\n\t \t}\n \telse{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n\t \t\tbreak;\n\t \t}", "break;", "{\n int first;\n int second;\n int third;\n int count = 0;\n\n for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }\n System.out.println(count);\n \t}", "int first;", "first", "int second;", "second", "int third;", "third", "int count = 0;", "count", "0", "for(first = 1; first <= (n-2); first++){\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }", "first = 1;", "first = 1", "first", "1", "first <= (n-2)", "first", "(n-2)", "n", "2", "first++", "first++", "first", "{\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }", "{\n \t for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}\n }", "for(second = (first+1); second <= (n-1); second++){\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}", "second = (first+1);", "second = (first+1)", "second", "(first+1)", "first", "1", "second <= (n-1)", "second", "(n-1)", "n", "1", "second++", "second++", "second", "{\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}", "{\n \t \tfor(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}\n \t}", "for(third = (second+1); third <= n; third++) {\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}", "third = (second+1);", "third = (second+1)", "third", "(second+1)", "second", "1", "third <= n", "third", "n", "third++", "third++", "third", "{\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}", "{\n \n \t \tif(n==0 && x==0){\n \t \t\tbreak;\n \t \t}\n \t\tif((first + second + third) == x){\n \t\t\tcount++;\n \t\t}\n \t\t}", "if(n==0 && x==0){\n \t \t\tbreak;\n \t \t}", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n \t \t\tbreak;\n \t \t}", "break;", "if((first + second + third) == x){\n \t\t\tcount++;\n \t\t}", "(first + second + third) == x", "(first + second + third)", "first + second + third", "first", "second", "third", "x", "{\n \t\t\tcount++;\n \t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while(true){ int n = scan.nextInt(); int x = scan.nextInt(); if(n==0 && x==0){ break; } else{ int first; int second; int third; int count = 0; for(first = 1; first <= (n-2); first++){ for(second = (first+1); second <= (n-1); second++){ for(third = (second+1); third <= n; third++) { if(n==0 && x==0){ break; } if((first + second + third) == x){ count++; } } } } System.out.println(count); } } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 42, 17, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 3, 4, 18, 13, 13, 40, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 17, 41, 13, 4, 18, 4, 18, 13, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 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 ], [ 150, 8 ], [ 150, 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 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 23, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 29, 34 ], [ 34, 35 ], [ 23, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 23, 40 ], [ 40, 41 ], [ 11, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 60, 66 ], [ 54, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 54, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 80, 81 ], [ 80, 82 ], [ 54, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 83, 93 ], [ 93, 94 ], [ 94, 95 ], [ 83, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 98, 110 ], [ 110, 111 ], [ 111, 112 ], [ 98, 113 ], [ 114, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 115, 122 ], [ 122, 123 ], [ 122, 124 ], [ 115, 125 ], [ 125, 126 ], [ 126, 127 ], [ 115, 128 ], [ 129, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 133, 133 ], [ 133, 134 ], [ 133, 135 ], [ 133, 136 ], [ 131, 137 ], [ 130, 138 ], [ 138, 139 ], [ 139, 140 ], [ 54, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 9, 147 ], [ 147, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tint in = 0;\n\n\t\twhile (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}\n\n\t\tfor (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}\n\t}\n\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tint in = 0;\n\n\t\twhile (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}\n\n\t\tfor (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tint in = 0;\n\n\t\twhile (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}\n\n\t\tfor (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}\n\t}", "main", "{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tint in = 0;\n\n\t\twhile (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}\n\n\t\tfor (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "ArrayList<String> lines = new ArrayList<String>();", "lines", "new ArrayList<String>()", "int in = 0;", "in", "0", "while (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}", "true", "{\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}", "String string = sc.nextLine();", "string", "sc.nextLine()", "sc.nextLine", "sc", "if (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}", "string.equals(\"0 0\")", "string.equals", "string", "\"0 0\"", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "lines.add(string)", "lines.add", "lines", "string", "in++", "in", "for (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < in", "i", "in", "i++", "i++", "i", "{\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}", "{\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}", "int answer = 0;", "answer", "0", "String[] kari = lines.get(i).split(\" \");", "kari", "lines.get(i).split(\" \")", "lines.get(i).split", "lines.get(i)", "lines.get", "lines", "i", "\" \"", "int n = Integer.parseInt(kari[0]);", "n", "Integer.parseInt(kari[0])", "Integer.parseInt", "Integer", "kari[0]", "kari", "0", "int x = Integer.parseInt(kari[1]);", "x", "Integer.parseInt(kari[1])", "Integer.parseInt", "Integer", "kari[1]", "kari", "1", "for (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n - 2", "j", "n - 2", "n", "2", "j++", "j++", "j", "{\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}", "{\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}", "for (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n - 1", "k", "n - 1", "n", "1", "k++", "k++", "k", "{\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}", "for (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int l = k + 1;", "int l = k + 1;", "l", "k + 1", "k", "1", "l <= n", "l", "n", "l++", "l++", "l", "{\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}", "j + k + l == x", "j + k + l", "j + k + l", "j", "k", "l", "x", "{\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}", "answer++", "answer", "System.out.println(answer)", "System.out.println", "System.out", "System", "System.out", "answer", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tint in = 0;\n\n\t\twhile (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}\n\n\t\tfor (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tArrayList<String> lines = new ArrayList<String>();\n\t\tint in = 0;\n\n\t\twhile (true) {\n\t\t\tString string = sc.nextLine();\n\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlines.add(string);\n\t\t\tin++;\n\t\t}\n\n\t\tfor (int i = 0; i < in; i++) {\n\t\t\tint answer = 0;\n\t\t\tString[] kari = lines.get(i).split(\" \");\n\t\t\tint n = Integer.parseInt(kari[0]);\n\t\t\tint x = Integer.parseInt(kari[1]);\n\n\t\t\tfor (int j = 1; j <= n - 2; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n - 1; k++) {\n\t\t\t\t\tfor (int l = k + 1; l <= n; l++) {\n\t\t\t\t\t\tif (j + k + l == x) {\n\t\t\t\t\t\t\tanswer++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(answer);\n\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.ArrayList; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); ArrayList<String> lines = new ArrayList<String>(); int in = 0; while (true) { String string = sc.nextLine(); if (string.equals("0 0")) { break; } lines.add(string); in++; } for (int i = 0; i < in; i++) { int answer = 0; String[] kari = lines.get(i).split(" "); int n = Integer.parseInt(kari[0]); int x = Integer.parseInt(kari[1]); for (int j = 1; j <= n - 2; j++) { for (int k = j + 1; k <= n - 1; k++) { for (int l = k + 1; l <= n; l++) { if (j + k + l == x) { answer++; } } } } System.out.println(answer); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 2, 13, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 2, 2, 13, 13, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 18, 13, 13, 18, 13, 2, 13, 13, 18, 13, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 151, 5 ], [ 151, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 12, 17 ], [ 17, 18 ], [ 17, 19 ], [ 12, 20 ], [ 20, 21 ], [ 21, 22 ], [ 12, 23 ], [ 24, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 24, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 24, 35 ], [ 35, 36 ], [ 35, 37 ], [ 24, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 24, 48 ], [ 48, 49 ], [ 48, 50 ], [ 24, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 52, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 69, 71 ], [ 24, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 72, 82 ], [ 82, 83 ], [ 83, 84 ], [ 72, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 87, 97 ], [ 97, 98 ], [ 98, 99 ], [ 87, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 109, 109 ], [ 109, 110 ], [ 109, 111 ], [ 109, 112 ], [ 107, 113 ], [ 102, 114 ], [ 114, 115 ], [ 115, 116 ], [ 102, 117 ], [ 118, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 122, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 128, 130 ], [ 122, 131 ], [ 131, 132 ], [ 131, 133 ], [ 134, 134 ], [ 134, 135 ], [ 134, 136 ], [ 134, 137 ], [ 120, 138 ], [ 119, 139 ], [ 139, 140 ], [ 140, 141 ], [ 24, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 6, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}\n\t}\n\n}", "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\tfor(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "for(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a>0", "a", "0", "a++", "a++", "a", "{\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}", "{\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}", "int n =scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "int H = 0;", "H", "0", "if(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "int k[] = new int[n];", "k", "new int[n]", "n", "for(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}", "int b = 0;", "int b = 0;", "b", "0", "b<n", "b", "n", "b++", "b++", "b", "{\n\t\t\t\tk[b] = b+1;\n\t\t\t}", "{\n\t\t\t\tk[b] = b+1;\n\t\t\t}", "k[b] = b+1", "k[b]", "k", "b", "b+1", "b", "1", "for(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int c = 0;", "int c = 0;", "c", "0", "c<n-2", "c", "n-2", "n", "2", "c++", "c++", "c", "{\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int d = 1;", "int d = 1;", "d", "1", "d+c<n", "d+c", "d", "c", "n", "d++", "d++", "d", "{\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int e = 1;", "int e = 1;", "e", "1", "e+d+c<n", "e+d+c", "e+d+c", "e", "d", "c", "n", "e++", "e++", "e", "{\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}", "k[c] + k[d+c] + k[e+d+c] == x", "k[c] + k[d+c] + k[e+d+c]", "k[c] + k[d+c] + k[e+d+c]", "k[c]", "k", "c", "k[d+c]", "k", "d+c", "d", "c", "k[e+d+c]", "k", "e+d+c", "e+d+c", "e", "d", "c", "x", "{\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}", "H++", "H", "System.out.println(H)", "System.out.println", "System.out", "System", "System.out", "H", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tfor(int a = 1;a>0;a++){\n\t\t\tint n =scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint H = 0;\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint k[] = new int[n];\n\t\t\tfor(int b = 0;b<n;b++){\n\t\t\t\tk[b] = b+1;\n\t\t\t}\n\t\t\tfor(int c = 0;c<n-2;c++){\n\t\t\t\tfor(int d = 1;d+c<n;d++){\n\t\t\t\t\tfor(int e = 1;e+d+c<n;e++){\n\t\t\t\t\t\tif(k[c] + k[d+c] + k[e+d+c] == x){\n\t\t\t\t\t\t\tH++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(H);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); for(int a = 1;a>0;a++){ int n =scan.nextInt(); int x = scan.nextInt(); int H = 0; if(n == 0 && x == 0){ break; } int k[] = new int[n]; for(int b = 0;b<n;b++){ k[b] = b+1; } for(int c = 0;c<n-2;c++){ for(int d = 1;d+c<n;d++){ for(int e = 1;e+d+c<n;e++){ if(k[c] + k[d+c] + k[e+d+c] == x){ H++; } } } } System.out.println(H); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 42, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 40, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 13, 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 ], [ 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 ], [ 8, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 25, 29 ], [ 29, 30 ], [ 29, 31 ], [ 24, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 43, 44 ], [ 43, 45 ], [ 32, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 47, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 71, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 72, 77 ], [ 77, 78 ], [ 77, 79 ], [ 72, 80 ], [ 80, 81 ], [ 81, 82 ], [ 72, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 90, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 85, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 101, 101 ], [ 101, 102 ], [ 101, 103 ], [ 101, 104 ], [ 99, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 56, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 8, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 118, 119 ], [ 118, 120 ], [ 113, 121 ], [ 121, 122 ], [ 122, 123 ], [ 113, 124 ], [ 125, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 126, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 6, 135 ], [ 135, 136 ], [ 0, 137 ], [ 137, 138 ], [ 137, 139 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tLinkedList<Integer> ll = new LinkedList<>();\n\t\t\n\t\tint n = 999;\n\t\tint x = 999;\n\t\tint cnt = 0;\n\t\twhile(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tLinkedList<Integer> ll = new LinkedList<>();\n\t\t\n\t\tint n = 999;\n\t\tint x = 999;\n\t\tint cnt = 0;\n\t\twhile(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\t\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tLinkedList<Integer> ll = new LinkedList<>();\n\t\t\n\t\tint n = 999;\n\t\tint x = 999;\n\t\tint cnt = 0;\n\t\twhile(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}\n\t}", "main", "{\n\t\t\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tLinkedList<Integer> ll = new LinkedList<>();\n\t\t\n\t\tint n = 999;\n\t\tint x = 999;\n\t\tint cnt = 0;\n\t\twhile(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "LinkedList<Integer> ll = new LinkedList<>();", "ll", "new LinkedList<>()", "int n = 999;", "n", "999", "int x = 999;", "x", "999", "int cnt = 0;", "cnt", "0", "while(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}", "n != 0 || x != 0", "n != 0", "n", "0", "x != 0", "x", "0", "{\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "if(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "{\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}", "cnt++", "cnt", "for(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j < i", "j", "i", "j++", "j++", "j", "{\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k < j", "k", "j", "k++", "k++", "k", "{\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}", "i + k + j == x", "i + k + j", "i + k + j", "i", "k", "j", "x", "{\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}", "ans++", "ans", "ll.add(ans)", "ll.add", "ll", "ans", "for(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < cnt", "i", "cnt", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}", "{\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}", "System.out.println(ll.get(i))", "System.out.println", "System.out", "System", "System.out", "ll.get(i)", "ll.get", "ll", "i", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tLinkedList<Integer> ll = new LinkedList<>();\n\t\t\n\t\tint n = 999;\n\t\tint x = 999;\n\t\tint cnt = 0;\n\t\twhile(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\t\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tLinkedList<Integer> ll = new LinkedList<>();\n\t\t\n\t\tint n = 999;\n\t\tint x = 999;\n\t\tint cnt = 0;\n\t\twhile(n != 0 || x != 0) {\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t\tint ans = 0;\n\t\t\tif(n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tcnt++;\n\t\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\t\tfor(int j = 1; j < i; j++) {\n\t\t\t\t\t\tfor(int k = 1; k < j; k++) {\n\t\t\t\t\t\t\tif(i + k + j == x) {\n\t\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tll.add(ans);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < cnt; i++) {\n\t\t\tSystem.out.println(ll.get(i));\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); LinkedList<Integer> ll = new LinkedList<>(); int n = 999; int x = 999; int cnt = 0; while(n != 0 || x != 0) { n = sc.nextInt(); x = sc.nextInt(); int ans = 0; if(n == 0 && x == 0) { break; } else { cnt++; for(int i = 1; i <= n; i++) { for(int j = 1; j < i; j++) { for(int k = 1; k < j; k++) { if(i + k + j == x) { ans++; } } } } ll.add(ans); } } for(int i = 0; i < cnt; i++) { System.out.println(ll.get(i)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 14, 35 ], [ 35, 36 ], [ 35, 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 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 53, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 53, 65 ], [ 65, 66 ], [ 66, 67 ], [ 53, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 77, 78 ], [ 77, 79 ], [ 70, 80 ], [ 80, 81 ], [ 81, 82 ], [ 70, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 86, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 14, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 8, 102 ], [ 102, 103 ], [ 103, 104 ], [ 6, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "import java.util.Scanner;\n\n// (1) ????????????????????????\n\t// (1.1) n???????????????\n\t// (1.2) x???????????????\n\t// (1.3) n??¨x???0?????????????????????????????????????????????\n\t// (1.4) ?????????????????????????????\\???????????°sum????????????0??§????????????\n\t// (1.5) i???1??????(n - 2)????????\\?????????????????????\n\t\t// (1.5.1) j???i + 1??????(n - 1)????????\\?????????????????????\n\t\t\t// (1.5.1.1) k???j + 1??????n????????\\?????????????????????\n\t\t\t\t// (1.5.1.1.1) ?????????(i + j + k)???x????????°?????\\?????????????????????\n\t\t\t\t\t// (1.5.1.1.1.1) sum?????°???1?¢???????\n\t// (1.6) ????????????????????°?????¨?????????\n// (2) scan?????????????????????\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}\n\t\tscan.close();\n\t}\n}", "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\twhile (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}\n\t\tscan.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "while (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}", "true", "{\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "int sum = 0;", "sum", "0", "for (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= (n - 2)", "i", "(n - 2)", "n", "2", "i++", "i++", "i", "{\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int j = (i + 1);", "int j = (i + 1);", "j", "(i + 1)", "i", "1", "j <= (n - 1)", "j", "(n - 1)", "n", "1", "j++", "j++", "j", "{\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}", "int k = (j + 1);", "int k = (j + 1);", "k", "(j + 1)", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}", "if ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}", "sum++", "sum", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "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\twhile (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}\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\twhile (true) {\n\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tint sum = 0;\n\n\t\tfor (int i = 1; i <= (n - 2); i++){\n\t\t\tfor (int j = (i + 1); j <= (n - 1); j++) {\n\t\t\t\tfor (int k = (j + 1); k <= n; k++) {\n\t\t\t\t\tif ((i + j + k) == x) {\n\t\t\t\t\t\tsum++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\t\t}\n\t\tscan.close();\n\t}\n}", "Main" ]
import java.util.Scanner; // (1) ???????????????????????? // (1.1) n??????????????? // (1.2) x??????????????? // (1.3) n??¨x???0????????????????????????????????????????????? // (1.4) ?????????????????????????????\???????????°sum????????????0??§???????????? // (1.5) i???1??????(n - 2)????????\????????????????????? // (1.5.1) j???i + 1??????(n - 1)????????\????????????????????? // (1.5.1.1) k???j + 1??????n????????\????????????????????? // (1.5.1.1.1) ?????????(i + j + k)???x????????°?????\????????????????????? // (1.5.1.1.1.1) sum?????°???1?¢??????? // (1.6) ????????????????????°?????¨????????? // (2) scan????????????????????? public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (true) { int n = scan.nextInt(); int x = scan.nextInt(); if (n == 0 && x == 0) { break; } int sum = 0; for (int i = 1; i <= (n - 2); i++){ for (int j = (i + 1); j <= (n - 1); j++) { for (int k = (j + 1); k <= n; k++) { if ((i + j + k) == x) { sum++; } } } } System.out.println(sum); } scan.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 0, 13, 2, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 13, 17, 14, 2, 13, 13, 30, 0, 13, 2, 13, 17, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 134, 5 ], [ 134, 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 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 17, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 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 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 64, 65 ], [ 53, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 80, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 80, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 80, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 112, 118 ], [ 111, 119 ], [ 119, 120 ], [ 120, 121 ], [ 17, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 17, 128 ], [ 128, 129 ], [ 128, 130 ], [ 6, 131 ], [ 131, 132 ], [ 0, 133 ], [ 133, 134 ], [ 133, 135 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int cnt = 0;\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }\n \n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int cnt = 0;\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }\n \n }\n\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int cnt = 0;\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }\n \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int cnt = 0;\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int cnt = 0;", "cnt", "0", "while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }", "true", "{\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if (n == 0 && x == 0) {\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n - 2", "i", "n - 2", "n", "2", "i++", "i++", "i", "{\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }", "{\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }", "for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }", "int j = 2;", "int j = 2;", "j", "2", "j <= n - 1", "j", "n - 1", "n", "1", "j++", "j++", "j", "{\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }", "{\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }", "for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }", "int k = 3;", "int k = 3;", "k", "3", "k <= n", "k", "n", "k++", "k++", "k", "{\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }", "{\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }", "if (i >= j) {\n j = i + 1;\n }", "i >= j", "i", "j", "{\n j = i + 1;\n }", "j = i + 1", "j", "i + 1", "i", "1", "if (i >= k) {\n k = i + 1;\n }", "i >= k", "i", "k", "{\n k = i + 1;\n }", "k = i + 1", "k", "i + 1", "i", "1", "if (j >= k) {\n k = j + 1;\n }", "j >= k", "j", "k", "{\n k = j + 1;\n }", "k = j + 1", "k", "j + 1", "j", "1", "if ((i + j + k) == x) {\n cnt++;\n }", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "{\n cnt++;\n }", "cnt++", "cnt", "System.out.println(cnt)", "System.out.println", "System.out", "System", "System.out", "cnt", "cnt = 0", "cnt", "0", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int cnt = 0;\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }\n \n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int cnt = 0;\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; i <= n - 2; i++) {\n for (int j = 2; j <= n - 1; j++) {\n for (int k = 3; k <= n; k++) {\n if (i >= j) {\n j = i + 1;\n }\n if (i >= k) {\n k = i + 1;\n }\n if (j >= k) {\n k = j + 1;\n }\n if ((i + j + k) == x) {\n cnt++;\n }\n }\n }\n }\n System.out.println(cnt);\n cnt = 0;\n }\n \n }\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int cnt = 0; while (true) { int n = sc.nextInt(); int x = sc.nextInt(); if (n == 0 && x == 0) { break; } for (int i = 1; i <= n - 2; i++) { for (int j = 2; j <= n - 1; j++) { for (int k = 3; k <= n; k++) { if (i >= j) { j = i + 1; } if (i >= k) { k = i + 1; } if (j >= k) { k = j + 1; } if ((i + j + k) == x) { cnt++; } } } } System.out.println(cnt); cnt = 0; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 25, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 37, 47 ], [ 47, 48 ], [ 48, 49 ], [ 37, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 52, 64 ], [ 64, 65 ], [ 65, 66 ], [ 52, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 69, 81 ], [ 81, 82 ], [ 82, 83 ], [ 69, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 89, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 87, 93 ], [ 86, 94 ], [ 94, 95 ], [ 14, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 6, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }\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 while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }", "true", "{\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n+1", "i", "n+1", "n", "1", "i++", "i++", "i", "{\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }", "{\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }", "for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j < n+1", "j", "n+1", "n", "1", "j++", "j++", "j", "{\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }", "{\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }", "for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k < n+1", "k", "n+1", "n", "1", "k++", "k++", "k", "{\n if (i+j+k == x) ans++;\n }", "{\n if (i+j+k == x) ans++;\n }", "if (i+j+k == x) ans++;", "i+j+k == x", "i+j+k", "i+j+k", "i", "j", "k", "x", "ans++", "ans", "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 Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n int ans = 0;\n if (n == 0 && x == 0) break;\n for (int i = 1; i < n+1; i++) {\n for (int j = i+1; j < n+1; j++) {\n for (int k = j+1; k < n+1; k++) {\n if (i+j+k == x) ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int x = sc.nextInt(); int ans = 0; if (n == 0 && x == 0) break; for (int i = 1; i < n+1; i++) { for (int j = i+1; j < n+1; j++) { for (int k = j+1; k < n+1; k++) { if (i+j+k == x) ans++; } } } System.out.println(ans); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 20, 17, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 0, 18, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 0, 18, 13, 17, 13, 14, 2, 2, 2, 18, 13, 17, 18, 13, 17, 18, 13, 17, 13, 30, 0, 13, 17, 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 ], [ 144, 8 ], [ 144, 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 ], [ 22, 24 ], [ 11, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 28, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 39, 40 ], [ 39, 41 ], [ 28, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 42, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 53, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 62, 63 ], [ 53, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 65, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 76, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 71, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 88, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 103, 104 ], [ 94, 105 ], [ 106, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 111, 117 ], [ 117, 118 ], [ 118, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 124, 126 ], [ 120, 127 ], [ 127, 128 ], [ 127, 129 ], [ 118, 130 ], [ 117, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 28, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 135, 140 ], [ 9, 141 ], [ 141, 142 ], [ 0, 143 ], [ 143, 144 ], [ 143, 145 ] ]
[ "import java.io.IOException;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main (String args[]) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tStringBuffer buf =new StringBuffer();\n \tint m,f;\n\n \t int[]c = new int[3];\n\n \t while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }\n\n\n}\n}", "import java.io.IOException;", "IOException", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main (String args[]) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tStringBuffer buf =new StringBuffer();\n \tint m,f;\n\n \t int[]c = new int[3];\n\n \t while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }\n\n\n}\n}", "Main", "public static void main (String args[]) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tStringBuffer buf =new StringBuffer();\n \tint m,f;\n\n \t int[]c = new int[3];\n\n \t while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }\n\n\n}", "main", "{\n \tScanner sc = new Scanner(System.in);\n \tStringBuffer buf =new StringBuffer();\n \tint m,f;\n\n \t int[]c = new int[3];\n\n \t while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }\n\n\n}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "StringBuffer buf =new StringBuffer();", "buf", "new StringBuffer()", "int m", "m", "f;", "f", "int[]c = new int[3];", "c", "new int[3]", "3", "while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }", "true", "{\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int count = 0;", "count", "0", "if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n \t break;\n\n \t }", "break;", "{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }", "for(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }", "int a=1;", "int a=1;", "a", "1", "a<=n", "a", "n", "a++", "a++", "a", "{\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }", "{\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }", "c[0]=a", "c[0]", "c", "0", "a", "for(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}", "int b=1;", "int b=1;", "b", "1", "b<=n", "b", "n", "b++", "b++", "b", "{\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}", "{\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}", "if(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}", "a<b", "a", "b", "{\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}", "c[1]=b", "c[1]", "c", "1", "b", "for(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}", "int d=1;", "int d=1;", "d", "1", "d<=n", "d", "n", "d++", "d++", "d", "{\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}", "{\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}", "if(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}", "b<d", "b", "d", "{\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}", "c[2]=d", "c[2]", "c", "2", "d", "if(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}", "c[0]+c[1]+c[2]==x", "c[0]+c[1]+c[2]", "c[0]+c[1]+c[2]", "c[0]", "c", "0", "c[1]", "c", "1", "c[2]", "c", "2", "x", "{\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}", "count +=1", "count", "1", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String args[]", "args", "public class Main {\n public static void main (String args[]) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tStringBuffer buf =new StringBuffer();\n \tint m,f;\n\n \t int[]c = new int[3];\n\n \t while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }\n\n\n}\n}", "public class Main {\n public static void main (String args[]) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tStringBuffer buf =new StringBuffer();\n \tint m,f;\n\n \t int[]c = new int[3];\n\n \t while(true){\n \t int n = sc.nextInt();\n \t int x = sc.nextInt();\n \t int count = 0;\n \t if(n==0&&x==0){\n \t break;\n\n \t }else{\n \t \tfor(int a=1;a<=n;a++){\n \t \tc[0]=a;\n \t \tfor(int b=1;b<=n;b++){\n \t \t\tif(a<b){\n \t \t\t\tc[1]=b;\n \t \t\t\tfor(int d=1;d<=n;d++){\n \t \t\t\t\tif(b<d){\n \t \t\t\t\t\tc[2]=d;\n \t \t\t\t\t\tif(c[0]+c[1]+c[2]==x){\n \t \t\t\t\t\t\tcount +=1;\n \t \t\t\t\t\t}\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t }\n \t System.out.println(count);\n \t }\n\n\n}\n}", "Main" ]
import java.io.IOException; import java.util.Scanner; public class Main { public static void main (String args[]) throws IOException { Scanner sc = new Scanner(System.in); StringBuffer buf =new StringBuffer(); int m,f; int[]c = new int[3]; while(true){ int n = sc.nextInt(); int x = sc.nextInt(); int count = 0; if(n==0&&x==0){ break; }else{ for(int a=1;a<=n;a++){ c[0]=a; for(int b=1;b<=n;b++){ if(a<b){ c[1]=b; for(int d=1;d<=n;d++){ if(b<d){ c[2]=d; if(c[0]+c[1]+c[2]==x){ count +=1; } } } } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 41, 13, 41, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 30, 14, 2, 13, 2, 2, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 118, 5 ], [ 118, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 12, 17 ], [ 17, 18 ], [ 18, 19 ], [ 12, 20 ], [ 21, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 21, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 21, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 21, 41 ], [ 41, 42 ], [ 21, 43 ], [ 43, 44 ], [ 21, 45 ], [ 45, 46 ], [ 21, 47 ], [ 47, 48 ], [ 47, 49 ], [ 21, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 76, 84 ], [ 84, 85 ], [ 85, 86 ], [ 76, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 102, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 98, 106 ], [ 106, 107 ], [ 107, 108 ], [ 21, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 6, 115 ], [ 115, 116 ], [ 0, 117 ], [ 117, 118 ], [ 117, 119 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tfor(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tfor(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tfor(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tfor(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "for(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i++", "i++", "i", "{\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "{\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0 && x==0)break;", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "int j", "j", "k", "k", "l;", "l", "int count = 0;", "count", "0", "for(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "j=1;", "j=1", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "k=1;", "k=1", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "l=1;", "l=1", "l", "1", "l<=n", "l", "n", "l++", "l++", "l", "{\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "j<k&&k<l", "j<k", "j", "k", "k<l", "k", "l", "{\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}", "x==j+k+l", "x", "j+k+l", "j+k+l", "j", "k", "l", "{\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "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\tfor(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tfor(int i=0;;i++) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n==0 && x==0)break;\n\t\t\tint j,k,l;\n\t\t\tint count = 0;\n\t\t\tfor(j=1;j<=n;j++) {\n\t\t\t\tfor(k=1;k<=n;k++) {\n\t\t\t\t\tfor(l=1;l<=n;l++) {\n\t\t\t\t\t\tif(j<k&&k<l) {\n\t\t\t\t\t\t\tif(x==j+k+l) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); for(int i=0;;i++) { int n = sc.nextInt(); int x = sc.nextInt(); if(n==0 && x==0)break; int j,k,l; int count = 0; for(j=1;j<=n;j++) { for(k=1;k<=n;k++) { for(l=1;l<=n;l++) { if(j<k&&k<l) { if(x==j+k+l) { count++; } } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 12, 13, 30, 41, 13, 20, 4, 18, 13, 17, 42, 2, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 17, 12, 13, 30, 4, 18, 20, 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 ], [ 4, 13 ], [ 13, 14 ], [ 13, 15 ], [ 4, 16 ], [ 16, 17 ], [ 4, 18 ], [ 18, 19 ], [ 4, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 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 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 53, 57 ], [ 34, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 58, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 73, 85 ], [ 85, 86 ], [ 86, 87 ], [ 73, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 97, 98 ], [ 97, 99 ], [ 90, 100 ], [ 100, 101 ], [ 101, 102 ], [ 90, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 111, 113 ], [ 107, 114 ], [ 114, 115 ], [ 114, 116 ], [ 105, 117 ], [ 117, 118 ], [ 105, 119 ], [ 119, 120 ], [ 120, 121 ], [ 122, 122 ], [ 122, 123 ], [ 122, 124 ], [ 122, 125 ], [ 120, 126 ], [ 119, 127 ], [ 127, 128 ], [ 128, 129 ], [ 34, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 34, 136 ], [ 136, 137 ], [ 136, 138 ], [ 4, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 139, 145 ], [ 145, 146 ] ]
[ "import java.util.Scanner;\nclass Main{\n int n,x,y=0,z=0;\n boolean a;\n String b;\n public void solve(){\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"\\\\s\");\n while(a == false){\n n = sc.nextInt();\n x = sc.nextInt();\n if(n == 0 && x == 0){\n a = true;\n break;\n }\n for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }\n System.out.println(z);\n z = 0;\n }\n }\n public static void main(String[] args){\n new Main().solve();\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n int n,x,y=0,z=0;\n boolean a;\n String b;\n public void solve(){\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"\\\\s\");\n while(a == false){\n n = sc.nextInt();\n x = sc.nextInt();\n if(n == 0 && x == 0){\n a = true;\n break;\n }\n for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }\n System.out.println(z);\n z = 0;\n }\n }\n public static void main(String[] args){\n new Main().solve();\n }\n}", "Main", "int n", "n", "x", "x", "y=0", "y", "0", "z=0;", "z", "0", "boolean a;", "a", "String b;", "b", "public void solve(){\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"\\\\s\");\n while(a == false){\n n = sc.nextInt();\n x = sc.nextInt();\n if(n == 0 && x == 0){\n a = true;\n break;\n }\n for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }\n System.out.println(z);\n z = 0;\n }\n }", "solve", "{\n Scanner sc = new Scanner(System.in);\n sc.useDelimiter(\"\\\\s\");\n while(a == false){\n n = sc.nextInt();\n x = sc.nextInt();\n if(n == 0 && x == 0){\n a = true;\n break;\n }\n for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }\n System.out.println(z);\n z = 0;\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "sc.useDelimiter(\"\\\\s\")", "sc.useDelimiter", "sc", "\"\\\\s\"", "while(a == false){\n n = sc.nextInt();\n x = sc.nextInt();\n if(n == 0 && x == 0){\n a = true;\n break;\n }\n for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }\n System.out.println(z);\n z = 0;\n }", "a == false", "a", "false", "{\n n = sc.nextInt();\n x = sc.nextInt();\n if(n == 0 && x == 0){\n a = true;\n break;\n }\n for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }\n System.out.println(z);\n z = 0;\n }", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0 && x == 0){\n a = true;\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n a = true;\n break;\n }", "a = true", "a", "true", "break;", "for(int s1 = 1;s1 <= n-2; s1++){\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }", "int s1 = 1;", "int s1 = 1;", "s1", "1", "s1 <= n-2", "s1", "n-2", "n", "2", "s1++", "s1++", "s1", "{\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }", "{\n for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }\n }", "for(int s2 = s1+1;s2 <= n-1; s2++){\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }", "int s2 = s1+1;", "int s2 = s1+1;", "s2", "s1+1", "s1", "1", "s2 <= n-1", "s2", "n-1", "n", "1", "s2++", "s2++", "s2", "{\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }", "{\n for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }\n }", "for(int s3 = s2+1;s3 <= n; s3++){\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }", "int s3 = s2+1;", "int s3 = s2+1;", "s3", "s2+1", "s2", "1", "s3 <= n", "s3", "n", "s3++", "s3++", "s3", "{\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }", "{\n if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }\n }", "if(s1 == s2 || s1 == s3 || s2 == s3){\n break;\n }else if(s1 + s2 + s3 == x){\n z++;\n }", "s1 == s2 || s1 == s3 || s2 == s3", "s1 == s2 || s1 == s3 || s2 == s3", "s1 == s2", "s1", "s2", "s1 == s3", "s1", "s3", "s2 == s3", "s2", "s3", "{\n break;\n }", "break;", "if(s1 + s2 + s3 == x){\n z++;\n }", "s1 + s2 + s3 == x", "s1 + s2 + s3", "s1 + s2 + s3", "s1", "s2", "s3", "x", "{\n z++;\n }", "z++", "z", "System.out.println(z)", "System.out.println", "System.out", "System", "System.out", "z", "z = 0", "z", "0", "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" ]
import java.util.Scanner; class Main{ int n,x,y=0,z=0; boolean a; String b; public void solve(){ Scanner sc = new Scanner(System.in); sc.useDelimiter("\\s"); while(a == false){ n = sc.nextInt(); x = sc.nextInt(); if(n == 0 && x == 0){ a = true; break; } for(int s1 = 1;s1 <= n-2; s1++){ for(int s2 = s1+1;s2 <= n-1; s2++){ for(int s3 = s2+1;s3 <= n; s3++){ if(s1 == s2 || s1 == s3 || s2 == s3){ break; }else if(s1 + s2 + s3 == x){ z++; } } } } System.out.println(z); z = 0; } } public static void main(String[] args){ new Main().solve(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 17, 30, 0, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 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 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 17, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 31, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 55, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 77, 78 ], [ 77, 79 ], [ 70, 80 ], [ 80, 81 ], [ 81, 82 ], [ 70, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 88, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 86, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 41, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 6, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\twhile(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\n\n\n\n\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\t\tint count = 0;\n\t\twhile(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\n\n\n\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\twhile(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\n\n\n\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\twhile(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\n\n\n\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int count = 0;", "count", "0", "while(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}", "true", "{\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}", "count = 0", "count", "0", "int num1 = sc.nextInt();", "num1", "sc.nextInt()", "sc.nextInt", "sc", "int num2 = sc.nextInt();", "num2", "sc.nextInt()", "sc.nextInt", "sc", "if(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}", "num1 == 0 && num2 == 0", "num1 == 0", "num1", "0", "num2 == 0", "num2", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "{\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}", "for(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= num1", "i", "num1", "i++", "i++", "i", "{\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= num1", "j", "num1", "j++", "j++", "j", "{\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int y = j + 1;", "int y = j + 1;", "y", "j + 1", "j", "1", "y <= num1", "y", "num1", "y++", "y++", "y", "{\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}", "i + j + y == num2", "i + j + y", "i + j + y", "i", "j", "y", "num2", "{\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\twhile(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\n\n\n\n\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\twhile(true) {\n\t\t\tcount = 0;\n\t\t\tint num1 = sc.nextInt();\n\t\t\tint num2 = sc.nextInt();\n\t\t\tif(num1 == 0 && num2 == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\tfor(int i = 1;i <= num1; i++){\n\t\t\t\t\tfor(int j = i + 1;j <= num1;j++){\n\t\t\t\t\t\tfor(int y = j + 1;y <= num1;y++){\n\t\t\t\t\t\t\tif(i + j + y == num2) {\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\n\n\n\n\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = 0; while(true) { count = 0; int num1 = sc.nextInt(); int num2 = sc.nextInt(); if(num1 == 0 && num2 == 0) { break; } else { for(int i = 1;i <= num1; i++){ for(int j = i + 1;j <= num1;j++){ for(int y = j + 1;y <= num1;y++){ if(i + j + y == num2) { count++; } } } } System.out.println(count); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 41, 13, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 29, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 40, 13, 4, 18, 18, 13, 13, 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 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 17, 18 ], [ 18, 19 ], [ 16, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 20, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 20, 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 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 58, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 58, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 76, 76 ], [ 76, 77 ], [ 76, 78 ], [ 76, 79 ], [ 72, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 20, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 6, 96 ], [ 96, 97 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n, sum;\n \n while(in.hasNext()) {\n int count = 0;\n n = in.nextInt();\n sum = in.nextInt();\n if (n == 0 && sum == 0) return;\n \n for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }\n System.out.println(count);\n }\n }\n}\n ", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n, sum;\n \n while(in.hasNext()) {\n int count = 0;\n n = in.nextInt();\n sum = in.nextInt();\n if (n == 0 && sum == 0) return;\n \n for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }\n System.out.println(count);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n, sum;\n \n while(in.hasNext()) {\n int count = 0;\n n = in.nextInt();\n sum = in.nextInt();\n if (n == 0 && sum == 0) return;\n \n for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }\n System.out.println(count);\n }\n }", "main", "{\n Scanner in = new Scanner(System.in);\n int n, sum;\n \n while(in.hasNext()) {\n int count = 0;\n n = in.nextInt();\n sum = in.nextInt();\n if (n == 0 && sum == 0) return;\n \n for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }\n System.out.println(count);\n }\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int n", "n", "sum;", "sum", "while(in.hasNext()) {\n int count = 0;\n n = in.nextInt();\n sum = in.nextInt();\n if (n == 0 && sum == 0) return;\n \n for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }\n System.out.println(count);\n }", "in.hasNext()", "in.hasNext", "in", "{\n int count = 0;\n n = in.nextInt();\n sum = in.nextInt();\n if (n == 0 && sum == 0) return;\n \n for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }\n System.out.println(count);\n }", "int count = 0;", "count", "0", "n = in.nextInt()", "n", "in.nextInt()", "in.nextInt", "in", "sum = in.nextInt()", "sum", "in.nextInt()", "in.nextInt", "in", "if (n == 0 && sum == 0) return;", "n == 0 && sum == 0", "n == 0", "n", "0", "sum == 0", "sum", "0", "return;", "for (int i = 1; i < n -1; i++) {\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n -1", "i", "n -1", "n", "1", "i++", "i++", "i", "{\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }", "{\n for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }\n }", "for (int j = i + 1; j < n; j++) {\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }", "{\n int rest = sum - i -j;\n if (rest > j && rest <= n) count++;\n }", "int rest = sum - i -j;", "rest", "sum - i -j", "sum - i -j", "sum", "i", "j", "if (rest > j && rest <= n) count++;", "rest > j && rest <= n", "rest > j", "rest", "j", "rest <= n", "rest", "n", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n, sum; while(in.hasNext()) { int count = 0; n = in.nextInt(); sum = in.nextInt(); if (n == 0 && sum == 0) return; for (int i = 1; i < n -1; i++) { for (int j = i + 1; j < n; j++) { int rest = sum - i -j; if (rest > j && rest <= n) count++; } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 20, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 2, 13, 13, 14, 2, 2, 2, 2, 2, 13, 13, 2, 13, 17, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 2, 13, 17, 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 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 18, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 18, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 18, 38 ], [ 38, 39 ], [ 38, 40 ], [ 18, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 78, 76 ], [ 88, 77 ], [ 85, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 85, 85 ], [ 85, 86 ], [ 85, 87 ], [ 88, 88 ], [ 88, 89 ], [ 88, 90 ], [ 78, 91 ], [ 91, 92 ], [ 91, 93 ], [ 74, 94 ], [ 94, 95 ], [ 95, 96 ], [ 18, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 102, 104 ], [ 6, 105 ], [ 105, 106 ] ]
[ "import java.util.Scanner;\n \nclass Main{\n public static void main(String[] arg){\n int n, x;\n\n Scanner in = new Scanner(System.in);\n\n while(true){\n n = in.nextInt();\n x = in.nextInt();\n \n if(n == 0 && x == 0) break;\n\n int cnt = 0;\n \n for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }\n\n System.out.println(cnt/3);\n }\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] arg){\n int n, x;\n\n Scanner in = new Scanner(System.in);\n\n while(true){\n n = in.nextInt();\n x = in.nextInt();\n \n if(n == 0 && x == 0) break;\n\n int cnt = 0;\n \n for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }\n\n System.out.println(cnt/3);\n }\n\n }\n}", "Main", "public static void main(String[] arg){\n int n, x;\n\n Scanner in = new Scanner(System.in);\n\n while(true){\n n = in.nextInt();\n x = in.nextInt();\n \n if(n == 0 && x == 0) break;\n\n int cnt = 0;\n \n for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }\n\n System.out.println(cnt/3);\n }\n\n }", "main", "{\n int n, x;\n\n Scanner in = new Scanner(System.in);\n\n while(true){\n n = in.nextInt();\n x = in.nextInt();\n \n if(n == 0 && x == 0) break;\n\n int cnt = 0;\n \n for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }\n\n System.out.println(cnt/3);\n }\n\n }", "int n", "n", "x;", "x", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "while(true){\n n = in.nextInt();\n x = in.nextInt();\n \n if(n == 0 && x == 0) break;\n\n int cnt = 0;\n \n for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }\n\n System.out.println(cnt/3);\n }", "true", "{\n n = in.nextInt();\n x = in.nextInt();\n \n if(n == 0 && x == 0) break;\n\n int cnt = 0;\n \n for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }\n\n System.out.println(cnt/3);\n }", "n = in.nextInt()", "n", "in.nextInt()", "in.nextInt", "in", "x = in.nextInt()", "x", "in.nextInt()", "in.nextInt", "in", "if(n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int cnt = 0;", "cnt", "0", "for(int first = n; first > 0; first--){\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }", "int first = n;", "int first = n;", "first", "n", "first > 0", "first", "0", "first--", "first--", "first", "{\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }", "{\n for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }\n }", "for(int second = 1; second < first; second++){\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }", "int second = 1;", "int second = 1;", "second", "1", "second < first", "second", "first", "second++", "second++", "second", "{\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }", "{\n int third = x - (first+second);\n if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }\n \n }", "int third = x - (first+second);", "third", "x - (first+second)", "x", "(first+second)", "first", "second", "if( first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second){\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }", "first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second", "third != first", "third <= n", "first != second &&\n third > 0 &&\n third <= n &&\n third != first &&\n third != second", "first != second", "first", "second", "third > 0", "third", "0", "third <= n", "third", "n", "third != first", "third", "first", "third != second", "third", "second", "{\n // debug System.out.println(\"first = \" + first + \" second = \" + second + \" third = \" + third);\n cnt++;\n }", "cnt++", "cnt", "System.out.println(cnt/3)", "System.out.println", "System.out", "System", "System.out", "cnt/3", "cnt", "3", "String[] arg", "arg" ]
import java.util.Scanner; class Main{ public static void main(String[] arg){ int n, x; Scanner in = new Scanner(System.in); while(true){ n = in.nextInt(); x = in.nextInt(); if(n == 0 && x == 0) break; int cnt = 0; for(int first = n; first > 0; first--){ for(int second = 1; second < first; second++){ int third = x - (first+second); if( first != second && third > 0 && third <= n && third != first && third != second){ // debug System.out.println("first = " + first + " second = " + second + " third = " + third); cnt++; } } } System.out.println(cnt/3); } } }
[ 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, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 3, 41, 13, 17, 41, 13, 2, 13, 17, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 13, 41, 13, 2, 13, 17, 41, 13, 2, 2, 13, 17, 17, 41, 13, 2, 2, 13, 17, 13, 0, 13, 8, 2, 13, 17, 13, 17, 0, 13, 8, 2, 13, 17, 17, 13, 4, 18, 4, 18, 13, 13, 17, 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 ], [ 8, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 19, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 19, 36 ], [ 36, 37 ], [ 36, 38 ], [ 19, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 19, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 56, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 56, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 56, 74 ], [ 74, 75 ], [ 74, 76 ], [ 77, 77 ], [ 77, 78 ], [ 77, 79 ], [ 77, 80 ], [ 56, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 83, 88 ], [ 56, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 91, 96 ], [ 19, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 97, 103 ], [ 8, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 109, 110 ], [ 110, 111 ], [ 6, 112 ], [ 112, 113 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while (in.hasNext()) {\n int n = in.nextInt();\n int x = in.nextInt();\n\n if (n == 0) {\n break;\n }\n\n int ret = 0;\n int n3min = x / 3;\n for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }\n\n sb.append(ret).append(\"\\n\");\n }\n\n System.out.print(sb.toString());\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while (in.hasNext()) {\n int n = in.nextInt();\n int x = in.nextInt();\n\n if (n == 0) {\n break;\n }\n\n int ret = 0;\n int n3min = x / 3;\n for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }\n\n sb.append(ret).append(\"\\n\");\n }\n\n System.out.print(sb.toString());\n }\n}", "Main", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while (in.hasNext()) {\n int n = in.nextInt();\n int x = in.nextInt();\n\n if (n == 0) {\n break;\n }\n\n int ret = 0;\n int n3min = x / 3;\n for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }\n\n sb.append(ret).append(\"\\n\");\n }\n\n System.out.print(sb.toString());\n }", "main", "{\n Scanner in = new Scanner(System.in);\n StringBuilder sb = new StringBuilder();\n\n while (in.hasNext()) {\n int n = in.nextInt();\n int x = in.nextInt();\n\n if (n == 0) {\n break;\n }\n\n int ret = 0;\n int n3min = x / 3;\n for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }\n\n sb.append(ret).append(\"\\n\");\n }\n\n System.out.print(sb.toString());\n }", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "while (in.hasNext()) {\n int n = in.nextInt();\n int x = in.nextInt();\n\n if (n == 0) {\n break;\n }\n\n int ret = 0;\n int n3min = x / 3;\n for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }\n\n sb.append(ret).append(\"\\n\");\n }", "in.hasNext()", "in.hasNext", "in", "{\n int n = in.nextInt();\n int x = in.nextInt();\n\n if (n == 0) {\n break;\n }\n\n int ret = 0;\n int n3min = x / 3;\n for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }\n\n sb.append(ret).append(\"\\n\");\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int x = in.nextInt();", "x", "in.nextInt()", "in.nextInt", "in", "if (n == 0) {\n break;\n }", "n == 0", "n", "0", "{\n break;\n }", "break;", "int ret = 0;", "ret", "0", "int n3min = x / 3;", "n3min", "x / 3", "x", "3", "for (int n3 = n; n3 >= n3min; n3--) {\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }", "int n3 = n;", "int n3 = n;", "n3", "n", "n3 >= n3min", "n3", "n3min", "n3--", "n3--", "n3", "{\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }", "{\n int x2 = x - n3;\n int n2 = n3 - 1;\n\n int max = (x2 - 1) / 2;\n int hosei = x2 - 1 - n2;\n max -= (hosei > 0) ? hosei : 0;\n\n ret += (max < 0) ? 0 : max;\n }", "int x2 = x - n3;", "x2", "x - n3", "x", "n3", "int n2 = n3 - 1;", "n2", "n3 - 1", "n3", "1", "int max = (x2 - 1) / 2;", "max", "(x2 - 1) / 2", "(x2 - 1)", "x2", "1", "2", "int hosei = x2 - 1 - n2;", "hosei", "x2 - 1 - n2", "x2 - 1 - n2", "x2", "1", "n2", "max -= (hosei > 0) ? hosei : 0", "max", "(hosei > 0) ? hosei : 0", "(hosei > 0)", "hosei", "0", "hosei", "0", "ret += (max < 0) ? 0 : max", "ret", "(max < 0) ? 0 : max", "(max < 0)", "max", "0", "0", "max", "sb.append(ret).append(\"\\n\")", "sb.append(ret).append", "sb.append(ret)", "sb.append", "sb", "ret", "\"\\n\"", "System.out.print(sb.toString())", "System.out.print", "System.out", "System", "System.out", "sb.toString()", "sb.toString", "sb", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); StringBuilder sb = new StringBuilder(); while (in.hasNext()) { int n = in.nextInt(); int x = in.nextInt(); if (n == 0) { break; } int ret = 0; int n3min = x / 3; for (int n3 = n; n3 >= n3min; n3--) { int x2 = x - n3; int n2 = n3 - 1; int max = (x2 - 1) / 2; int hosei = x2 - 1 - n2; max -= (hosei > 0) ? hosei : 0; ret += (max < 0) ? 0 : max; } sb.append(ret).append("\n"); } System.out.print(sb.toString()); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 4, 18, 18, 13, 13, 4, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 118, 5 ], [ 118, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 39, 42 ], [ 8, 43 ], [ 43, 44 ], [ 44, 45 ], [ 6, 46 ], [ 46, 47 ], [ 118, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 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 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 76, 77 ], [ 76, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 69, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 84, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 84, 96 ], [ 96, 97 ], [ 97, 98 ], [ 84, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 104, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 102, 108 ], [ 101, 109 ], [ 109, 110 ], [ 50, 111 ], [ 111, 112 ], [ 48, 113 ], [ 113, 114 ], [ 48, 115 ], [ 115, 116 ], [ 0, 117 ], [ 117, 118 ], [ 117, 119 ] ]
[ "import java.util.Scanner;\n\n\n\npublic class Main{\n\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan=new Scanner(System.in);\n\n\t\twhile(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}\n\n\t\tscan.close();\n\t}\n\n\tpublic static int return_num(int n, int x){\n\t\tint num=0;\n\n\t\tfor(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\treturn num;\n\t\t\t}\n\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan=new Scanner(System.in);\n\n\t\twhile(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}\n\n\t\tscan.close();\n\t}\n\n\tpublic static int return_num(int n, int x){\n\t\tint num=0;\n\n\t\tfor(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\treturn num;\n\t\t\t}\n\n\n}", "Main", "public static void main(String[] args){\n\n\t\tScanner scan=new Scanner(System.in);\n\n\t\twhile(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}\n\n\t\tscan.close();\n\t}", "main", "{\n\n\t\tScanner scan=new Scanner(System.in);\n\n\t\twhile(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}\n\n\t\tscan.close();\n\t}", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "while(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}", "true", "{\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}", "int n=scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x=scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(n==0&&x==0)break;", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "System.out.println(return_num(n,x))", "System.out.println", "System.out", "System", "System.out", "return_num(n,x)", "return_num", "n", "x", "scan.close()", "scan.close", "scan", "String[] args", "args", "public static int return_num(int n, int x){\n\t\tint num=0;\n\n\t\tfor(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\treturn num;\n\t\t\t}", "return_num", "{\n\t\tint num=0;\n\n\t\tfor(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\treturn num;\n\t\t\t}", "int num=0;", "num", "0", "for(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}", "for(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<n+1", "k", "n+1", "n", "1", "k++", "k++", "k", "{\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}", "{\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}", "if(i+j+k==x)num++;", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "num++", "num", "return num;", "num", "int n", "n", "int x", "x", "public class Main{\n\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan=new Scanner(System.in);\n\n\t\twhile(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}\n\n\t\tscan.close();\n\t}\n\n\tpublic static int return_num(int n, int x){\n\t\tint num=0;\n\n\t\tfor(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\treturn num;\n\t\t\t}\n\n\n}", "public class Main{\n\n\n\tpublic static void main(String[] args){\n\n\t\tScanner scan=new Scanner(System.in);\n\n\t\twhile(true){\n\t\tint n=scan.nextInt();\n\t\tint x=scan.nextInt();\n\n\t\tif(n==0&&x==0)break;\n\n\t\tSystem.out.println(return_num(n,x));\n\n\t\t}\n\n\t\tscan.close();\n\t}\n\n\tpublic static int return_num(int n, int x){\n\t\tint num=0;\n\n\t\tfor(int i=1;i<n-1;i++){\n\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\tfor(int k=j+1;k<n+1;k++){\n\t\t\t\t\tif(i+j+k==x)num++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\treturn num;\n\t\t\t}\n\n\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scan=new Scanner(System.in); while(true){ int n=scan.nextInt(); int x=scan.nextInt(); if(n==0&&x==0)break; System.out.println(return_num(n,x)); } scan.close(); } public static int return_num(int n, int x){ int num=0; for(int i=1;i<n-1;i++){ for(int j=i+1;j<n;j++){ for(int k=j+1;k<n+1;k++){ if(i+j+k==x)num++; } } } return num; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 128, 11 ], [ 128, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 20, 45 ], [ 45, 46 ], [ 45, 47 ], [ 20, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 20, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 88, 89 ], [ 88, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 83, 94 ], [ 95, 95 ], [ 95, 96 ], [ 96, 97 ], [ 99, 98 ], [ 110, 99 ], [ 99, 100 ], [ 100, 101 ], [ 102, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 100, 106 ], [ 99, 107 ], [ 107, 108 ], [ 107, 109 ], [ 110, 110 ], [ 110, 111 ], [ 110, 112 ], [ 99, 113 ], [ 113, 114 ], [ 113, 115 ], [ 96, 116 ], [ 116, 117 ], [ 117, 118 ], [ 20, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 12, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\npublic class Main{\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}\n\t}\n}", "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\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}", "true", "{\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}", "String[] line = br.readLine().split(\" \");", "line", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(line[0]);", "n", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "int x = Integer.parseInt(line[1]);", "x", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "int sun = 0;", "sun", "0", "if( n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <=i", "j", "i", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <=j", "k", "j", "k++", "k++", "k", "{\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}", "i+j+k == x && i != j && i != k && j != k", "i != k", "i+j+k == x && i != j && i != k && j != k", "i+j+k == x", "i+j+k", "i+j+k", "i", "j", "k", "x", "i != j", "i", "j", "i != k", "i", "k", "j != k", "j", "k", "{\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}", "sun++", "sun", "System.out.println(sun)", "System.out.println", "System.out", "System", "System.out", "sun", "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\twhile(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}\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\twhile(true){\n\t\t\tString[] line = br.readLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t\tint sun = 0;\n\t\t\tif( n == 0 && x == 0) break;\n\t\t\tfor(int i = 1; i <= n ; i++){\n\t\t\t\tfor(int j = 1; j <=i ; j++){\n\t\t\t\t\tfor(int k = 1; k <=j ; k++){\n\t\t\t\t\t\tif( i+j+k == x && i != j && i != k && j != k ){\n\t\t\t\t\t\t\tsun++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sun);\n\t\t}\n\t}\n}", "Main" ]
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)); while(true){ String[] line = br.readLine().split(" "); int n = Integer.parseInt(line[0]); int x = Integer.parseInt(line[1]); int sun = 0; if( n == 0 && x == 0) break; for(int i = 1; i <= n ; i++){ for(int j = 1; j <=i ; j++){ for(int k = 1; k <=j ; k++){ if( i+j+k == x && i != j && i != k && j != k ){ sun++; } } } } System.out.println(sun); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 12, 13, 30, 42, 17, 30, 4, 13, 14, 2, 2, 13, 13, 17, 3, 4, 13, 23, 13, 12, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 111, 9 ], [ 9, 10 ], [ 111, 11 ], [ 11, 12 ], [ 111, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 18, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 22, 26 ], [ 21, 27 ], [ 18, 28 ], [ 28, 29 ], [ 13, 30 ], [ 30, 31 ], [ 111, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 34, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 111, 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 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 64, 74 ], [ 74, 75 ], [ 75, 76 ], [ 64, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 86, 87 ], [ 86, 88 ], [ 79, 89 ], [ 89, 90 ], [ 90, 91 ], [ 79, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 97, 97 ], [ 97, 98 ], [ 97, 99 ], [ 97, 100 ], [ 95, 101 ], [ 94, 102 ], [ 102, 103 ], [ 47, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n\n\tstatic Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String __[]){\n\t\twhile(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}\n\t}\n\n\tstatic int n,x;\n\tprivate static void input(){\n\t\tn=s.nextInt();\n\t\tx=s.nextInt();\n\t}\n\tprivate static void solve(){\n\t\tlong count=0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n\n\tstatic Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String __[]){\n\t\twhile(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}\n\t}\n\n\tstatic int n,x;\n\tprivate static void input(){\n\t\tn=s.nextInt();\n\t\tx=s.nextInt();\n\t}\n\tprivate static void solve(){\n\t\tlong count=0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}", "Main", "static Scanner s=new Scanner(System.in);", "s", "new Scanner(System.in)", "static int n", "n", "x;", "x", "public static void main(String __[]){\n\t\twhile(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}\n\t}", "main", "{\n\t\twhile(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}\n\t}", "while(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}", "true", "{\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}", "input()", "input", "if((n|x)==0)\n\t\t\t\tbreak;", "(n|x)==0", "(n|x)", "n", "x", "0", "break;", "solve()", "solve", "String __[]", "__", "private static void input(){\n\t\tn=s.nextInt();\n\t\tx=s.nextInt();\n\t}", "input", "{\n\t\tn=s.nextInt();\n\t\tx=s.nextInt();\n\t}", "n=s.nextInt()", "n", "s.nextInt()", "s.nextInt", "s", "x=s.nextInt()", "x", "s.nextInt()", "s.nextInt", "s", "private static void solve(){\n\t\tlong count=0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}", "solve", "{\n\t\tlong count=0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}", "long count=0;", "count", "0", "for(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}", "for(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}", "{\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}", "if(i+j+k==x)\n\t\t\t\t\t\tcount++;", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "public class Main{\n\n\tstatic Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String __[]){\n\t\twhile(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}\n\t}\n\n\tstatic int n,x;\n\tprivate static void input(){\n\t\tn=s.nextInt();\n\t\tx=s.nextInt();\n\t}\n\tprivate static void solve(){\n\t\tlong count=0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}", "public class Main{\n\n\tstatic Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String __[]){\n\t\twhile(true) {\n\t\t\tinput();\n\t\t\tif((n|x)==0)\n\t\t\t\tbreak;\n\t\t\tsolve();\n\t\t}\n\t}\n\n\tstatic int n,x;\n\tprivate static void input(){\n\t\tn=s.nextInt();\n\t\tx=s.nextInt();\n\t}\n\tprivate static void solve(){\n\t\tlong count=0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main{ static Scanner s=new Scanner(System.in); public static void main(String __[]){ while(true) { input(); if((n|x)==0) break; solve(); } } static int n,x; private static void input(){ n=s.nextInt(); x=s.nextInt(); } private static void solve(){ long count=0; for(int i=1;i<=n;i++) { for(int j=i+1;j<=n;j++) { for(int k=j+1;k<=n;k++) { if(i+j+k==x) count++; } } } System.out.println(count); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 11, 1, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 0, 13, 17, 4, 18, 18, 13, 13, 13, 0, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 22, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 22, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 55, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 77, 78 ], [ 77, 79 ], [ 70, 80 ], [ 80, 81 ], [ 81, 82 ], [ 70, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 88, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 86, 92 ], [ 85, 93 ], [ 93, 94 ], [ 93, 95 ], [ 22, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 22, 102 ], [ 102, 103 ], [ 102, 104 ], [ 6, 105 ], [ 105, 106 ], [ 0, 107 ], [ 107, 108 ], [ 107, 109 ] ]
[ "import java.util.Scanner;\n \npublic class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n, s, ans = 0;\n \n for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n, s, ans = 0;\n \n for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n, s, ans = 0;\n \n for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n, s, ans = 0;\n \n for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n", "n", "s", "s", "ans = 0;", "ans", "0", "for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }", ";", "{\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }", "{\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "s = sc.nextInt()", "s", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0 && s == 0) break;", "n == 0 && s == 0", "n == 0", "n", "0", "s == 0", "s", "0", "break;", "for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }", "{\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }", "for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }", "int x = i+1;", "int x = i+1;", "x", "i+1", "i", "1", "x < n", "x", "n", "x++", "x++", "x", "{\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }", "{\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }", "for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }", "int y = x+1;", "int y = x+1;", "y", "x+1", "x", "1", "y <= n", "y", "n", "y++", "y++", "y", "{\n if(i+x+y==s) ans+=1;\n }", "{\n if(i+x+y==s) ans+=1;\n }", "if(i+x+y==s) ans+=1;", "i+x+y==s", "i+x+y", "i+x+y", "i", "x", "y", "s", "ans+=1", "ans", "1", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "ans = 0", "ans", "0", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n, s, ans = 0;\n \n for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }\n }\n}", "public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n, s, ans = 0;\n \n for(;;){\n n = sc.nextInt();\n s = sc.nextInt();\n if(n == 0 && s == 0) break;\n for(int i = 1; i < n; i++){\n for(int x = i+1; x < n; x++){\n for(int y = x+1; y <= n; y++){\n if(i+x+y==s) ans+=1;\n }\n }\n }\n System.out.println(ans);\n ans = 0;\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n, s, ans = 0; for(;;){ n = sc.nextInt(); s = sc.nextInt(); if(n == 0 && s == 0) break; for(int i = 1; i < n; i++){ for(int x = i+1; x < n; x++){ for(int y = x+1; y <= n; y++){ if(i+x+y==s) ans+=1; } } } System.out.println(ans); ans = 0; } } }
[ 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, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 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 ], [ 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 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 26, 46 ], [ 46, 47 ], [ 46, 48 ], [ 26, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 62, 69 ], [ 69, 70 ], [ 69, 71 ], [ 62, 72 ], [ 72, 73 ], [ 73, 74 ], [ 62, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 77, 84 ], [ 84, 85 ], [ 84, 86 ], [ 77, 87 ], [ 87, 88 ], [ 88, 89 ], [ 77, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 95, 95 ], [ 95, 96 ], [ 95, 97 ], [ 95, 98 ], [ 93, 99 ], [ 92, 100 ], [ 100, 101 ], [ 101, 102 ], [ 26, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 18, 109 ], [ 109, 110 ] ]
[ "import java.awt.*;\nimport java.awt.geom.*;\nimport java.io.*;\n\nimport java.util.*;\nclass Main {\n\n\tstatic char[] xx = new char[] {'S','H','C','D'};\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}\n}", "import java.awt.*;", "awt.*", "java", "import java.awt.geom.*;", "geom.*", "java.awt", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "class Main {\n\n\tstatic char[] xx = new char[] {'S','H','C','D'};\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}\n}", "Main", "static char[] xx = new char[] {'S','H','C','D'};", "xx", "new char[] {'S','H','C','D'}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while (true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args" ]
import java.awt.*; import java.awt.geom.*; import java.io.*; import java.util.*; class Main { static char[] xx = new char[] {'S','H','C','D'}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (true) { int n = sc.nextInt(); int x = sc.nextInt(); if(n == 0 && x == 0) break; int count = 0; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) { for (int k = j + 1; k <= n; k++) { if (i + j + k == x) { count++; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 2, 13, 17, 4, 18, 18, 13, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 25, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 31, 36 ], [ 25, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 25, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 50, 51 ], [ 50, 52 ], [ 25, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 53, 61 ], [ 61, 62 ], [ 25, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 76, 84 ], [ 84, 85 ], [ 85, 86 ], [ 76, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 89, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 103, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 25, 113 ], [ 113, 114 ], [ 114, 115 ], [ 113, 116 ], [ 116, 117 ], [ 116, 118 ], [ 8, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 6, 125 ], [ 125, 126 ] ]
[ "import java.io.*;\nclass Main{\n\tpublic static void main(String[]args)throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint i,j,k;\n\t\tint ways; \n\t\t\n\t\twhile(true){\n\t\t\tways=0;\n\t\t\tString[] num=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(num[0]);\n\t\t\tint x=Integer.parseInt(num[1]);\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(ways+\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}\n}", "import java.io.*;", "io.*", "java", "class Main{\n\tpublic static void main(String[]args)throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint i,j,k;\n\t\tint ways; \n\t\t\n\t\twhile(true){\n\t\t\tways=0;\n\t\t\tString[] num=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(num[0]);\n\t\t\tint x=Integer.parseInt(num[1]);\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(ways+\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}\n}", "Main", "public static void main(String[]args)throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint i,j,k;\n\t\tint ways; \n\t\t\n\t\twhile(true){\n\t\t\tways=0;\n\t\t\tString[] num=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(num[0]);\n\t\t\tint x=Integer.parseInt(num[1]);\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(ways+\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}", "main", "{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint i,j,k;\n\t\tint ways; \n\t\t\n\t\twhile(true){\n\t\t\tways=0;\n\t\t\tString[] num=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(num[0]);\n\t\t\tint x=Integer.parseInt(num[1]);\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(ways+\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t}", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int i", "i", "j", "j", "k;", "k", "int ways;", "ways", "while(true){\n\t\t\tways=0;\n\t\t\tString[] num=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(num[0]);\n\t\t\tint x=Integer.parseInt(num[1]);\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(ways+\"\\n\");\n\t\t}", "true", "{\n\t\t\tways=0;\n\t\t\tString[] num=br.readLine().split(\" \");\n\t\t\tint n=Integer.parseInt(num[0]);\n\t\t\tint x=Integer.parseInt(num[1]);\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(ways+\"\\n\");\n\t\t}", "ways=0", "ways", "0", "String[] num=br.readLine().split(\" \");", "num", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n=Integer.parseInt(num[0]);", "n", "Integer.parseInt(num[0])", "Integer.parseInt", "Integer", "num[0]", "num", "0", "int x=Integer.parseInt(num[1]);", "x", "Integer.parseInt(num[1])", "Integer.parseInt", "Integer", "num[1]", "num", "1", "if(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for(i=1;i<=n;i++){\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "i=1;", "i=1", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(j=1;j<i;j++){\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "j=1;", "j=1", "j", "1", "j<i", "j", "i", "j++", "j++", "j", "{\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(k=1;k<j;k++){\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "k=1;", "k=1", "k", "1", "k<j", "k", "j", "k++", "k++", "k", "{\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if((i+j+k)==x){\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}", "(i+j+k)==x", "(i+j+k)", "i+j+k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}", "ways++", "ways", "sb.append(ways+\"\\n\")", "sb.append", "sb", "ways+\"\\n\"", "ways", "\"\\n\"", "System.out.print(sb)", "System.out.print", "System.out", "System", "System.out", "sb", "String[]args", "args" ]
import java.io.*; class Main{ public static void main(String[]args)throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int i,j,k; int ways; while(true){ ways=0; String[] num=br.readLine().split(" "); int n=Integer.parseInt(num[0]); int x=Integer.parseInt(num[1]); if(n==0&&x==0){ break; } for(i=1;i<=n;i++){ for(j=1;j<i;j++){ for(k=1;k<j;k++){ if((i+j+k)==x){ ways++; } } } } sb.append(ways+"\n"); } System.out.print(sb); } }
[ 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, 41, 13, 42, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 0, 13, 2, 13, 17, 4, 18, 18, 13, 13, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 119, 8 ], [ 119, 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 ], [ 11, 25 ], [ 25, 26 ], [ 11, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 39, 49 ], [ 49, 50 ], [ 50, 51 ], [ 39, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 54, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 54, 66 ], [ 66, 67 ], [ 67, 68 ], [ 54, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 71, 78 ], [ 78, 79 ], [ 78, 80 ], [ 71, 81 ], [ 81, 82 ], [ 82, 83 ], [ 71, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 89, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 87, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 35, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 35, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 35, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 9, 116 ], [ 116, 117 ], [ 0, 118 ], [ 118, 119 ], [ 118, 120 ] ]
[ "import java.io.IOException;\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint s;\n\t\t\twhile(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}\n\t}\n\n}", "import java.io.IOException;", "IOException", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint s;\n\t\t\twhile(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint s;\n\t\t\twhile(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}\n\t}", "main", "{\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint s;\n\t\t\twhile(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int s;", "s", "while(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}", "n!=0 || x!=0", "n!=0", "n", "0", "x!=0", "x", "0", "{\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}", "s=0", "s", "0", "for(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int c=1;", "int c=1;", "c", "1", "c<=n-2", "c", "n-2", "n", "2", "++c", "++c", "c", "{\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int d=c+1;", "int d=c+1;", "d", "c+1", "c", "1", "d<=n-1", "d", "n-1", "n", "1", "++d", "++d", "d", "{\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int e=d+1;", "int e=d+1;", "e", "d+1", "d", "1", "e<=n", "e", "n", "++e", "++e", "e", "{\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}", "c+d+e==x", "c+d+e", "c+d+e", "c", "d", "e", "x", "{\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}", "s=s+1", "s", "s+1", "s", "1", "System.out.println(s)", "System.out.println", "System.out", "System", "System.out", "s", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint s;\n\t\t\twhile(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\t// TODO ?????????????????????????????????????????????\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint s;\n\t\t\twhile(n!=0 || x!=0){\n\t\t\t\ts=0;\n\t\t\t\tfor(int c=1;c<=n-2;++c){\n\t\t\t\t\tfor(int d=c+1;d<=n-1;++d){\n\t\t\t\t\t\tfor(int e=d+1;e<=n;++e){\n\t\t\t\t\t\t\tif(c+d+e==x){\n\t\t\t\t\t\t\t\ts=s+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println(s);\n\t\t\t\tn = sc.nextInt();\n\t\t\t\tx = sc.nextInt();\n\t\t\t}\n\t}\n\n}", "Main" ]
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { // TODO ????????????????????????????????????????????? Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int x = sc.nextInt(); int s; while(n!=0 || x!=0){ s=0; for(int c=1;c<=n-2;++c){ for(int d=c+1;d<=n-1;++d){ for(int e=d+1;e<=n;++e){ if(c+d+e==x){ s=s+1; } } } } System.out.println(s); n = sc.nextInt(); x = sc.nextInt(); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 9, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 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 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 20, 41 ], [ 41, 42 ], [ 41, 43 ], [ 20, 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 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 59, 69 ], [ 69, 70 ], [ 70, 71 ], [ 59, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 96, 97 ], [ 96, 98 ], [ 87, 99 ], [ 99, 100 ], [ 86, 101 ], [ 101, 102 ], [ 102, 103 ], [ 104, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 102, 108 ], [ 101, 109 ], [ 109, 110 ], [ 110, 111 ], [ 20, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 6, 118 ], [ 118, 119 ] ]
[ "import java.util.Scanner;\n \nclass Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n\t int x,y,z;\n \twhile(true){\n \t\tx = sc.nextInt();\n \t\ty = sc.nextInt();\n \t\tif( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}\n \t\tz = 0;\n \t\tfor(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n \tSystem.out.println(z);\n \t}\n \t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\tpublic static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n\t int x,y,z;\n \twhile(true){\n \t\tx = sc.nextInt();\n \t\ty = sc.nextInt();\n \t\tif( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}\n \t\tz = 0;\n \t\tfor(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n \tSystem.out.println(z);\n \t}\n \t}\n}", "Main", "public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n\t int x,y,z;\n \twhile(true){\n \t\tx = sc.nextInt();\n \t\ty = sc.nextInt();\n \t\tif( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}\n \t\tz = 0;\n \t\tfor(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n \tSystem.out.println(z);\n \t}\n \t}", "main", "{\n \tScanner sc = new Scanner(System.in);\n\t int x,y,z;\n \twhile(true){\n \t\tx = sc.nextInt();\n \t\ty = sc.nextInt();\n \t\tif( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}\n \t\tz = 0;\n \t\tfor(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n \tSystem.out.println(z);\n \t}\n \t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x", "x", "y", "y", "z;", "z", "while(true){\n \t\tx = sc.nextInt();\n \t\ty = sc.nextInt();\n \t\tif( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}\n \t\tz = 0;\n \t\tfor(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n \tSystem.out.println(z);\n \t}", "true", "{\n \t\tx = sc.nextInt();\n \t\ty = sc.nextInt();\n \t\tif( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}\n \t\tz = 0;\n \t\tfor(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}\n \tSystem.out.println(z);\n \t}", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "y = sc.nextInt()", "y", "sc.nextInt()", "sc.nextInt", "sc", "if( x == 0 && y == 0 ){\n\t\t\t\t break;\n\t\t\t}", "x == 0 && y == 0", "x == 0", "x", "0", "y == 0", "y", "0", "{\n\t\t\t\t break;\n\t\t\t}", "break;", "z = 0", "z", "0", "for(int i = 1; i <= x-2; i++){\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}", "int i = 1;", "int i = 1;", "i", "1", "i <= x-2", "i", "x-2", "x", "2", "i++", "i++", "i", "{\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}", "{\n \t\tfor(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n \t}", "for(int j = 2; j <= x-1; j++){\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 2;", "int j = 2;", "j", "2", "j <= x-1", "j", "x-1", "x", "1", "j++", "j++", "j", "{\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n \t\t\tfor(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = 3; k <= x; k++){\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = 3;", "int k = 3;", "k", "3", "k <= x", "k", "x", "k++", "k++", "k", "{\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n \t\t\tif(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}\n\t\t\t\t\t\tif(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i >= j || i >= k || j >= k){\n\t\t\t\t\t\t\t continue;\n \t\t\t}", "i >= j || i >= k || j >= k", "i >= j || i >= k || j >= k", "i >= j", "i", "j", "i >= k", "i", "k", "j >= k", "j", "k", "{\n\t\t\t\t\t\t\t continue;\n \t\t\t}", "continue;", "if(i + j + k == y){\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}", "i + j + k == y", "i + j + k", "i + j + k", "i", "j", "k", "y", "{\n\t\t\t\t\t\t\t z++;\n\t\t\t\t\t\t}", "z++", "z", "System.out.println(z)", "System.out.println", "System.out", "System", "System.out", "z", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x,y,z; while(true){ x = sc.nextInt(); y = sc.nextInt(); if( x == 0 && y == 0 ){ break; } z = 0; for(int i = 1; i <= x-2; i++){ for(int j = 2; j <= x-1; j++){ for(int k = 3; k <= x; k++){ if(i >= j || i >= k || j >= k){ continue; } if(i + j + k == y){ z++; } } } } System.out.println(z); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 2, 13, 17, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 2, 2, 18, 13, 13, 18, 13, 13, 18, 13, 13, 14, 2, 13, 13, 30, 40, 13, 40, 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 ], [ 146, 5 ], [ 146, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 37 ], [ 37, 38 ], [ 37, 39 ], [ 14, 40 ], [ 40, 41 ], [ 40, 42 ], [ 14, 43 ], [ 43, 44 ], [ 43, 45 ], [ 14, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 63, 65 ], [ 14, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 86, 87 ], [ 86, 88 ], [ 79, 89 ], [ 89, 90 ], [ 90, 91 ], [ 79, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 101 ], [ 101, 102 ], [ 101, 103 ], [ 94, 104 ], [ 104, 105 ], [ 105, 106 ], [ 94, 107 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 112, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 116, 118 ], [ 112, 119 ], [ 119, 120 ], [ 119, 121 ], [ 108, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 127, 128 ], [ 108, 129 ], [ 129, 130 ], [ 14, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 146, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 137, 143 ], [ 143, 144 ], [ 0, 145 ], [ 145, 146 ], [ 145, 147 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tvoid run(){\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\n\t\tnew Main().run();\n\t\t\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tvoid run(){\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\n\t\tnew Main().run();\n\t\t\n\t}\n}", "Main", "void run(){\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "run", "{\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "while(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "int x = s.nextInt();", "x", "s.nextInt()", "s.nextInt", "s", "if(n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int sum = 0;", "sum", "0", "int count = 0;", "count", "0", "int a = 0;", "a", "0", "int num[] = new int [n];", "num", "new int [n]", "n", "for(int i = 0; i < n; i++) num[i] = i + 1;", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "num[i] = i + 1;", "num[i] = i + 1", "num[i]", "num", "i", "i + 1", "i", "1", "for(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = a;", "int i = a;", "i", "a", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k < n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}", "sum = num[i] + num[j] + num[k]", "sum", "num[i] + num[j] + num[k]", "num[i] + num[j] + num[k]", "num[i]", "num", "i", "num[j]", "num", "j", "num[k]", "num", "k", "if(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "sum == x", "sum", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "a++", "a", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "public static void main(String[] args) {\n\t\n\t\tnew Main().run();\n\t\t\n\t}", "main", "{\n\t\n\t\tnew Main().run();\n\t\t\n\t}", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "public class Main {\n\tvoid run(){\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\n\t\tnew Main().run();\n\t\t\n\t}\n}", "public class Main {\n\tvoid run(){\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n = s.nextInt();\n\t\t\tint x = s.nextInt();\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint sum = 0;\n\t\t\tint count = 0;\n\t\t\tint a = 0;\n\t\t\tint num[] = new int [n];\n\t\t\tfor(int i = 0; i < n; i++) num[i] = i + 1;\n\t\t\tfor(int i = a; i < n; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tfor(int k = j+1; k < n; k++){\n\t\t\t\t\t\tsum = num[i] + num[j] + num[k];\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ta++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\n\t\tnew Main().run();\n\t\t\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { void run(){ Scanner s = new Scanner(System.in); while(true){ int n = s.nextInt(); int x = s.nextInt(); if(n == 0 && x == 0) break; int sum = 0; int count = 0; int a = 0; int num[] = new int [n]; for(int i = 0; i < n; i++) num[i] = i + 1; for(int i = a; i < n; i++){ for(int j = i+1; j < n; j++){ for(int k = j+1; k < n; k++){ sum = num[i] + num[j] + num[k]; if(sum == x){ count++; } a++; } } } System.out.println(count); } } public static void main(String[] args) { new Main().run(); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 11, 1, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 114, 5 ], [ 114, 6 ], [ 6, 7 ], [ 6, 8 ], [ 114, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 18, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 18, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 18, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 18, 39 ], [ 39, 40 ], [ 39, 41 ], [ 18, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 42, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 51, 52 ], [ 42, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 55, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 70, 77 ], [ 77, 78 ], [ 77, 79 ], [ 70, 80 ], [ 80, 81 ], [ 81, 82 ], [ 70, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 88, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 86, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 18, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 11, 100 ], [ 100, 101 ], [ 100, 102 ], [ 100, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 9, 111 ], [ 111, 112 ], [ 0, 113 ], [ 113, 114 ], [ 113, 115 ] ]
[ "import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}\n\n\t\tfor(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}\n\n\t\tfor(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}\n\t}\n}", "Main", "private static final Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "public static void main(String[] args){\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}\n\n\t\tfor(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}\n\t}", "main", "{\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}\n\n\t\tfor(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}\n\t}", "List<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}", ";", "{\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}", "{\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "int cnt = 0;", "cnt", "0", "for(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}", "cnt++", "cnt", "list.add(cnt)", "list.add", "list", "cnt", "for(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}", "int c", "list", "{\n\t\t\tSystem.out.println(c);\n\t\t}", "{\n\t\t\tSystem.out.println(c);\n\t\t}", "System.out.println(c)", "System.out.println", "System.out", "System", "System.out", "c", "String[] args", "args", "public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}\n\n\t\tfor(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}\n\t}\n}", "public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint cnt = 0;\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = i + 1; j <= n; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(cnt);\n\t\t}\n\n\t\tfor(int c : list){\n\t\t\tSystem.out.println(c);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ List<Integer> list = new ArrayList<Integer>(); for(;;){ int n = scan.nextInt(); int x = scan.nextInt(); if(n == 0 && x == 0){ break; } int cnt = 0; for(int i = 1; i <= n; i++){ for(int j = i + 1; j <= n; j++){ for(int k = j + 1; k <= n; k++){ if(i + j + k == x){ cnt++; } } } } list.add(cnt); } for(int c : list){ System.out.println(c); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 30, 38, 5, 13, 30, 30, 14, 2, 13, 17, 30, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 41, 13, 42, 40, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 28, 13, 13, 30, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 190, 17 ], [ 190, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 24, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 24, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 45, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 54, 55 ], [ 53, 56 ], [ 45, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 62, 63 ], [ 62, 64 ], [ 45, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 45, 73 ], [ 73, 74 ], [ 73, 75 ], [ 45, 76 ], [ 76, 77 ], [ 45, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 78, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 91, 99 ], [ 99, 100 ], [ 100, 101 ], [ 91, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 104, 111 ], [ 111, 112 ], [ 111, 113 ], [ 104, 114 ], [ 114, 115 ], [ 115, 116 ], [ 104, 117 ], [ 118, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 119, 126 ], [ 126, 127 ], [ 126, 128 ], [ 119, 129 ], [ 129, 130 ], [ 130, 131 ], [ 119, 132 ], [ 133, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 137, 137 ], [ 137, 138 ], [ 137, 139 ], [ 137, 140 ], [ 135, 141 ], [ 134, 142 ], [ 142, 143 ], [ 143, 144 ], [ 87, 145 ], [ 145, 146 ], [ 146, 147 ], [ 145, 148 ], [ 87, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 87, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 156, 159 ], [ 87, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 163, 164 ], [ 162, 165 ], [ 165, 166 ], [ 165, 167 ], [ 87, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 170, 173 ], [ 173, 174 ], [ 173, 175 ], [ 45, 176 ], [ 176, 177 ], [ 176, 178 ], [ 176, 179 ], [ 180, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 181, 186 ], [ 18, 187 ], [ 187, 188 ], [ 0, 189 ], [ 189, 190 ], [ 189, 191 ] ]
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}\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.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "try {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}", "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\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}", "try {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}", "catch (IOException ioe) {\n\t\t\t}", "IOException ioe", "{\n\t\t\t}", "{\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t}", "if (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}", "br != null", "br", "null", "{\n\t\t\t\t\tbr.close();\n\t\t\t\t}", "br.close()", "br.close", "br", "{\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t}", "String str = br.readLine();", "str", "br.readLine()", "br.readLine", "br", "String[] strArr = str.split(\" \");", "strArr", "str.split(\" \")", "str.split", "str", "\" \"", "int n = Integer.parseInt(strArr[0]);", "n", "Integer.parseInt(strArr[0])", "Integer.parseInt", "Integer", "strArr[0]", "strArr", "0", "int x = Integer.parseInt(strArr[1]);", "x", "Integer.parseInt(strArr[1])", "Integer.parseInt", "Integer", "strArr[1]", "strArr", "1", "List<Integer> counters = new ArrayList<Integer>();", "counters", "new ArrayList<Integer>()", "Integer count;", "count", "while (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}", "!( n==0 && x==0)", "( n==0 && x==0)", "n==0", "n", "0", "x==0", "x", "0", "{\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}", "count = 0", "count", "0", "for(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}", "i+j+k == x", "i+j+k", "i+j+k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}", "count++", "count", "counters.add(count)", "counters.add", "counters", "count", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "strArr = str.split(\" \")", "strArr", "str.split(\" \")", "str.split", "str", "\" \"", "n = Integer.parseInt(strArr[0])", "n", "Integer.parseInt(strArr[0])", "Integer.parseInt", "Integer", "strArr[0]", "strArr", "0", "x = Integer.parseInt(strArr[1])", "x", "Integer.parseInt(strArr[1])", "Integer.parseInt", "Integer", "strArr[1]", "strArr", "1", "for(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}", "Integer s", "counters", "{\n\t\t\t\tSystem.out.println(s);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(s);\n\t\t\t}", "System.out.println(s)", "System.out.println", "System.out", "System", "System.out", "s", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\n\t\t\tString str = br.readLine();\n\t\t\tString[] strArr = str.split(\" \");\n\t\t\tint n = Integer.parseInt(strArr[0]);\n\t\t\tint x = Integer.parseInt(strArr[1]);\n\n\t\t\tList<Integer> counters = new ArrayList<Integer>();\n\t\t\tInteger count;\n\t\t\twhile (!( n==0 && x==0)) {\n\n\t\t\t\tcount = 0;\n\t\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\t\t\tif(i+j+k == x){\n\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcounters.add(count);\n\n\t\t\t\tstr = br.readLine();\n\t\t\t\tstrArr = str.split(\" \");\n\t\t\t\tn = Integer.parseInt(strArr[0]);\n\t\t\t\tx = Integer.parseInt(strArr[1]);\n\n\t\t\t}\n\n\t\t\tfor(Integer s : counters){\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t}\n\n\t\t}\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); try { String str = br.readLine(); String[] strArr = str.split(" "); int n = Integer.parseInt(strArr[0]); int x = Integer.parseInt(strArr[1]); List<Integer> counters = new ArrayList<Integer>(); Integer count; while (!( n==0 && x==0)) { count = 0; for(int i=1;i<=n;i++){ for(int j=i+1;j<=n;j++){ for(int k=j+1;k<=n;k++){ if(i+j+k == x){ count++; } } } } counters.add(count); str = br.readLine(); strArr = str.split(" "); n = Integer.parseInt(strArr[0]); x = Integer.parseInt(strArr[1]); } for(Integer s : counters){ System.out.println(s); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (br != null) { br.close(); } } catch (IOException ioe) { } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 30, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 2, 13, 17, 4, 18, 18, 13, 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 ], [ 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 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 26, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 41, 42 ], [ 26, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 49, 50 ], [ 26, 51 ], [ 51, 52 ], [ 51, 53 ], [ 26, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 26, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 64, 75 ], [ 76, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 77, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 89, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 101, 102 ], [ 101, 103 ], [ 96, 104 ], [ 104, 105 ], [ 105, 106 ], [ 96, 107 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 114, 116 ], [ 109, 117 ], [ 117, 118 ], [ 108, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 120, 126 ], [ 119, 127 ], [ 127, 128 ], [ 128, 129 ], [ 26, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 133, 134 ], [ 133, 135 ], [ 17, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 136, 141 ], [ 15, 142 ], [ 142, 143 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.util.StringTokenizer;\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\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\n\t\t\tString input = br.readLine();\n\t\t\tStringTokenizer st = new StringTokenizer(input, \" \");\n\t\t\tint n = Integer.parseInt(st.nextToken());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsb.append(count + \"\\n\");\n\n\t\t}\n\n\t\tSystem.out.print(sb);\n\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "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\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\n\t\t\tString input = br.readLine();\n\t\t\tStringTokenizer st = new StringTokenizer(input, \" \");\n\t\t\tint n = Integer.parseInt(st.nextToken());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsb.append(count + \"\\n\");\n\n\t\t}\n\n\t\tSystem.out.print(sb);\n\n\t}\n}", "Main", "public static void main(String[] args) throws IOException{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\n\t\t\tString input = br.readLine();\n\t\t\tStringTokenizer st = new StringTokenizer(input, \" \");\n\t\t\tint n = Integer.parseInt(st.nextToken());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsb.append(count + \"\\n\");\n\n\t\t}\n\n\t\tSystem.out.print(sb);\n\n\t}", "main", "{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\n\t\t\tString input = br.readLine();\n\t\t\tStringTokenizer st = new StringTokenizer(input, \" \");\n\t\t\tint n = Integer.parseInt(st.nextToken());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsb.append(count + \"\\n\");\n\n\t\t}\n\n\t\tSystem.out.print(sb);\n\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "while(true){\n\n\t\t\tString input = br.readLine();\n\t\t\tStringTokenizer st = new StringTokenizer(input, \" \");\n\t\t\tint n = Integer.parseInt(st.nextToken());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsb.append(count + \"\\n\");\n\n\t\t}", "true", "{\n\n\t\t\tString input = br.readLine();\n\t\t\tStringTokenizer st = new StringTokenizer(input, \" \");\n\t\t\tint n = Integer.parseInt(st.nextToken());\n\t\t\tint x = Integer.parseInt(st.nextToken());\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsb.append(count + \"\\n\");\n\n\t\t}", "String input = br.readLine();", "input", "br.readLine()", "br.readLine", "br", "StringTokenizer st = new StringTokenizer(input, \" \");", "st", "new StringTokenizer(input, \" \")", "int n = Integer.parseInt(st.nextToken());", "n", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int x = Integer.parseInt(st.nextToken());", "x", "Integer.parseInt(st.nextToken())", "Integer.parseInt", "Integer", "st.nextToken()", "st.nextToken", "st", "int count = 0;", "count", "0", "if(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for(int i = 1; i <= n; i++){\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "for(int j = 1; j <= n; j++){\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}", "{\n\n\t\t\t\t\tif(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}", "if(j == i){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "j == i", "j", "i", "{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "break;", "for(int k = 1; k <= n; k++){\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "{\n\n\t\t\t\t\t\tif(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "if(k == i || k == j){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "k == i || k == j", "k == i", "k", "i", "k == j", "k", "j", "{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "break;", "if((i + j + k) == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "sb.append(count + \"\\n\")", "sb.append", "sb", "count + \"\\n\"", "count", "\"\\n\"", "System.out.print(sb)", "System.out.print", "System.out", "System", "System.out", "sb", "String[] args", "args" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.util.StringTokenizer; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); while(true){ String input = br.readLine(); StringTokenizer st = new StringTokenizer(input, " "); int n = Integer.parseInt(st.nextToken()); int x = Integer.parseInt(st.nextToken()); int count = 0; if(n == 0 && x == 0){ break; } for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ if(j == i){ break; } for(int k = 1; k <= n; k++){ if(k == i || k == j){ break; } if((i + j + k) == x){ count++; } } } } sb.append(count + "\n"); } System.out.print(sb); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 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 ], [ 113, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 19, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 19, 36 ], [ 36, 37 ], [ 36, 38 ], [ 19, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 59, 60 ], [ 59, 61 ], [ 52, 62 ], [ 62, 63 ], [ 63, 64 ], [ 52, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 67, 74 ], [ 74, 75 ], [ 74, 76 ], [ 67, 77 ], [ 77, 78 ], [ 78, 79 ], [ 67, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 84, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 88, 89 ], [ 88, 90 ], [ 84, 91 ], [ 91, 92 ], [ 91, 93 ], [ 82, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 98, 98 ], [ 98, 99 ], [ 98, 100 ], [ 98, 101 ], [ 96, 102 ], [ 95, 103 ], [ 103, 104 ], [ 104, 105 ], [ 19, 106 ], [ 106, 107 ], [ 107, 108 ], [ 106, 109 ], [ 12, 110 ], [ 110, 111 ], [ 0, 112 ], [ 112, 113 ], [ 112, 114 ] ]
[ "import java.util.*;\nimport static java.lang.System.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "import static java.lang.System.*;", "import static java.lang.System.*;", "import static java.lang.System.*;", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n}", "Main", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "main", "{\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "while (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if (n == 0) {break;}", "n == 0", "n", "0", "{break;}", "break;", "int num = 0;", "num", "0", "for (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}", "i!=j && j!=k && i!=k", "i!=j && j!=k && i!=k", "i!=j", "i", "j", "j!=k", "j", "k", "i!=k", "i", "k", "{\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}", "if (i+j+k == x) {num++;}", "i+j+k == x", "i+j+k", "i+j+k", "i", "j", "k", "x", "{num++;}", "num++", "num", "out.println(num)", "out.println", "out", "num", "String[] args", "args", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n}", "public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tif (n == 0) {break;}\n\t\t\tint num = 0;\n\t\t\tfor (int i=1; i<=n; i++) {\n\t\t\t\tfor (int j=i+1; j<=n; j++) {\n\t\t\t\t\tfor (int k=j+1; k<=n; k++) {\n\t\t\t\t\t\tif (i!=j && j!=k && i!=k) {\n\t\t\t\t\t\t\tif (i+j+k == x) {num++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(num);\n\t\t\t\n\t\t\t\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; import static java.lang.System.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { while (sc.hasNext()) { int n = sc.nextInt(); int x = sc.nextInt(); if (n == 0) {break;} int num = 0; for (int i=1; i<=n; i++) { for (int j=i+1; j<=n; j++) { for (int k=j+1; k<=n; k++) { if (i!=j && j!=k && i!=k) { if (i+j+k == x) {num++;} } } } } out.println(num); } } }
[ 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, 14, 2, 13, 17, 30, 3, 4, 18, 18, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 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 ], [ 16, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 16, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 38, 41 ], [ 6, 42 ], [ 42, 43 ], [ 111, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 63, 70 ], [ 70, 71 ], [ 70, 72 ], [ 63, 73 ], [ 73, 74 ], [ 74, 75 ], [ 63, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 85, 86 ], [ 85, 87 ], [ 78, 88 ], [ 88, 89 ], [ 89, 90 ], [ 78, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 94, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 46, 104 ], [ 104, 105 ], [ 44, 106 ], [ 106, 107 ], [ 44, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}\n\t}\n\n\tpublic static int result(int n, int x){\n\t\tint count=0;\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\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\t\twhile(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}\n\t}\n\n\tpublic static int result(int n, int x){\n\t\tint count=0;\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0){\n\t\t\t\tbreak;\n\t\t\t}", "n==0", "n", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "System.out.println(result(n,x))", "System.out.println", "System.out", "System", "System.out", "result(n,x)", "result", "n", "x", "String[] args", "args", "public static int result(int n, int x){\n\t\tint count=0;\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "result", "{\n\t\tint count=0;\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "int count=0;", "count", "0", "for(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}", "if((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}", "(i+j+k)==x", "(i+j+k)", "i+j+k", "i", "j", "k", "x", "{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}", "count++", "count", "return count;", "count", "int n", "n", "int x", "x", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}\n\t}\n\n\tpublic static int result(int n, int x){\n\t\tint count=0;\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(result(n,x));\n\t\t}\n\t}\n\n\tpublic static int result(int n, int x){\n\t\tint count=0;\n\t\tfor(int i=1; i<=n; i++){\n\t\t\tfor(int j=i+1; j<=n; j++){\n\t\t\t\tfor(int k=j+1; k<=n; k++){\n\t\t\t\t\tif((i+j+k)==x){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int n=sc.nextInt(); int x=sc.nextInt(); if(n==0){ break; } System.out.println(result(n,x)); } } public static int result(int n, int x){ int count=0; for(int i=1; i<=n; i++){ for(int j=i+1; j<=n; j++){ for(int k=j+1; k<=n; k++){ if((i+j+k)==x){ count++; } } } } return count; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 42, 17, 30, 0, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 4, 13, 13, 13, 3, 4, 18, 18, 13, 13, 4, 13, 13, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 9, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 9, 14, 2, 2, 13, 13, 2, 13, 13, 30, 40, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 17, 2, 13, 17, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 158, 8 ], [ 158, 9 ], [ 9, 10 ], [ 9, 11 ], [ 158, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 12, 18 ], [ 18, 19 ], [ 158, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 22, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 27, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 27, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 44, 46 ], [ 27, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 52, 54 ], [ 27, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 56, 59 ], [ 55, 60 ], [ 27, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 66, 69 ], [ 158, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 76, 84 ], [ 84, 85 ], [ 85, 86 ], [ 76, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 96, 97 ], [ 96, 98 ], [ 89, 99 ], [ 99, 100 ], [ 100, 101 ], [ 89, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 104, 108 ], [ 103, 109 ], [ 109, 110 ], [ 109, 111 ], [ 112, 112 ], [ 112, 113 ], [ 112, 114 ], [ 112, 115 ], [ 103, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 117, 121 ], [ 121, 122 ], [ 121, 123 ], [ 116, 124 ], [ 103, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 130, 132 ], [ 125, 133 ], [ 133, 134 ], [ 134, 135 ], [ 72, 136 ], [ 136, 137 ], [ 70, 138 ], [ 138, 139 ], [ 70, 140 ], [ 140, 141 ], [ 158, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 150, 151 ], [ 150, 152 ], [ 142, 153 ], [ 153, 154 ], [ 142, 155 ], [ 155, 156 ], [ 0, 157 ], [ 157, 158 ], [ 157, 159 ] ]
[ "import java.util.Scanner;\nimport java.util.function.Function;\n\npublic class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n String str;\n while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }\n }\n\n int sim(int n, int x) {\n int cnt = 0;\n for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }\n return cnt;\n }\n\n boolean isFin(int n, int x) {\n return n == 0 && x == 0;\n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.function.Function;", "Function", "java.util.function", "public class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n String str;\n while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }\n }\n\n int sim(int n, int x) {\n int cnt = 0;\n for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }\n return cnt;\n }\n\n boolean isFin(int n, int x) {\n return n == 0 && x == 0;\n }\n\n}", "Main", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "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", "void solve() {\n String str;\n while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }\n }", "solve", "{\n String str;\n while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }\n }", "String str;", "str", "while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }", "true", "{\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }", "str = sc.nextLine()", "str", "sc.nextLine()", "sc.nextLine", "sc", "String[] sp = str.split(\" \");", "sp", "str.split(\" \")", "str.split", "str", "\" \"", "int n = Integer.parseInt(sp[0]);", "n", "Integer.parseInt(sp[0])", "Integer.parseInt", "Integer", "sp[0]", "sp", "0", "int x = Integer.parseInt(sp[1]);", "x", "Integer.parseInt(sp[1])", "Integer.parseInt", "Integer", "sp[1]", "sp", "1", "if (isFin(n, x)) break;", "isFin(n, x)", "isFin", "n", "x", "break;", "System.out.println(sim(n, x))", "System.out.println", "System.out", "System", "System.out", "sim(n, x)", "sim", "n", "x", "int sim(int n, int x) {\n int cnt = 0;\n for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }\n return cnt;\n }", "sim", "{\n int cnt = 0;\n for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }\n return cnt;\n }", "int cnt = 0;", "cnt", "0", "for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "++i", "++i", "i", "{\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }", "{\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }", "for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n", "j", "n", "++j", "++j", "j", "{\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }", "{\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }", "if (i == j) continue;", "i == j", "i", "j", "continue;", "int k = x - i - j;", "k", "x - i - j", "x - i - j", "x", "i", "j", "if (i == k || j == k) continue;", "i == k || j == k", "i == k", "i", "k", "j == k", "j", "k", "continue;", "if (j < k && k <= n) {\n cnt++;\n }", "j < k && k <= n", "j < k", "j", "k", "k <= n", "k", "n", "{\n cnt++;\n }", "cnt++", "cnt", "return cnt;", "cnt", "int n", "n", "int x", "x", "boolean isFin(int n, int x) {\n return n == 0 && x == 0;\n }", "isFin", "{\n return n == 0 && x == 0;\n }", "return n == 0 && x == 0;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "int n", "n", "int x", "x", "public class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n String str;\n while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }\n }\n\n int sim(int n, int x) {\n int cnt = 0;\n for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }\n return cnt;\n }\n\n boolean isFin(int n, int x) {\n return n == 0 && x == 0;\n }\n\n}", "public class Main {\n\n public static void main(String[] args) {\n new Main().solve();\n }\n\n Scanner sc = new Scanner(System.in);\n\n void solve() {\n String str;\n while (true) {\n str = sc.nextLine();\n String[] sp = str.split(\" \");\n int n = Integer.parseInt(sp[0]);\n int x = Integer.parseInt(sp[1]);\n if (isFin(n, x)) break;\n System.out.println(sim(n, x));\n }\n }\n\n int sim(int n, int x) {\n int cnt = 0;\n for (int i = 1; i <= n; ++i) {\n for (int j = i + 1; j <= n; ++j) {\n if (i == j) continue;\n int k = x - i - j;\n if (i == k || j == k) continue;\n if (j < k && k <= n) {\n cnt++;\n }\n }\n }\n return cnt;\n }\n\n boolean isFin(int n, int x) {\n return n == 0 && x == 0;\n }\n\n}", "Main" ]
import java.util.Scanner; import java.util.function.Function; public class Main { public static void main(String[] args) { new Main().solve(); } Scanner sc = new Scanner(System.in); void solve() { String str; while (true) { str = sc.nextLine(); String[] sp = str.split(" "); int n = Integer.parseInt(sp[0]); int x = Integer.parseInt(sp[1]); if (isFin(n, x)) break; System.out.println(sim(n, x)); } } int sim(int n, int x) { int cnt = 0; for (int i = 1; i <= n; ++i) { for (int j = i + 1; j <= n; ++j) { if (i == j) continue; int k = x - i - j; if (i == k || j == k) continue; if (j < k && k <= n) { cnt++; } } } return cnt; } boolean isFin(int n, int x) { return n == 0 && x == 0; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 11, 1, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 146, 5 ], [ 146, 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 ], [ 21, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 21, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 21, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 21, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 21, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 8, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 68, 69 ], [ 67, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 74, 75 ], [ 73, 76 ], [ 64, 77 ], [ 77, 78 ], [ 77, 79 ], [ 64, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 100, 101 ], [ 100, 102 ], [ 93, 103 ], [ 103, 104 ], [ 104, 105 ], [ 93, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 108, 115 ], [ 115, 116 ], [ 115, 117 ], [ 108, 118 ], [ 118, 119 ], [ 119, 120 ], [ 108, 121 ], [ 122, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 126, 126 ], [ 126, 127 ], [ 126, 128 ], [ 126, 129 ], [ 122, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 135, 136 ], [ 64, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 137, 142 ], [ 6, 143 ], [ 143, 144 ], [ 0, 145 ], [ 145, 146 ], [ 145, 147 ] ]
[ "import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> listN = new ArrayList<Integer>();\n\t\tList<Integer> listX = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}\n\n\t\tfor(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> listN = new ArrayList<Integer>();\n\t\tList<Integer> listX = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}\n\n\t\tfor(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> listN = new ArrayList<Integer>();\n\t\tList<Integer> listX = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}\n\n\t\tfor(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> listN = new ArrayList<Integer>();\n\t\tList<Integer> listX = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}\n\n\t\tfor(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "List<Integer> listN = new ArrayList<Integer>();", "listN", "new ArrayList<Integer>()", "List<Integer> listX = new ArrayList<Integer>();", "listX", "new ArrayList<Integer>()", "for(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}", ";", "{\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}", "{\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}", "(n == 0) && (x == 0)", "(n == 0)", "n", "0", "(x == 0)", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "listN.add(n)", "listN.add", "listN", "n", "listX.add(x)", "listX.add", "listX", "x", "for(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < listN.size()", "i", "listN.size()", "listN.size", "listN", "i++", "i++", "i", "{\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}", "{\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}", "int n = listN.get(i);", "n", "listN.get(i)", "listN.get", "listN", "i", "int x = listX.get(i);", "x", "listX.get(i)", "listX.get", "listX", "i", "int cnt = 0;", "cnt", "0", "for(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a <= n", "a", "n", "a++", "a++", "a", "{\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int b = a + 1;", "int b = a + 1;", "b", "a + 1", "a", "1", "b <= n", "b", "n", "b++", "b++", "b", "{\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int c = b + 1;", "int c = b + 1;", "c", "b + 1", "b", "1", "c <= n", "c", "n", "c++", "c++", "c", "{\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int sum = a + b + c;", "sum", "a + b + c", "a + b + c", "a", "b", "c", "if(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}", "sum == x", "sum", "x", "{\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}", "cnt++", "cnt", "System.out.println(cnt)", "System.out.println", "System.out", "System", "System.out", "cnt", "String[] args", "args", "public class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> listN = new ArrayList<Integer>();\n\t\tList<Integer> listX = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}\n\n\t\tfor(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n\t}\n}", "public class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> listN = new ArrayList<Integer>();\n\t\tList<Integer> listX = new ArrayList<Integer>();\n\t\tfor(;;){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tif((n == 0) && (x == 0)){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlistN.add(n);\n\t\t\tlistX.add(x);\n\t\t}\n\n\t\tfor(int i = 0; i < listN.size(); i++){\n\t\t\tint n = listN.get(i);\n\t\t\tint x = listX.get(i);\n\t\t\tint cnt = 0;\n\t\t\tfor(int a = 1; a <= n; a++){\n\t\t\t\tfor(int b = a + 1; b <= n; b++){\n\t\t\t\t\tfor(int c = b + 1; c <= n; c++){\n\t\t\t\t\t\tint sum = a + b + c;\n\t\t\t\t\t\tif(sum == x){\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n\t}\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); List<Integer> listN = new ArrayList<Integer>(); List<Integer> listX = new ArrayList<Integer>(); for(;;){ int n = scan.nextInt(); int x = scan.nextInt(); if((n == 0) && (x == 0)){ break; } listN.add(n); listX.add(x); } for(int i = 0; i < listN.size(); i++){ int n = listN.get(i); int x = listX.get(i); int cnt = 0; for(int a = 1; a <= n; a++){ for(int b = a + 1; b <= n; b++){ for(int c = b + 1; c <= n; c++){ int sum = a + b + c; if(sum == x){ cnt++; } } } } System.out.println(cnt); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 17, 41, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 0, 13, 17, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 0, 13, 17, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 0, 13, 17, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 9, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 2, 13, 17, 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 ], [ 142, 11 ], [ 142, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 14, 22 ], [ 22, 23 ], [ 14, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 32, 37 ], [ 26, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 43, 44 ], [ 43, 45 ], [ 26, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 49, 50 ], [ 48, 51 ], [ 51, 52 ], [ 51, 53 ], [ 26, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 26, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 69, 70 ], [ 69, 71 ], [ 64, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 64, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 78, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 97, 98 ], [ 97, 99 ], [ 92, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 92, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 108, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 112, 113 ], [ 112, 114 ], [ 108, 115 ], [ 115, 116 ], [ 115, 117 ], [ 106, 118 ], [ 118, 119 ], [ 106, 120 ], [ 120, 121 ], [ 121, 122 ], [ 123, 123 ], [ 123, 124 ], [ 123, 125 ], [ 123, 126 ], [ 121, 127 ], [ 120, 128 ], [ 128, 129 ], [ 129, 130 ], [ 26, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 136, 137 ], [ 136, 138 ], [ 12, 139 ], [ 139, 140 ], [ 0, 141 ], [ 141, 142 ], [ 141, 143 ] ]
[ "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\tint n, x, ways;\n\t\twhile (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}\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\tint n, x, ways;\n\t\twhile (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n, x, ways;\n\t\twhile (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n, x, ways;\n\t\twhile (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}\n\t}", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "int n", "n", "x", "x", "ways;", "ways", "while (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}", "true", "{\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}", "ways = 0", "ways", "0", "String[] num = in.readLine().split(\" \");", "num", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "n = Integer.parseInt(num[0])", "n", "Integer.parseInt(num[0])", "Integer.parseInt", "Integer", "num[0]", "num", "0", "x = Integer.parseInt(num[1])", "x", "Integer.parseInt(num[1])", "Integer.parseInt", "Integer", "num[1]", "num", "1", "if (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i += 1", "i += 1", "i", "1", "{\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j += 1", "j += 1", "j", "1", "{\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k += 1", "k += 1", "k", "1", "{\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}", "i == j || j == k || i == k", "i == j || j == k || i == k", "i == j", "i", "j", "j == k", "j", "k", "i == k", "i", "k", "{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}", "continue;", "if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}", "ways++", "ways", "System.out.println(ways / 6)", "System.out.println", "System.out", "System", "System.out", "ways / 6", "ways", "6", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n, x, ways;\n\t\twhile (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}\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\tint n, x, ways;\n\t\twhile (true) {\n\t\t\tways = 0;\n\t\t\tString[] num = in.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(num[0]);\n\t\t\tx = Integer.parseInt(num[1]);\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i += 1) {\n\t\t\t\tfor (int j = 1; j <= n; j += 1) {\n\t\t\t\t\tfor (int k = 1; k <= n; k += 1) {\n\t\t\t\t\t\tif (i == j || j == k || i == k) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} else if (i + j + k == x) {\n\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ways / 6);\n\t\t}\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)); int n, x, ways; while (true) { ways = 0; String[] num = in.readLine().split(" "); n = Integer.parseInt(num[0]); x = Integer.parseInt(num[1]); if (n == 0 && x == 0) { break; } for (int i = 1; i <= n; i += 1) { for (int j = 1; j <= n; j += 1) { for (int k = 1; k <= n; k += 1) { if (i == j || j == k || i == k) { continue; } else if (i + j + k == x) { ways++; } } } } System.out.println(ways / 6); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 13, 17, 3, 41, 13, 20, 4, 18, 13, 13, 4, 18, 13, 28, 13, 13, 30, 30, 41, 13, 4, 13, 18, 13, 17, 18, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 2, 13, 17, 0, 13, 2, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 29, 13, 23, 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 ], [ 153, 11 ], [ 153, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 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 ], [ 35, 37 ], [ 34, 38 ], [ 23, 39 ], [ 39, 40 ], [ 39, 41 ], [ 23, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 14, 46 ], [ 46, 47 ], [ 47, 48 ], [ 14, 49 ], [ 49, 50 ], [ 49, 51 ], [ 49, 52 ], [ 53, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 53, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 64, 69 ], [ 12, 70 ], [ 70, 71 ], [ 153, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 75, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 74, 86 ], [ 86, 87 ], [ 86, 88 ], [ 74, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 89, 99 ], [ 99, 100 ], [ 100, 101 ], [ 89, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 104, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 104, 116 ], [ 116, 117 ], [ 117, 118 ], [ 104, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 121, 128 ], [ 128, 129 ], [ 128, 130 ], [ 121, 131 ], [ 131, 132 ], [ 132, 133 ], [ 121, 134 ], [ 135, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 139, 139 ], [ 139, 140 ], [ 139, 141 ], [ 139, 142 ], [ 137, 143 ], [ 136, 144 ], [ 144, 145 ], [ 74, 146 ], [ 146, 147 ], [ 72, 148 ], [ 148, 149 ], [ 72, 150 ], [ 150, 151 ], [ 0, 152 ], [ 152, 153 ], [ 152, 154 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tList<int[]> nxs = new ArrayList<>();\n\n\t\twhile(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}\n\t\tsc.close();\n\n\t\tfor (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}\n\n\tprivate static int check(int n, int x) {\n\n\t\tif(n > x-3) n = x-3;\n\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tList<int[]> nxs = new ArrayList<>();\n\n\t\twhile(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}\n\t\tsc.close();\n\n\t\tfor (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}\n\n\tprivate static int check(int n, int x) {\n\n\t\tif(n > x-3) n = x-3;\n\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tList<int[]> nxs = new ArrayList<>();\n\n\t\twhile(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}\n\t\tsc.close();\n\n\t\tfor (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tList<int[]> nxs = new ArrayList<>();\n\n\t\twhile(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}\n\t\tsc.close();\n\n\t\tfor (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "List<int[]> nxs = new ArrayList<>();", "nxs", "new ArrayList<>()", "while(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}", "true", "{\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0) break;", "n == 0", "n", "0", "break;", "int[] nx = new int[] {n, x};", "nx", "new int[] {n, x}", "nxs.add(nx)", "nxs.add", "nxs", "nx", "sc.close()", "sc.close", "sc", "for (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}", "int[] nx", "nxs", "{\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}", "{\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}", "int count = check(nx[0], nx[1]);", "count", "check(nx[0], nx[1])", "check", "nx[0]", "nx", "0", "nx[1]", "nx", "1", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "private static int check(int n, int x) {\n\n\t\tif(n > x-3) n = x-3;\n\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "check", "{\n\n\t\tif(n > x-3) n = x-3;\n\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "if(n > x-3) n = x-3;", "n > x-3", "n", "x-3", "x", "3", "n = x-3", "n", "x-3", "x", "3", "int ans = 0;", "ans", "0", "for (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <= n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}", "for (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}", "{\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}", "if(i + j + k == x) ans++;", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "ans++", "ans", "return ans;", "ans", "int n", "n", "int x", "x", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tList<int[]> nxs = new ArrayList<>();\n\n\t\twhile(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}\n\t\tsc.close();\n\n\t\tfor (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}\n\n\tprivate static int check(int n, int x) {\n\n\t\tif(n > x-3) n = x-3;\n\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tList<int[]> nxs = new ArrayList<>();\n\n\t\twhile(true) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\n\t\t\tif(n == 0) break;\n\t\t\tint[] nx = new int[] {n, x};\n\t\t\tnxs.add(nx);\n\t\t}\n\t\tsc.close();\n\n\t\tfor (int[] nx : nxs) {\n\t\t\tint count = check(nx[0], nx[1]);\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t}\n\n\tprivate static int check(int n, int x) {\n\n\t\tif(n > x-3) n = x-3;\n\n\t\tint ans = 0;\n\t\tfor (int i = 1; i <= n-2; i++) {\n\t\t\tfor (int j = i+1; j <= n-1; j++) {\n\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\tif(i + j + k == x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); List<int[]> nxs = new ArrayList<>(); while(true) { int n = sc.nextInt(); int x = sc.nextInt(); if(n == 0) break; int[] nx = new int[] {n, x}; nxs.add(nx); } sc.close(); for (int[] nx : nxs) { int count = check(nx[0], nx[1]); System.out.println(count); } } private static int check(int n, int x) { if(n > x-3) n = x-3; int ans = 0; for (int i = 1; i <= n-2; i++) { for (int j = i+1; j <= n-1; j++) { for (int k = j+1; k <= n; k++) { if(i + j + k == x) ans++; } } } return ans; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 17, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 109, 5 ], [ 109, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 22, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 33, 34 ], [ 33, 35 ], [ 22, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 22, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 56 ], [ 57, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 58, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 58, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 80, 81 ], [ 80, 82 ], [ 73, 83 ], [ 83, 84 ], [ 84, 85 ], [ 73, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 91, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 89, 95 ], [ 88, 96 ], [ 96, 97 ], [ 97, 98 ], [ 22, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 99, 105 ], [ 6, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int i ,j ,k ,count;\n\n while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\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 int i ,j ,k ,count;\n\n while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int i ,j ,k ,count;\n\n while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int i ,j ,k ,count;\n\n while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int i", "i", "j", "j", "k", "k", "count;", "count", "while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }", "true", "{\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "count = 0", "count", "0", "if(n == 0 && x == 0)break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }", "i = 1;", "i = 1", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }", "{\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }", "for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }", "j = i + 1;", "j = i + 1", "j", "i + 1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }", "{\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }", "for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }", "k = j + 1;", "k = j + 1", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n if(i + j + k == x){\n count++;\n }\n }", "{\n if(i + j + k == x){\n count++;\n }\n }", "if(i + j + k == x){\n count++;\n }", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n count++;\n }", "count++", "count", "System.out.printf(\"%d\\n\",count)", "System.out.printf", "System.out", "System", "System.out", "\"%d\\n\"", "count", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int i ,j ,k ,count;\n\n while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int i ,j ,k ,count;\n\n while(true){\n int n = sc.nextInt();\n int x = sc.nextInt();\n count = 0;\n\n if(n == 0 && x == 0)break;\n\n for(i = 1;i <= n;i++){\n for(j = i + 1;j <= n;j++){\n for(k = j + 1;k <= n;k++){\n if(i + j + k == x){\n count++;\n }\n }\n }\n }\n\n System.out.printf(\"%d\\n\",count);\n\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int i ,j ,k ,count; while(true){ int n = sc.nextInt(); int x = sc.nextInt(); count = 0; if(n == 0 && x == 0)break; for(i = 1;i <= n;i++){ for(j = i + 1;j <= n;j++){ for(k = j + 1;k <= n;k++){ if(i + j + k == x){ count++; } } } } System.out.printf("%d\n",count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 17, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 115, 5 ], [ 115, 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 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 20, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 40, 48 ], [ 48, 49 ], [ 49, 50 ], [ 40, 51 ], [ 52, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 53, 60 ], [ 60, 61 ], [ 60, 62 ], [ 53, 63 ], [ 63, 64 ], [ 64, 65 ], [ 53, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 68, 75 ], [ 75, 76 ], [ 75, 77 ], [ 68, 78 ], [ 78, 79 ], [ 79, 80 ], [ 68, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 84, 90 ], [ 83, 91 ], [ 91, 92 ], [ 20, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 95, 98 ], [ 93, 99 ], [ 20, 100 ], [ 100, 101 ], [ 100, 102 ], [ 8, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 103, 108 ], [ 8, 109 ], [ 109, 110 ], [ 110, 111 ], [ 6, 112 ], [ 112, 113 ], [ 0, 114 ], [ 114, 115 ], [ 114, 116 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder output = new StringBuilder();\n\t\tint count = 0;\n\t\t\n\t\twhile(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}\n\t\tSystem.out.print(output);\n\t\tscan.close();\n\t}\n\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\tStringBuilder output = new StringBuilder();\n\t\tint count = 0;\n\t\t\n\t\twhile(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}\n\t\tSystem.out.print(output);\n\t\tscan.close();\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder output = new StringBuilder();\n\t\tint count = 0;\n\t\t\n\t\twhile(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}\n\t\tSystem.out.print(output);\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder output = new StringBuilder();\n\t\tint count = 0;\n\t\t\n\t\twhile(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}\n\t\tSystem.out.print(output);\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "StringBuilder output = new StringBuilder();", "output", "new StringBuilder()", "int count = 0;", "count", "0", "while(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}", "true", "{\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}", "if ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "count++", "count", "output.append(count).append('\\n')", "output.append(count).append", "output.append(count)", "output.append", "output", "count", "'\\n'", "count = 0", "count", "0", "System.out.print(output)", "System.out.print", "System.out", "System", "System.out", "output", "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\tStringBuilder output = new StringBuilder();\n\t\tint count = 0;\n\t\t\n\t\twhile(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}\n\t\tSystem.out.print(output);\n\t\tscan.close();\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder output = new StringBuilder();\n\t\tint count = 0;\n\t\t\n\t\twhile(true) {\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\t\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\t\n\t\t\tfor (int i = 1; i <= n; i++) {\n\t\t\t\tfor (int j = i+1; j <= n; j++) {\n\t\t\t\t\tfor (int k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif ((i + j + k) == x)\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput.append(count).append('\\n');\n\t\t\tcount = 0;\n\t\t}\n\t\tSystem.out.print(output);\n\t\tscan.close();\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); StringBuilder output = new StringBuilder(); int count = 0; while(true) { int n = scan.nextInt(); int x = scan.nextInt(); if (n == 0 && x == 0) break; for (int i = 1; i <= n; i++) { for (int j = i+1; j <= n; j++) { for (int k = j+1; k <= n; k++) { if ((i + j + k) == x) count++; } } } output.append(count).append('\n'); count = 0; } System.out.print(output); scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 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 ], [ 123, 8 ], [ 123, 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 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 20, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 20, 54 ], [ 54, 55 ], [ 54, 56 ], [ 20, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 57, 67 ], [ 67, 68 ], [ 68, 69 ], [ 57, 70 ], [ 71, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 72, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 72, 84 ], [ 84, 85 ], [ 85, 86 ], [ 72, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 96, 97 ], [ 96, 98 ], [ 89, 99 ], [ 99, 100 ], [ 100, 101 ], [ 89, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 105, 111 ], [ 104, 112 ], [ 112, 113 ], [ 20, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 9, 120 ], [ 120, 121 ], [ 0, 122 ], [ 122, 123 ], [ 122, 124 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }\n \n\t\t\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }\n \n\t\t\n\t}\n\n}", "Main", "public static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }\n \n\t\t\n\t}", "main", "{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }\n \n\t\t\n\t}", "InputStreamReader isr = new InputStreamReader(System.in);", "isr", "new InputStreamReader(System.in)", "BufferedReader br = new BufferedReader(isr);", "br", "new BufferedReader(isr)", "while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }", "true", "{\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }", "String[] nx = br.readLine().split(\" \");", "nx", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(nx[0]);", "n", "Integer.parseInt(nx[0])", "Integer.parseInt", "Integer", "nx[0]", "nx", "0", "int x = Integer.parseInt(nx[1]);", "x", "Integer.parseInt(nx[1])", "Integer.parseInt", "Integer", "nx[1]", "nx", "1", "if(n == 0 && x == 0)\n \tbreak;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n - 2", "i", "n - 2", "n", "2", "i++", "i++", "i", "{\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }", "{\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }", "for (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n -1", "j", "n -1", "n", "1", "j++", "j++", "j", "{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}", "{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}", "for (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}", "{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}", "if ((i + j + k) == x)\n \t\t\t\tcount++;", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }\n \n\t\t\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n while (true)\n {\n \tString[] nx = br.readLine().split(\" \");\n int n = Integer.parseInt(nx[0]);\n int x = Integer.parseInt(nx[1]);\n if(n == 0 && x == 0)\n \tbreak;\n \n int count = 0;\n for (int i = 1; i <= n - 2; i++)\n {\n \tfor (int j = i + 1; j <= n -1; j++)\n \t{\n \t\tfor (int k = j + 1; k <= n; k++)\n \t\t{\n \t\t\tif ((i + j + k) == x)\n \t\t\t\tcount++;\n \t\t}\n \t}\n }\n System.out.println(count);\n }\n \n\t\t\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args)throws Exception{ InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); while (true) { String[] nx = br.readLine().split(" "); int n = Integer.parseInt(nx[0]); int x = Integer.parseInt(nx[1]); if(n == 0 && x == 0) break; int count = 0; for (int i = 1; i <= n - 2; i++) { for (int j = i + 1; j <= n -1; j++) { for (int k = j + 1; k <= n; k++) { if ((i + j + k) == x) count++; } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 42, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 40, 13, 4, 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 ], [ 7, 12 ], [ 12, 13 ], [ 12, 14 ], [ 7, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 23, 26 ], [ 26, 27 ], [ 27, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 35, 36 ], [ 20, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 20, 46 ], [ 46, 47 ], [ 46, 48 ], [ 20, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 49, 59 ], [ 59, 60 ], [ 60, 61 ], [ 49, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 64, 76 ], [ 76, 77 ], [ 77, 78 ], [ 64, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 84, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 88, 96 ], [ 96, 97 ], [ 20, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 17, 102 ], [ 102, 103 ], [ 103, 104 ], [ 15, 105 ], [ 105, 106 ] ]
[ "import java.io.PrintWriter;\nimport java.util.Scanner;\n\nclass Main{\n private static final Scanner sc = new Scanner(System.in);\n private static final PrintWriter out = new PrintWriter(System.out);\n public static void main(String[] Args){\n while(true){\n final int n = Integer.parseInt(sc.next());\n final int x = Integer.parseInt(sc.next());\n if(n==0&&x==0) break;\n int ans = 0;\n for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }\n out.println(ans);\n }\n out.flush();\n }\n}", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n private static final Scanner sc = new Scanner(System.in);\n private static final PrintWriter out = new PrintWriter(System.out);\n public static void main(String[] Args){\n while(true){\n final int n = Integer.parseInt(sc.next());\n final int x = Integer.parseInt(sc.next());\n if(n==0&&x==0) break;\n int ans = 0;\n for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }\n out.println(ans);\n }\n out.flush();\n }\n}", "Main", "private static final Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "private static final PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public static void main(String[] Args){\n while(true){\n final int n = Integer.parseInt(sc.next());\n final int x = Integer.parseInt(sc.next());\n if(n==0&&x==0) break;\n int ans = 0;\n for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }\n out.println(ans);\n }\n out.flush();\n }", "main", "{\n while(true){\n final int n = Integer.parseInt(sc.next());\n final int x = Integer.parseInt(sc.next());\n if(n==0&&x==0) break;\n int ans = 0;\n for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }\n out.println(ans);\n }\n out.flush();\n }", "while(true){\n final int n = Integer.parseInt(sc.next());\n final int x = Integer.parseInt(sc.next());\n if(n==0&&x==0) break;\n int ans = 0;\n for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }\n out.println(ans);\n }", "true", "{\n final int n = Integer.parseInt(sc.next());\n final int x = Integer.parseInt(sc.next());\n if(n==0&&x==0) break;\n int ans = 0;\n for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }\n out.println(ans);\n }", "final int n = Integer.parseInt(sc.next());", "n", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "final int x = Integer.parseInt(sc.next());", "x", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "if(n==0&&x==0) break;", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "int ans = 0;", "ans", "0", "for(int i = 1; i<=n-2; i++){\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i<=n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }", "{\n for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }\n }", "for(int j = i+1; j<=n-1; j++){\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j<=n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }", "{\n final int k = x-i-j;\n if(j<k&&k<=n) ans++;\n }", "final int k = x-i-j;", "k", "x-i-j", "x-i-j", "x", "i", "j", "if(j<k&&k<=n) ans++;", "j<k&&k<=n", "j<k", "j", "k", "k<=n", "k", "n", "ans++", "ans", "out.println(ans)", "out.println", "out", "ans", "out.flush()", "out.flush", "out", "String[] Args", "Args" ]
import java.io.PrintWriter; import java.util.Scanner; class Main{ private static final Scanner sc = new Scanner(System.in); private static final PrintWriter out = new PrintWriter(System.out); public static void main(String[] Args){ while(true){ final int n = Integer.parseInt(sc.next()); final int x = Integer.parseInt(sc.next()); if(n==0&&x==0) break; int ans = 0; for(int i = 1; i<=n-2; i++){ for(int j = i+1; j<=n-1; j++){ final int k = x-i-j; if(j<k&&k<=n) ans++; } } out.println(ans); } out.flush(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 30, 0, 13, 2, 2, 13, 13, 13, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 129, 5 ], [ 129, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 25, 27 ], [ 14, 28 ], [ 28, 29 ], [ 28, 30 ], [ 14, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 76, 78 ], [ 72, 79 ], [ 79, 80 ], [ 79, 81 ], [ 70, 82 ], [ 70, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 87, 87 ], [ 87, 88 ], [ 87, 89 ], [ 87, 90 ], [ 83, 91 ], [ 91, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 100, 101 ], [ 100, 102 ], [ 91, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 14, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 112, 113 ], [ 112, 114 ], [ 107, 115 ], [ 115, 116 ], [ 14, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 8, 123 ], [ 123, 124 ], [ 124, 125 ], [ 6, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}\n\t\tscan.close();\n}\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\twhile(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}\n\t\tscan.close();\n}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}\n\t\tscan.close();\n}", "main", "{\n\t\tScanner scan=new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}\n\t\tscan.close();\n}", "Scanner scan=new Scanner(System.in);", "scan", "new Scanner(System.in)", "while(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}", "true", "{\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}", "int n=scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int a=scan.nextInt();", "a", "scan.nextInt()", "scan.nextInt", "scan", "int sum=0", "sum", "0", "count=0;", "count", "0", "for(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j=2;", "int j=2;", "j", "2", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k=3;", "int k=3;", "k", "3", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "i == j || j == k || i == k", "i == j || j == k || i == k", "i == j", "i", "j", "j == k", "j", "k", "i == k", "i", "k", "{\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "sum = i+j+k", "sum", "i+j+k", "i+j+k", "i", "j", "k", "if (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}", "sum == a && i<j && j<k", "sum == a && i<j && j<k", "sum == a", "sum", "a", "i<j", "i", "j", "j<k", "j", "k", "{\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}", "count += 1", "count", "1", "if(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}", "n==0 && a==0", "n==0", "n", "0", "a==0", "a", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "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\twhile(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}\n\t\tscan.close();\n}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n=scan.nextInt();\n\t\t\tint a=scan.nextInt();\n\t\t\tint sum=0,count=0;\n\t\t\tfor(int i=1;i<=n;i++) {\n\t\t\t\tfor(int j=2;j<=n;j++) {\n\t\t\t\t\tfor(int k=3;k<=n;k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k) {\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tsum = i+j+k;\n\t\t\t\t\t\tif (sum == a && i<j && j<k) {\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(n==0 && a==0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n}\n\t\tscan.close();\n}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan=new Scanner(System.in); while(true) { int n=scan.nextInt(); int a=scan.nextInt(); int sum=0,count=0; for(int i=1;i<=n;i++) { for(int j=2;j<=n;j++) { for(int k=3;k<=n;k++) { if(i == j || j == k || i == k) { }else { sum = i+j+k; if (sum == a && i<j && j<k) { count += 1; } } } } } if(n==0 && a==0) { break; } System.out.println(count); } scan.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 41, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 13, 17, 3, 4, 13, 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 ], [ 120, 11 ], [ 120, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 18, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 25, 27 ], [ 18, 28 ], [ 28, 29 ], [ 29, 30 ], [ 18, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 37, 39 ], [ 33, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 33, 45 ], [ 45, 46 ], [ 46, 47 ], [ 33, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 50, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 68, 68 ], [ 68, 69 ], [ 68, 70 ], [ 68, 71 ], [ 66, 72 ], [ 65, 73 ], [ 73, 74 ], [ 14, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 12, 81 ], [ 81, 82 ], [ 12, 83 ], [ 83, 84 ], [ 120, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 96, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 101, 102 ], [ 93, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 93, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 93, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 85, 117 ], [ 117, 118 ], [ 0, 119 ], [ 119, 120 ], [ 119, 121 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void solve(int n, int x) {\n\t\tint ans = 0;\n\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void solve(int n, int x) {\n\t\tint ans = 0;\n\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}\n\t}\n}", "Main", "public static void solve(int n, int x) {\n\t\tint ans = 0;\n\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "solve", "{\n\t\tint ans = 0;\n\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "int ans = 0;", "ans", "0", "for(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}", "for(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}", "{\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}", "if(i+j+k==x) ans++;", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "ans++", "ans", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "int n", "n", "int x", "x", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "while(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}", "true", "{\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}", "int n", "n", "x;", "x", "n = in.nextInt()", "n", "in.nextInt()", "in.nextInt", "in", "x = in.nextInt()", "x", "in.nextInt()", "in.nextInt", "in", "if(n == 0) break;", "n == 0", "n", "0", "break;", "solve(n, x)", "solve", "n", "x", "String[] args", "args", "public class Main {\n\tpublic static void solve(int n, int x) {\n\t\tint ans = 0;\n\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void solve(int n, int x) {\n\t\tint ans = 0;\n\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\tif(i+j+k==x) ans++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true) {\n\t\t\tint n, x;\n\t\t\tn = in.nextInt();\n\t\t\tx = in.nextInt();\n\t\t\tif(n == 0) break;\n\n\t\t\tsolve(n, x);\n\t\t}\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void solve(int n, int x) { int ans = 0; for(int i=1;i<=n-2;i++) { for(int j=i+1;j<=n-1;j++) { for(int k=j+1;k<=n;k++) { if(i+j+k==x) ans++; } } } System.out.println(ans); } public static void main(String[] args) { Scanner in = new Scanner(System.in); while(true) { int n, x; n = in.nextInt(); x = in.nextInt(); if(n == 0) break; solve(n, x); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 0, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 11, 1, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 13, 17, 42, 17, 30, 14, 2, 13, 13, 30, 40, 13, 0, 13, 13, 14, 2, 13, 13, 30, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 40, 13, 30, 40, 13, 4, 18, 4, 18, 13, 13, 17, 4, 18, 18, 13, 13, 20, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 148, 5 ], [ 148, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 8, 27 ], [ 27, 28 ], [ 27, 29 ], [ 8, 30 ], [ 30, 31 ], [ 30, 32 ], [ 8, 33 ], [ 33, 34 ], [ 33, 35 ], [ 8, 36 ], [ 36, 37 ], [ 36, 38 ], [ 8, 39 ], [ 39, 40 ], [ 39, 41 ], [ 8, 42 ], [ 42, 43 ], [ 42, 44 ], [ 8, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 47, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 59, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 47, 68 ], [ 68, 69 ], [ 68, 70 ], [ 47, 71 ], [ 71, 72 ], [ 71, 73 ], [ 47, 74 ], [ 74, 75 ], [ 74, 76 ], [ 47, 77 ], [ 77, 78 ], [ 77, 79 ], [ 47, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 87, 88 ], [ 88, 89 ], [ 80, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 91, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 105, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 104, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 100, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 117, 123 ], [ 116, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 116, 129 ], [ 129, 130 ], [ 130, 131 ], [ 47, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 134, 137 ], [ 132, 138 ], [ 8, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 6, 145 ], [ 145, 146 ], [ 0, 147 ], [ 147, 148 ], [ 147, 149 ] ]
[ "\n\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint n, x, c, result,min,max;\n\t\t// ??????????¨????\n\t\tn = 0;\n\t\tx = 0;\n\t\tc = 1;// min????¬????????????????\n\t\tresult = 0;// ??????????????°\n\t\tmin = 1;//????°????\n\t\tmax = 0;//?????§???\n\n\t\twhile (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(new String(sb));\n\t}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint n, x, c, result,min,max;\n\t\t// ??????????¨????\n\t\tn = 0;\n\t\tx = 0;\n\t\tc = 1;// min????¬????????????????\n\t\tresult = 0;// ??????????????°\n\t\tmin = 1;//????°????\n\t\tmax = 0;//?????§???\n\n\t\twhile (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(new String(sb));\n\t}\n}", "Main", "public static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint n, x, c, result,min,max;\n\t\t// ??????????¨????\n\t\tn = 0;\n\t\tx = 0;\n\t\tc = 1;// min????¬????????????????\n\t\tresult = 0;// ??????????????°\n\t\tmin = 1;//????°????\n\t\tmax = 0;//?????§???\n\n\t\twhile (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(new String(sb));\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint n, x, c, result,min,max;\n\t\t// ??????????¨????\n\t\tn = 0;\n\t\tx = 0;\n\t\tc = 1;// min????¬????????????????\n\t\tresult = 0;// ??????????????°\n\t\tmin = 1;//????°????\n\t\tmax = 0;//?????§???\n\n\t\twhile (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(new String(sb));\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int n", "n", "x", "x", "c", "c", "result", "result", "min", "min", "max;", "max", "n = 0", "n", "0", "x = 0", "x", "0", "c = 1", "c", "1", "result = 0", "result", "0", "min = 1", "min", "1", "max = 0", "max", "0", "while (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}", "true", "{// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}", "n = scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "x = scan.nextInt()", "x", "scan.nextInt()", "scan.nextInt", "scan", "if ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}", "(n == 0) & (x == 0)", "(n == 0)", "n", "0", "(x == 0)", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "max = n", "max", "n", "min = 1", "min", "1", "result=0", "result", "0", "c = 1", "c", "1", "for(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", ";", "min<=(n-2)", "min", "(n-2)", "n", "2", "min++", "min++", "min", "{//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "c = min + 1", "c", "min + 1", "min", "1", "while(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}", "true", "{\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}", "if(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}", "max == c", "max", "c", "{//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}", "c++", "c", "max = n", "max", "n", "if(c == max){break;}", "c == max", "c", "max", "{break;}", "break;", "if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}", "(min + c + max) == x", "(min + c + max)", "min + c + max", "min", "c", "max", "x", "{//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}", "result++", "result", "max--", "max", "{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}", "max--", "max", "sb.append(result).append(\"\\n\")", "sb.append(result).append", "sb.append(result)", "sb.append", "sb", "result", "\"\\n\"", "System.out.print(new String(sb))", "System.out.print", "System.out", "System", "System.out", "new String(sb)", "String args[]", "args", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint n, x, c, result,min,max;\n\t\t// ??????????¨????\n\t\tn = 0;\n\t\tx = 0;\n\t\tc = 1;// min????¬????????????????\n\t\tresult = 0;// ??????????????°\n\t\tmin = 1;//????°????\n\t\tmax = 0;//?????§???\n\n\t\twhile (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(new String(sb));\n\t}\n}", "public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint n, x, c, result,min,max;\n\t\t// ??????????¨????\n\t\tn = 0;\n\t\tx = 0;\n\t\tc = 1;// min????¬????????????????\n\t\tresult = 0;// ??????????????°\n\t\tmin = 1;//????°????\n\t\tmax = 0;//?????§???\n\n\t\twhile (true) {// ??????????????????????????§???????????????\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\n\t\t\tif ((n == 0) & (x == 0)) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tmax = n;//?????§???????¨????\n\t\t\tmin = 1;//????°?????????????\n\t\t\tresult=0;//result??????????¨????\n\t\t\tc = 1;//?????????????¨????\n\n\t\t\t// x?????????0?????£??????????????????\n\t\t\tfor(;min<=(n-2);min++){//?????´????????????1????????????????????????\n\t\t\t\tc = min + 1;//?????????????¨????\n\t\t\t\twhile(true){\n\t\t\t\t\tif(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢???????\n\t\t\t\t\t\tc++;\n\t\t\t\t\t\tmax = n;//max??????????????????\n\t\t\t\t\t\tif(c == max){break;}\n\t\t\t\t\t}else if((min + c + max) == x){//x??¨?????????????????£?????´???\n\t\t\t\t\t\tresult++;\n\t\t\t\t\t\tmax--;\n\t\t\t\t\t}else{//???????¶??????????x?????????????????´???\n\t\t\t\t\t\tmax--;//max?????????????????????\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tsb.append(result).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(new String(sb));\n\t}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String args[]) { Scanner scan = new Scanner(System.in); StringBuilder sb = new StringBuilder(); int n, x, c, result,min,max; // ??????????¨???? n = 0; x = 0; c = 1;// min????¬???????????????? result = 0;// ??????????????° min = 1;//????°???? max = 0;//?????§??? while (true) {// ??????????????????????????§??????????????? n = scan.nextInt(); x = scan.nextInt(); if ((n == 0) & (x == 0)) { break; } max = n;//?????§???????¨???? min = 1;//????°????????????? result=0;//result??????????¨???? c = 1;//?????????????¨???? // x?????????0?????£?????????????????? for(;min<=(n-2);min++){//?????´????????????1???????????????????????? c = min + 1;//?????????????¨???? while(true){ if(max == c){//c????????¨max???????????????????????£?????´???c?????????1?¢??????? c++; max = n;//max?????????????????? if(c == max){break;} }else if((min + c + max) == x){//x??¨?????????????????£?????´??? result++; max--; }else{//???????¶??????????x?????????????????´??? max--;//max????????????????????? } } } sb.append(result).append("\n"); } System.out.print(new String(sb)); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 41, 13, 4, 18, 13, 42, 40, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 13, 13, 30, 3, 14, 2, 13, 13, 30, 9, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 4, 18, 13, 0, 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 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 26, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 32, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 44, 46 ], [ 32, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 52, 54 ], [ 32, 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 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 68, 75 ], [ 75, 76 ], [ 75, 77 ], [ 68, 78 ], [ 78, 79 ], [ 79, 80 ], [ 68, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 86, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 82, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 82, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 100, 101 ], [ 82, 102 ], [ 102, 103 ], [ 32, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 32, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 32, 115 ], [ 115, 116 ], [ 115, 117 ], [ 12, 118 ], [ 118, 119 ] ]
[ "import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nclass Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tint count = 0;\t\t//?§£????????°\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n while( !(line.equals(\"0 0\")) ) {\n\t\t\tString nums[] = line.split(\" \");\n\t\t\tint max = Integer.parseInt(nums[0]);\n\t\t\tint sum = Integer.parseInt(nums[1]);\n\t\t\tfor( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\tline = br.readLine();\n\t\t\tcount = 0;\n\t\t}\n\t}\n}", "import java.io.IOException;", "IOException", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tint count = 0;\t\t//?§£????????°\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n while( !(line.equals(\"0 0\")) ) {\n\t\t\tString nums[] = line.split(\" \");\n\t\t\tint max = Integer.parseInt(nums[0]);\n\t\t\tint sum = Integer.parseInt(nums[1]);\n\t\t\tfor( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\tline = br.readLine();\n\t\t\tcount = 0;\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\tint count = 0;\t\t//?§£????????°\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n while( !(line.equals(\"0 0\")) ) {\n\t\t\tString nums[] = line.split(\" \");\n\t\t\tint max = Integer.parseInt(nums[0]);\n\t\t\tint sum = Integer.parseInt(nums[1]);\n\t\t\tfor( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\tline = br.readLine();\n\t\t\tcount = 0;\n\t\t}\n\t}", "main", "{\n\t\tint count = 0;\t\t//?§£????????°\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String line = br.readLine();\n while( !(line.equals(\"0 0\")) ) {\n\t\t\tString nums[] = line.split(\" \");\n\t\t\tint max = Integer.parseInt(nums[0]);\n\t\t\tint sum = Integer.parseInt(nums[1]);\n\t\t\tfor( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\tline = br.readLine();\n\t\t\tcount = 0;\n\t\t}\n\t}", "int count = 0;", "count", "0", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "while( !(line.equals(\"0 0\")) ) {\n\t\t\tString nums[] = line.split(\" \");\n\t\t\tint max = Integer.parseInt(nums[0]);\n\t\t\tint sum = Integer.parseInt(nums[1]);\n\t\t\tfor( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\tline = br.readLine();\n\t\t\tcount = 0;\n\t\t}", "!(line.equals(\"0 0\"))", "(line.equals(\"0 0\"))", "line.equals", "line", "\"0 0\"", "{\n\t\t\tString nums[] = line.split(\" \");\n\t\t\tint max = Integer.parseInt(nums[0]);\n\t\t\tint sum = Integer.parseInt(nums[1]);\n\t\t\tfor( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\tline = br.readLine();\n\t\t\tcount = 0;\n\t\t}", "String nums[] = line.split(\" \");", "nums", "line.split(\" \")", "line.split", "line", "\" \"", "int max = Integer.parseInt(nums[0]);", "max", "Integer.parseInt(nums[0])", "Integer.parseInt", "Integer", "nums[0]", "nums", "0", "int sum = Integer.parseInt(nums[1]);", "sum", "Integer.parseInt(nums[1])", "Integer.parseInt", "Integer", "nums[1]", "nums", "1", "for( int i = 1 ; i <= max ; i++ ) {\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= max", "i", "max", "i++", "i++", "i", "{\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}", "{\t\t//??????????????°???\n\t\t\t\tfor( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}\n\t\t\t}", "for( int j = i+1 ; j <= max ; j++ ) {\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}", "int j = i+1 ;", "int j = i+1 ;", "j", "i+1", "i", "1", "j <= max", "j", "max", "j++", "j++", "j", "{\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}", "{\t//??????????????°???\n\t\t\t\t\tint k = sum - i - j ;\n\t\t\t\t\tif ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}\n\t\t\t\t\tif ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n//\t\t\t\t\tSystem.out.println( i + \" \" + j + \" \" + k ) ;\n\t\t\t\t}", "int k = sum - i - j ;", "k", "sum - i - j", "sum - i - j", "sum", "i", "j", "if ( k <= j ) {\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}", "k <= j", "k", "j", "{\t//??????????????°??????j????????§??????????????????\n\t\t\t\t\t\tbreak;\t//\t??\\??????j?????¨??¨??????\n\t\t\t\t\t}", "break;\t//\t??\\??????j?????¨??¨??????", "if ( k > max ) {\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}", "k > max", "k", "max", "{\t//??????????????°??????max????????§??????????????????\n\t\t\t\t\t\tcontinue; //??\\??????j???????????§?????????\n\t\t\t\t\t}", "continue; //??\\??????j???????????§?????????", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "line = br.readLine()", "line", "br.readLine()", "br.readLine", "br", "count = 0", "count", "0", "String[] args", "args" ]
import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { int count = 0; //?§£????????° BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); while( !(line.equals("0 0")) ) { String nums[] = line.split(" "); int max = Integer.parseInt(nums[0]); int sum = Integer.parseInt(nums[1]); for( int i = 1 ; i <= max ; i++ ) { //??????????????°??? for( int j = i+1 ; j <= max ; j++ ) { //??????????????°??? int k = sum - i - j ; if ( k <= j ) { //??????????????°??????j????????§?????????????????? break; // ??\??????j?????¨??¨?????? } if ( k > max ) { //??????????????°??????max????????§?????????????????? continue; //??\??????j???????????§????????? } count++; // System.out.println( i + " " + j + " " + k ) ; } } System.out.println(count); line = br.readLine(); count = 0; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 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 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 17, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 17, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 17, 51 ], [ 51, 52 ], [ 51, 53 ], [ 17, 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 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 69, 81 ], [ 81, 82 ], [ 82, 83 ], [ 69, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 86, 93 ], [ 93, 94 ], [ 93, 95 ], [ 86, 96 ], [ 96, 97 ], [ 97, 98 ], [ 86, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 102, 108 ], [ 101, 109 ], [ 109, 110 ], [ 17, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 6, 117 ], [ 117, 118 ] ]
[ "import java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\t\t\tfinal String[] data = sc.nextLine().split(\" \");\n\t\t\tfinal int n = Integer.parseInt(data[0]);\n\t\t\tfinal int x = Integer.parseInt(data[1]);\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "import java.util.*;", "util.*", "java", "class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\t\t\tfinal String[] data = sc.nextLine().split(\" \");\n\t\t\tfinal int n = Integer.parseInt(data[0]);\n\t\t\tfinal int x = Integer.parseInt(data[1]);\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\t\t\tfinal String[] data = sc.nextLine().split(\" \");\n\t\t\tfinal int n = Integer.parseInt(data[0]);\n\t\t\tfinal int x = Integer.parseInt(data[1]);\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\twhile(true){\n\t\t\tfinal String[] data = sc.nextLine().split(\" \");\n\t\t\tfinal int n = Integer.parseInt(data[0]);\n\t\t\tfinal int x = Integer.parseInt(data[1]);\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "while(true){\n\t\t\tfinal String[] data = sc.nextLine().split(\" \");\n\t\t\tfinal int n = Integer.parseInt(data[0]);\n\t\t\tfinal int x = Integer.parseInt(data[1]);\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tfinal String[] data = sc.nextLine().split(\" \");\n\t\t\tfinal int n = Integer.parseInt(data[0]);\n\t\t\tfinal int x = Integer.parseInt(data[1]);\n\t\t\tif(n == 0 && x == 0) break;\n\t\t\tint count = 0;\n\t\t\tfor(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "final String[] data = sc.nextLine().split(\" \");", "data", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "final int n = Integer.parseInt(data[0]);", "n", "Integer.parseInt(data[0])", "Integer.parseInt", "Integer", "data[0]", "data", "0", "final int x = Integer.parseInt(data[1]);", "x", "Integer.parseInt(data[1])", "Integer.parseInt", "Integer", "data[1]", "data", "1", "if(n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for(int i = 1; i <= n - 2; i++){\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n - 2", "i", "n - 2", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = i + 1; j <= n - 1; j++){\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n - 1", "j", "n - 1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = j + 1; k <= n; k++){\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif((i + j + k) == x) count++;\n\t\t\t\t\t}", "if((i + j + k) == x) count++;", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args" ]
import java.util.*; class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); StringBuilder sb = new StringBuilder(); while(true){ final String[] data = sc.nextLine().split(" "); final int n = Integer.parseInt(data[0]); final int x = Integer.parseInt(data[1]); if(n == 0 && x == 0) break; int count = 0; for(int i = 1; i <= n - 2; i++){ for(int j = i + 1; j <= n - 1; j++){ for(int k = j + 1; k <= n; k++){ if((i + j + k) == x) count++; } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 0, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 14, 13, 30, 40, 13, 0, 13, 17, 4, 18, 18, 13, 13, 2, 13, 17, 0, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 8, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 24, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 24, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 24, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 86, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 84, 90 ], [ 83, 91 ], [ 91, 92 ], [ 91, 93 ], [ 82, 94 ], [ 94, 95 ], [ 96, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 100, 101 ], [ 100, 102 ], [ 96, 103 ], [ 103, 104 ], [ 103, 105 ], [ 94, 106 ], [ 106, 107 ], [ 106, 108 ], [ 82, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 82, 114 ], [ 114, 115 ], [ 114, 116 ], [ 24, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 122, 123 ], [ 122, 124 ], [ 24, 125 ], [ 125, 126 ], [ 125, 127 ], [ 6, 128 ], [ 128, 129 ], [ 0, 130 ], [ 130, 131 ], [ 130, 132 ] ]
[ "import java.util.*;\n \npublic class Main {\n \n public static void main(String[] args) {\n int n, x, count = 0;\n boolean flag = false;\n Scanner sc = new Scanner(System.in);\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n \n public static void main(String[] args) {\n int n, x, count = 0;\n boolean flag = false;\n Scanner sc = new Scanner(System.in);\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }\n }\n}", "Main", "public static void main(String[] args) {\n int n, x, count = 0;\n boolean flag = false;\n Scanner sc = new Scanner(System.in);\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }\n }", "main", "{\n int n, x, count = 0;\n boolean flag = false;\n Scanner sc = new Scanner(System.in);\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }\n }", "int n", "n", "x", "x", "count = 0;", "count", "0", "boolean flag = false;", "flag", "false", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }", "true", "{\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "if (n == 0 && x == 0)\n break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }", "{\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }", "for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }", "{\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }", "for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }", "{\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }", "if (i + j + k == x)\n flag = true;", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "flag = true", "flag", "true", "if (i == j || j == k || k == i)\n flag = false;", "i == j || j == k || k == i", "i == j || j == k || k == i", "i == j", "i", "j", "j == k", "j", "k", "k == i", "k", "i", "flag = false", "flag", "false", "if (flag) {\n count++;\n }", "flag", "{\n count++;\n }", "count++", "count", "flag = false", "flag", "false", "System.out.println(count / 6)", "System.out.println", "System.out", "System", "System.out", "count / 6", "count", "6", "count = 0", "count", "0", "String[] args", "args", "public class Main {\n \n public static void main(String[] args) {\n int n, x, count = 0;\n boolean flag = false;\n Scanner sc = new Scanner(System.in);\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }\n }\n}", "public class Main {\n \n public static void main(String[] args) {\n int n, x, count = 0;\n boolean flag = false;\n Scanner sc = new Scanner(System.in);\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if (n == 0 && x == 0)\n break;\n for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i + j + k == x)\n flag = true;\n if (i == j || j == k || k == i)\n flag = false;\n if (flag) {\n count++;\n }\n flag = false;\n }\n }\n }\n System.out.println(count / 6);\n count = 0;\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { int n, x, count = 0; boolean flag = false; Scanner sc = new Scanner(System.in); while (true) { n = sc.nextInt(); x = sc.nextInt(); if (n == 0 && x == 0) break; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { if (i + j + k == x) flag = true; if (i == j || j == k || k == i) flag = false; if (flag) { count++; } flag = false; } } } System.out.println(count / 6); count = 0; } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 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 ], [ 129, 8 ], [ 129, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 15, 20 ], [ 20, 21 ], [ 20, 22 ], [ 15, 23 ], [ 23, 24 ], [ 24, 25 ], [ 15, 26 ], [ 27, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 27, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 27, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 41, 44 ], [ 44, 45 ], [ 44, 46 ], [ 27, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 52, 54 ], [ 27, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 27, 64 ], [ 64, 65 ], [ 64, 66 ], [ 27, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 87, 88 ], [ 87, 89 ], [ 80, 90 ], [ 90, 91 ], [ 91, 92 ], [ 80, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 95, 102 ], [ 102, 103 ], [ 102, 104 ], [ 95, 105 ], [ 105, 106 ], [ 106, 107 ], [ 95, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 113, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 111, 117 ], [ 110, 118 ], [ 118, 119 ], [ 27, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 9, 126 ], [ 126, 127 ], [ 0, 128 ], [ 128, 129 ], [ 128, 130 ] ]
[ "import java.util.Scanner;\nimport javax.sound.midi.SysexMessage;\n \npublic class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }\n } \n} \n\n ", "import java.util.Scanner;", "Scanner", "java.util", "import javax.sound.midi.SysexMessage;", "SysexMessage", "javax.sound.midi", "public class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }\n } \n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }", "int l = 0;", "int l = 0;", "l", "0", "l<100", "l", "100", "l++", "l++", "l", "{\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }", "{\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }", "String str = sc.nextLine();", "str", "sc.nextLine()", "sc.nextLine", "sc", "String str2[] = str.split(\" \");", "str2", "str.split(\" \")", "str.split", "str", "\" \"", "int n = Integer.parseInt(str2[0]);", "n", "Integer.parseInt(str2[0])", "Integer.parseInt", "Integer", "str2[0]", "str2", "0", "int x = Integer.parseInt(str2[1]);", "x", "Integer.parseInt(str2[1])", "Integer.parseInt", "Integer", "str2[1]", "str2", "1", "if(n==0&&x==0)\n break;", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "int count = 0;", "count", "0", "for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }", "{\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }", "for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }", "{\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }", "for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n if(i+j+k==x)\n count++;\n }", "{\n if(i+j+k==x)\n count++;\n }", "if(i+j+k==x)\n count++;", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }\n } \n}", "public class Main{ \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n for(int l = 0;l<100;l++){\n String str = sc.nextLine();\n String str2[] = str.split(\" \");\n int n = Integer.parseInt(str2[0]);\n int x = Integer.parseInt(str2[1]);\n if(n==0&&x==0)\n break;\n int count = 0;\n for(int i=1;i<=n;i++)\n {\n for(int j=i+1;j<=n;j++)\n {\n for(int k=j+1;k<=n;k++)\n {\n if(i+j+k==x)\n count++;\n }\n }\n }\n System.out.println(count);\n }\n } \n}", "Main" ]
import java.util.Scanner; import javax.sound.midi.SysexMessage; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); for(int l = 0;l<100;l++){ String str = sc.nextLine(); String str2[] = str.split(" "); int n = Integer.parseInt(str2[0]); int x = Integer.parseInt(str2[1]); if(n==0&&x==0) break; int count = 0; for(int i=1;i<=n;i++) { for(int j=i+1;j<=n;j++) { for(int k=j+1;k<=n;k++) { if(i+j+k==x) count++; } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 30, 41, 13, 20, 41, 13, 41, 13, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 0, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 13, 19 ], [ 19, 20 ], [ 13, 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 ], [ 31, 34 ], [ 23, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 40, 42 ], [ 23, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 48, 50 ], [ 23, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 56, 58 ], [ 51, 59 ], [ 23, 60 ], [ 60, 61 ], [ 60, 62 ], [ 23, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 63, 73 ], [ 73, 74 ], [ 74, 75 ], [ 63, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 78, 90 ], [ 90, 91 ], [ 91, 92 ], [ 78, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 95, 102 ], [ 102, 103 ], [ 102, 104 ], [ 95, 105 ], [ 105, 106 ], [ 106, 107 ], [ 95, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 113, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 111, 117 ], [ 110, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 23, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 6, 128 ], [ 128, 129 ] ]
[ "import java.io.*;\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in));\n\t\t\tint n, x;\n\t\t\twhile(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}catch (Exception e){\n\t\t}\n\t}\n}\n\t\t\t\t", "import java.io.*;", "io.*", "java", "class Main {\n\tpublic static void main(String[] args){\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in));\n\t\t\tint n, x;\n\t\t\twhile(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}catch (Exception e){\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args){\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in));\n\t\t\tint n, x;\n\t\t\twhile(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}catch (Exception e){\n\t\t}\n\t}", "main", "{\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in));\n\t\t\tint n, x;\n\t\t\twhile(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}catch (Exception e){\n\t\t}\n\t}", "try{\n\t\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in));\n\t\t\tint n, x;\n\t\t\twhile(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}catch (Exception e){\n\t\t}", "catch (Exception e){\n\t\t}", "Exception e", "{\n\t\t}", "{\n\t\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in));\n\t\t\tint n, x;\n\t\t\twhile(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}", "BufferedReader br = new BufferedReader( new InputStreamReader(System.in));", "br", "new BufferedReader( new InputStreamReader(System.in))", "int n", "n", "x;", "x", "while(true){\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}", "true", "{\n\t\t\t\tString buf = br.readLine();\n\t\t\t\tString[] line = buf.split(\" \");\n\t\t\t\tn = Integer.parseInt(line[0]);\n\t\t\t\tx = Integer.parseInt(line[1]);\n\t\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\n\t\t\tint count = 0;\n\t\t\tfor(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t\t}", "String buf = br.readLine();", "buf", "br.readLine()", "br.readLine", "br", "String[] line = buf.split(\" \");", "line", "buf.split(\" \")", "buf.split", "buf", "\" \"", "n = Integer.parseInt(line[0])", "n", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "x = Integer.parseInt(line[1])", "x", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "if(n == 0 && x == 0)break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for(int i= 1;i <= n-2;i++){\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i= 1;", "int i= 1;", "i", "1", "i <= n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = i+1; j <=n-1;j++){\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <=n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = j+1; k <=n;k++){\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i + j + k == x){\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcount += 1;\n\t\t\t\t\t\t}", "count += 1", "count", "1", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args" ]
import java.io.*; class Main { public static void main(String[] args){ try{ BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); int n, x; while(true){ String buf = br.readLine(); String[] line = buf.split(" "); n = Integer.parseInt(line[0]); x = Integer.parseInt(line[1]); if(n == 0 && x == 0)break; int count = 0; for(int i= 1;i <= n-2;i++){ for(int j = i+1; j <=n-1;j++){ for(int k = j+1; k <=n;k++){ if(i + j + k == x){ count += 1; } } } } System.out.println(count); } }catch (Exception e){ } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 30, 40, 13, 4, 18, 18, 13, 13, 2, 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 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 31, 32 ], [ 31, 33 ], [ 20, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 20, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 44, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 57, 62 ], [ 62, 63 ], [ 62, 64 ], [ 57, 65 ], [ 65, 66 ], [ 66, 67 ], [ 57, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 86, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 84, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 98, 100 ], [ 94, 101 ], [ 101, 102 ], [ 101, 103 ], [ 92, 104 ], [ 92, 105 ], [ 105, 106 ], [ 106, 107 ], [ 20, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 113, 114 ], [ 113, 115 ], [ 6, 116 ], [ 116, 117 ] ]
[ "import java.util.Scanner;\nclass Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int n;\n int x;\n int count; \n while(true){\n n=sc.nextInt();\n x=sc.nextInt();\n count=0;\n if(n==0 && x==0){\n break;\n }\n for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }\n System.out.println(count/6);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int n;\n int x;\n int count; \n while(true){\n n=sc.nextInt();\n x=sc.nextInt();\n count=0;\n if(n==0 && x==0){\n break;\n }\n for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }\n System.out.println(count/6);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n int n;\n int x;\n int count; \n while(true){\n n=sc.nextInt();\n x=sc.nextInt();\n count=0;\n if(n==0 && x==0){\n break;\n }\n for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }\n System.out.println(count/6);\n }\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int n;\n int x;\n int count; \n while(true){\n n=sc.nextInt();\n x=sc.nextInt();\n count=0;\n if(n==0 && x==0){\n break;\n }\n for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }\n System.out.println(count/6);\n }\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n;", "n", "int x;", "x", "int count;", "count", "while(true){\n n=sc.nextInt();\n x=sc.nextInt();\n count=0;\n if(n==0 && x==0){\n break;\n }\n for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }\n System.out.println(count/6);\n }", "true", "{\n n=sc.nextInt();\n x=sc.nextInt();\n count=0;\n if(n==0 && x==0){\n break;\n }\n for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }\n System.out.println(count/6);\n }", "n=sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x=sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "count=0", "count", "0", "if(n==0 && x==0){\n break;\n }", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n break;\n }", "break;", "for(int i=1;i<=n;i++){\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }", "{\n for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }\n }", "for(int j=1;j<=n;j++){\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }", "{\n for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }\n }", "for(int k=1;k<=n;k++){\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }", "{\n if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }\n }", "if(i+j+k==x){\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "{\n if(i==j || i==k || j==k){\n }\n else{\n count++; \n } \n \n }", "if(i==j || i==k || j==k){\n }\n else{\n count++; \n }", "i==j || i==k || j==k", "i==j || i==k || j==k", "i==j", "i", "j", "i==k", "i", "k", "j==k", "j", "k", "{\n }", "{\n count++; \n }", "count++", "count", "System.out.println(count/6)", "System.out.println", "System.out", "System", "System.out", "count/6", "count", "6", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n; int x; int count; while(true){ n=sc.nextInt(); x=sc.nextInt(); count=0; if(n==0 && x==0){ break; } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ for(int k=1;k<=n;k++){ if(i+j+k==x){ if(i==j || i==k || j==k){ } else{ count++; } } } } } System.out.println(count/6); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 37, 47 ], [ 47, 48 ], [ 48, 49 ], [ 37, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 52, 64 ], [ 64, 65 ], [ 65, 66 ], [ 52, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 76, 77 ], [ 76, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 69, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 87, 87 ], [ 87, 88 ], [ 87, 89 ], [ 87, 90 ], [ 85, 91 ], [ 84, 92 ], [ 92, 93 ], [ 14, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }", "true", "{\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int x = scanner.nextInt();", "x", "scanner.nextInt()", "scanner.nextInt", "scanner", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }", "{\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }", "for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <= n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }", "{\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }", "for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n if (i + j + k == x) count++;\n }", "{\n if (i + j + k == x) count++;\n }", "if (i + j + k == x) count++;", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n while (true) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n for (int i = 1; i <= n-2; i++) {\n for (int j = i+1; j <= n-1; j++) {\n for (int k = j+1; k <= n; k++) {\n if (i + j + k == x) count++;\n }\n }\n }\n System.out.println(count);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (true) { int n = scanner.nextInt(); int x = scanner.nextInt(); if (n == 0 && x == 0) break; int count = 0; for (int i = 1; i <= n-2; i++) { for (int j = i+1; j <= n-1; j++) { for (int k = j+1; k <= n; k++) { if (i + j + k == x) count++; } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 2, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 2, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 125, 5 ], [ 125, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 19, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 19, 30 ], [ 30, 31 ], [ 30, 32 ], [ 19, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 19, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 56, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 64, 65 ], [ 65, 66 ], [ 56, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 74, 75 ], [ 74, 76 ], [ 69, 77 ], [ 77, 78 ], [ 78, 79 ], [ 69, 80 ], [ 81, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 85, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 81, 89 ], [ 89, 90 ], [ 94, 91 ], [ 107, 92 ], [ 104, 93 ], [ 101, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 98, 100 ], [ 101, 101 ], [ 101, 102 ], [ 101, 103 ], [ 104, 104 ], [ 104, 105 ], [ 104, 106 ], [ 107, 107 ], [ 107, 108 ], [ 107, 109 ], [ 94, 110 ], [ 110, 111 ], [ 110, 112 ], [ 89, 113 ], [ 113, 114 ], [ 114, 115 ], [ 19, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 6, 122 ], [ 122, 123 ], [ 0, 124 ], [ 124, 125 ], [ 124, 126 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int jouken = 0;\n\n while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int jouken = 0;\n\n while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int jouken = 0;\n\n while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int jouken = 0;\n\n while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int jouken = 0;", "jouken", "0", "while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }", "jouken == 0", "jouken", "0", "{\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int x = scanner.nextInt();", "x", "scanner.nextInt()", "scanner.nextInt", "scanner", "int kazu = 0;", "kazu", "0", "if (n == 0 && x == 0) {\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "n >= i", "n", "i", "i++", "i++", "i", "{\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }", "{\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }", "for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "n >= j", "n", "j", "j++", "j++", "j", "{\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }", "{\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }", "for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }", "int k = 1;", "int k = 1;", "k", "1", "n >= k", "n", "k", "k++", "k++", "k", "{\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }", "{\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }", "int goukei = i + j + k;", "goukei", "i + j + k", "i + j + k", "i", "j", "k", "if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }", "i != k && k != j && j != i && goukei == x&&i>j&&j>k", "i>j", "goukei == x", "j != i", "i != k && k != j && j != i && goukei == x&&i>j&&j>k", "i != k", "i", "k", "k != j", "k", "j", "j != i", "j", "i", "goukei == x", "goukei", "x", "i>j", "i", "j", "j>k", "j", "k", "{\n kazu++;\n }", "kazu++", "kazu", "System.out.println(kazu)", "System.out.println", "System.out", "System", "System.out", "kazu", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int jouken = 0;\n\n while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int jouken = 0;\n\n while (jouken == 0) {\n int n = scanner.nextInt();\n int x = scanner.nextInt();\n int kazu = 0;\n if (n == 0 && x == 0) {\n break;\n }\n for (int i = 1; n >= i; i++) {\n for (int j = 1; n >= j; j++) {\n for (int k = 1; n >= k; k++) {\n int goukei = i + j + k;\n if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) {\n kazu++;\n }\n }\n }\n }\n System.out.println(kazu);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int jouken = 0; while (jouken == 0) { int n = scanner.nextInt(); int x = scanner.nextInt(); int kazu = 0; if (n == 0 && x == 0) { break; } for (int i = 1; n >= i; i++) { for (int j = 1; n >= j; j++) { for (int k = 1; n >= k; k++) { int goukei = i + j + k; if (i != k && k != j && j != i && goukei == x&&i>j&&j>k) { kazu++; } } } } System.out.println(kazu); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 20, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 0, 13, 8, 2, 13, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 3, 4, 18, 18, 13, 13, 13, 0, 13, 17, 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 ], [ 8, 13 ], [ 13, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 8, 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 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 23, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 46, 51 ], [ 23, 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 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 67, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 67, 79 ], [ 79, 80 ], [ 80, 81 ], [ 67, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 84, 91 ], [ 91, 92 ], [ 91, 93 ], [ 84, 94 ], [ 94, 95 ], [ 95, 96 ], [ 84, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 102, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 100, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 107, 110 ], [ 23, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 23, 117 ], [ 117, 118 ], [ 117, 119 ], [ 6, 120 ], [ 120, 121 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n \tint n,x,max;\n \tint count = 0;\n \tScanner sc = new Scanner(System.in);\n \twhile(true){\n \t\tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif(n ==0 && x ==0){\n \t\tbreak;\n \t}\n \tmax = n >= x ? x:n;\n\n \tfor(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n System.out.println(count);\n count = 0;\n \t}\n\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n \tint n,x,max;\n \tint count = 0;\n \tScanner sc = new Scanner(System.in);\n \twhile(true){\n \t\tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif(n ==0 && x ==0){\n \t\tbreak;\n \t}\n \tmax = n >= x ? x:n;\n\n \tfor(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n System.out.println(count);\n count = 0;\n \t}\n\n }\n}", "Main", "public static void main(String[] args){\n \tint n,x,max;\n \tint count = 0;\n \tScanner sc = new Scanner(System.in);\n \twhile(true){\n \t\tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif(n ==0 && x ==0){\n \t\tbreak;\n \t}\n \tmax = n >= x ? x:n;\n\n \tfor(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n System.out.println(count);\n count = 0;\n \t}\n\n }", "main", "{\n \tint n,x,max;\n \tint count = 0;\n \tScanner sc = new Scanner(System.in);\n \twhile(true){\n \t\tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif(n ==0 && x ==0){\n \t\tbreak;\n \t}\n \tmax = n >= x ? x:n;\n\n \tfor(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n System.out.println(count);\n count = 0;\n \t}\n\n }", "int n", "n", "x", "x", "max;", "max", "int count = 0;", "count", "0", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(true){\n \t\tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif(n ==0 && x ==0){\n \t\tbreak;\n \t}\n \tmax = n >= x ? x:n;\n\n \tfor(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n System.out.println(count);\n count = 0;\n \t}", "true", "{\n \t\tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif(n ==0 && x ==0){\n \t\tbreak;\n \t}\n \tmax = n >= x ? x:n;\n\n \tfor(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n System.out.println(count);\n count = 0;\n \t}", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n ==0 && x ==0){\n \t\tbreak;\n \t}", "n ==0 && x ==0", "n ==0", "n", "0", "x ==0", "x", "0", "{\n \t\tbreak;\n \t}", "break;", "max = n >= x ? x:n", "max", "n >= x ? x:n", "n >= x", "n", "x", "x", "n", "for(int i = 1; i <= max-2 ;i++){\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "int i = 1;", "int i = 1;", "i", "1", "i <= max-2", "i", "max-2", "max", "2", "i++", "i++", "i", "{\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "{\n \t\tfor(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "for(int j = i+1; j <= max-1 ;j++){\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <= max-1", "j", "max-1", "max", "1", "j++", "j++", "j", "{\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}", "{\n \t\t\tfor(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}", "for(int k = j+1; k <= max ;k++){\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= max", "k", "max", "k++", "k++", "k", "{\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}", "{\n \t\t\t\tif(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}", "if(i+j+k == x){\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}", "i+j+k == x", "i+j+k", "i+j+k", "i", "j", "k", "x", "{\n \t\t\t\t\tcount++;\n \t\t\t\t\tbreak;\n \t\t\t\t}", "count++", "count", "break;", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "count = 0", "count", "0", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ int n,x,max; int count = 0; Scanner sc = new Scanner(System.in); while(true){ n = sc.nextInt(); x = sc.nextInt(); if(n ==0 && x ==0){ break; } max = n >= x ? x:n; for(int i = 1; i <= max-2 ;i++){ for(int j = i+1; j <= max-1 ;j++){ for(int k = j+1; k <= max ;k++){ if(i+j+k == x){ count++; break; } } } } System.out.println(count); count = 0; } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 14, 4, 18, 13, 17, 30, 3, 28, 13, 13, 30, 30, 14, 4, 18, 13, 17, 30, 3, 41, 13, 4, 18, 13, 17, 41, 13, 20, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 18, 13, 17, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 18, 13, 17, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 18, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 13, 18, 13, 17, 30, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 163, 11 ], [ 163, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 23, 29 ], [ 29, 30 ], [ 30, 31 ], [ 29, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 33, 38 ], [ 38, 39 ], [ 14, 40 ], [ 40, 41 ], [ 40, 42 ], [ 40, 43 ], [ 44, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 45, 50 ], [ 50, 51 ], [ 44, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 44, 58 ], [ 58, 59 ], [ 58, 60 ], [ 44, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 69, 71 ], [ 44, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 44, 82 ], [ 82, 83 ], [ 82, 84 ], [ 44, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 85, 97 ], [ 97, 98 ], [ 98, 99 ], [ 85, 100 ], [ 101, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 102, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 102, 116 ], [ 116, 117 ], [ 117, 118 ], [ 102, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 121, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 130, 132 ], [ 121, 133 ], [ 133, 134 ], [ 134, 135 ], [ 121, 136 ], [ 137, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 141, 141 ], [ 141, 142 ], [ 141, 143 ], [ 141, 144 ], [ 137, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 148, 150 ], [ 145, 151 ], [ 151, 152 ], [ 152, 153 ], [ 44, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 154, 159 ], [ 12, 160 ], [ 160, 161 ], [ 0, 162 ], [ 162, 163 ], [ 162, 164 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] arges) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> klist = new ArrayList<String>();\n\n\t\twhile (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tfor (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}\n\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] arges) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> klist = new ArrayList<String>();\n\n\t\twhile (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tfor (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}\n\n\t}\n}", "Main", "public static void main(String[] arges) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> klist = new ArrayList<String>();\n\n\t\twhile (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tfor (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}\n\n\t}", "main", "{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> klist = new ArrayList<String>();\n\n\t\twhile (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tfor (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "List<String> klist = new ArrayList<String>();", "klist", "new ArrayList<String>()", "while (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "true", "{\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "String line = sc.nextLine();", "line", "sc.nextLine()", "sc.nextLine", "sc", "klist.add(line)", "klist.add", "klist", "line", "if (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}", "line.equals(\"0 0\")", "line.equals", "line", "\"0 0\"", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}", "String string", "klist", "{\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}", "{\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}", "if (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}", "string.equals(\"0 0\")", "string.equals", "string", "\"0 0\"", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "String[] k = string.split(\" \");", "k", "string.split(\" \")", "string.split", "string", "\" \"", "int[] v = new int[2];", "v", "new int[2]", "2", "v[0] = Integer.parseInt(k[0])", "v[0]", "v", "0", "Integer.parseInt(k[0])", "Integer.parseInt", "Integer", "k[0]", "k", "0", "v[1] = Integer.parseInt(k[1])", "v[1]", "v", "1", "Integer.parseInt(k[1])", "Integer.parseInt", "Integer", "k[1]", "k", "1", "int count = 0;", "count", "0", "for (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= v[0] - 2", "i", "v[0] - 2", "v[0]", "v", "0", "2", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= v[0] - 1", "j", "v[0] - 1", "v[0]", "v", "0", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}", "for (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "int j2 = j + 1;", "int j2 = j + 1;", "j2", "j + 1", "j", "1", "j2 <= v[0]", "j2", "v[0]", "v", "0", "j2++", "j2++", "j2", "{\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}", "int sum = i + j + j2;", "sum", "i + j + j2", "i + j + j2", "i", "j", "j2", "if (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "sum == v[1]", "sum", "v[1]", "v", "1", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] arges", "arges", "public class Main {\n\tpublic static void main(String[] arges) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> klist = new ArrayList<String>();\n\n\t\twhile (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tfor (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}\n\n\t}\n}", "public class Main {\n\tpublic static void main(String[] arges) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tList<String> klist = new ArrayList<String>();\n\n\t\twhile (true) {\n\t\t\tString line = sc.nextLine();\n\t\t\tklist.add(line);\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tfor (String string : klist) {\n\t\t\tif (string.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] k = string.split(\" \");\n\t\t\tint[] v = new int[2];\n\t\t\tv[0] = Integer.parseInt(k[0]);\n\t\t\tv[1] = Integer.parseInt(k[1]);\n\n\t\t\tint count = 0;\n\t\t\tfor (int i = 1; i <= v[0] - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= v[0] - 1; j++) {\n\t\t\t\t\tfor (int j2 = j + 1; j2 <= v[0]; j2++) {\n\t\t\t\t\t\tint sum = i + j + j2;\n\t\t\t\t\t\tif (sum == v[1]) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\n\t\t}\n\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] arges) { Scanner sc = new Scanner(System.in); List<String> klist = new ArrayList<String>(); while (true) { String line = sc.nextLine(); klist.add(line); if (line.equals("0 0")) { break; } } for (String string : klist) { if (string.equals("0 0")) { break; } String[] k = string.split(" "); int[] v = new int[2]; v[0] = Integer.parseInt(k[0]); v[1] = Integer.parseInt(k[1]); int count = 0; for (int i = 1; i <= v[0] - 2; i++) { for (int j = i + 1; j <= v[0] - 1; j++) { for (int j2 = j + 1; j2 <= v[0]; j2++) { int sum = i + j + j2; if (sum == v[1]) { count++; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 2, 13, 13, 2, 2, 2, 13, 2, 17, 13, 17, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 2, 2, 13, 13, 13, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 102, 5 ], [ 102, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 50, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 63, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 61, 69 ], [ 50, 70 ], [ 70, 71 ], [ 71, 72 ], [ 50, 73 ], [ 74, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 80, 80 ], [ 80, 81 ], [ 80, 82 ], [ 80, 83 ], [ 76, 84 ], [ 84, 85 ], [ 86, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 84, 90 ], [ 75, 91 ], [ 91, 92 ], [ 14, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 6, 99 ], [ 99, 100 ], [ 0, 101 ], [ 101, 102 ], [ 101, 103 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }\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 while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }", "true", "{\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0&&x==0)break;", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "int answer = 0;", "answer", "0", "for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }", "{\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }", "for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n && i + 2 * j + 1 <= x", "j <= n", "j", "n", "i + 2 * j + 1 <= x", "i + 2 * j + 1", "i + 2 * j + 1", "i", "2 * j", "2", "j", "1", "x", "j++", "j++", "j", "{\n if (j <= x - i - j && x - i - j <= n) answer++;\n }", "{\n if (j <= x - i - j && x - i - j <= n) answer++;\n }", "if (j <= x - i - j && x - i - j <= n) answer++;", "j <= x - i - j && x - i - j <= n", "j <= x - i - j", "j", "x - i - j", "x - i - j", "x", "i", "j", "x - i - j <= n", "x - i - j", "x - i - j", "x", "i", "j", "n", "answer++", "answer", "System.out.println(answer)", "System.out.println", "System.out", "System", "System.out", "answer", "String[] args", "args", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(true) {\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n==0&&x==0)break;\n int answer = 0;\n for (int i = 1; i <= n; i++) {\n for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) {\n if (j <= x - i - j && x - i - j <= n) answer++;\n }\n }\n System.out.println(answer);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(true) { int n = sc.nextInt(); int x = sc.nextInt(); if(n==0&&x==0)break; int answer = 0; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n && i + 2 * j + 1 <= x; j++) { if (j <= x - i - j && x - i - j <= n) answer++; } } System.out.println(answer); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 106, 5 ], [ 106, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 20, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 31, 32 ], [ 31, 33 ], [ 20, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 20, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 56, 63 ], [ 63, 64 ], [ 63, 65 ], [ 56, 66 ], [ 66, 67 ], [ 67, 68 ], [ 56, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 71, 78 ], [ 78, 79 ], [ 78, 80 ], [ 71, 81 ], [ 81, 82 ], [ 82, 83 ], [ 71, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 89, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 87, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 20, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 6, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String [] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i, j, m;\n\t\t\n\t\twhile(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\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 i, j, m;\n\t\t\n\t\twhile(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main", "public static void main(String [] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i, j, m;\n\t\t\n\t\twhile(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i, j, m;\n\t\t\n\t\twhile(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int i", "i", "j", "j", "m;", "m", "while(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t}", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "int count=0;", "count", "0", "if(n==0 && x==0) break;", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "for(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "i=1;", "i=1", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "j=i+1;", "j=i+1", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "m=j+1;", "m=j+1", "m", "j+1", "j", "1", "m<=n", "m", "n", "m++", "m++", "m", "{\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "i + j + m == x", "i + j + m", "i + j + m", "i", "j", "m", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String [] args", "args", "public class Main {\n\tpublic static void main(String [] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i, j, m;\n\t\t\n\t\twhile(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\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 i, j, m;\n\t\t\n\t\twhile(true){\n\t\t\tint n = scan.nextInt();\n\t\t\tint x = scan.nextInt();\n\t\t\tint count=0;\n\t\t\t\n\t\t\tif(n==0 && x==0) break;\n\t\t\t\n\t\t\tfor(i=1; i<=n; i++){\n\t\t\t\tfor(j=i+1; j<=n; j++){\n\t\t\t\t\tfor(m=j+1; m<=n; m++){\n\t\t\t\t\t\tif(i + j + m == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\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 i, j, m; while(true){ int n = scan.nextInt(); int x = scan.nextInt(); int count=0; if(n==0 && x==0) break; for(i=1; i<=n; i++){ for(j=i+1; j<=n; j++){ for(m=j+1; m<=n; m++){ if(i + j + m == x){ count++; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 3, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 2, 2, 13, 13, 13, 13, 30, 41, 13, 39, 13, 13, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 13, 14, 2, 4, 18, 13, 13, 40, 17, 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 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 23, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 17, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 40, 41 ], [ 40, 42 ], [ 17, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 45, 48 ], [ 48, 49 ], [ 48, 50 ], [ 17, 51 ], [ 51, 52 ], [ 51, 53 ], [ 17, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 54, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 66, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 80, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 96, 95 ], [ 103, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 96, 100 ], [ 100, 101 ], [ 100, 102 ], [ 103, 103 ], [ 103, 104 ], [ 103, 105 ], [ 96, 106 ], [ 106, 107 ], [ 108, 108 ], [ 108, 109 ], [ 108, 110 ], [ 108, 111 ], [ 106, 112 ], [ 93, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 116, 119 ], [ 113, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 113, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 126, 129 ], [ 113, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 132, 135 ], [ 131, 136 ], [ 136, 137 ], [ 130, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 17, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 142, 147 ], [ 147, 148 ], [ 148, 149 ], [ 9, 150 ], [ 150, 151 ] ]
[ "import java.io.*;\nimport java.util.*;\n\nclass Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n while(true){\n \tString in=br.readLine();\n\t\t\tif(in.equals(\"0 0\")) break;\n String[] a=in.split(\" \");\n int n=Integer.parseInt(a[0]);\n int x=Integer.parseInt(a[1]);\n List<String> l=new ArrayList<String>(); \n \tfor(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}\n \tSystem.out.println(l.size());\n }\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n while(true){\n \tString in=br.readLine();\n\t\t\tif(in.equals(\"0 0\")) break;\n String[] a=in.split(\" \");\n int n=Integer.parseInt(a[0]);\n int x=Integer.parseInt(a[1]);\n List<String> l=new ArrayList<String>(); \n \tfor(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}\n \tSystem.out.println(l.size());\n }\n\t}\n}", "Main", "public static void main(String[] args) throws Exception {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n while(true){\n \tString in=br.readLine();\n\t\t\tif(in.equals(\"0 0\")) break;\n String[] a=in.split(\" \");\n int n=Integer.parseInt(a[0]);\n int x=Integer.parseInt(a[1]);\n List<String> l=new ArrayList<String>(); \n \tfor(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}\n \tSystem.out.println(l.size());\n }\n\t}", "main", "{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n while(true){\n \tString in=br.readLine();\n\t\t\tif(in.equals(\"0 0\")) break;\n String[] a=in.split(\" \");\n int n=Integer.parseInt(a[0]);\n int x=Integer.parseInt(a[1]);\n List<String> l=new ArrayList<String>(); \n \tfor(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}\n \tSystem.out.println(l.size());\n }\n\t}", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true){\n \tString in=br.readLine();\n\t\t\tif(in.equals(\"0 0\")) break;\n String[] a=in.split(\" \");\n int n=Integer.parseInt(a[0]);\n int x=Integer.parseInt(a[1]);\n List<String> l=new ArrayList<String>(); \n \tfor(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}\n \tSystem.out.println(l.size());\n }", "true", "{\n \tString in=br.readLine();\n\t\t\tif(in.equals(\"0 0\")) break;\n String[] a=in.split(\" \");\n int n=Integer.parseInt(a[0]);\n int x=Integer.parseInt(a[1]);\n List<String> l=new ArrayList<String>(); \n \tfor(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}\n \tSystem.out.println(l.size());\n }", "String in=br.readLine();", "in", "br.readLine()", "br.readLine", "br", "if(in.equals(\"0 0\")) break;", "in.equals(\"0 0\")", "in.equals", "in", "\"0 0\"", "break;", "String[] a=in.split(\" \");", "a", "in.split(\" \")", "in.split", "in", "\" \"", "int n=Integer.parseInt(a[0]);", "n", "Integer.parseInt(a[0])", "Integer.parseInt", "Integer", "a[0]", "a", "0", "int x=Integer.parseInt(a[1]);", "x", "Integer.parseInt(a[1])", "Integer.parseInt", "Integer", "a[1]", "a", "1", "List<String> l=new ArrayList<String>();", "l", "new ArrayList<String>()", "for(int i=1;i<=n;i++){\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}", "{\n \tfor(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}\n \t}", "for(int j=1;j<=n;j++){\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}", "int j=1;", "int j=1;", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}", "{\n \tfor(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}\n \t}", "for(int k=1;k<=n;k++){\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}", "{\n \t\tif(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}\n \t}", "if(i!=j&&j!=k&&k!=i&&i+j+k==x){\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}", "i!=j&&j!=k&&k!=i&&i+j+k==x", "k!=i", "i!=j&&j!=k&&k!=i&&i+j+k==x", "i!=j", "i", "j", "j!=k", "j", "k", "k!=i", "k", "i", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "{\n \t\t\tint[] q={i, j, k};\n \t\t\tArrays.sort(q);\n \t\t\tString s=Arrays.toString(q);\n \t\t\tif(l.indexOf(s)==-1) l.add(s);\n \t\t}", "int[] q={i, j, k};", "q", "{i, j, k}", "i", "j", "k", "Arrays.sort(q)", "Arrays.sort", "Arrays", "q", "String s=Arrays.toString(q);", "s", "Arrays.toString(q)", "Arrays.toString", "Arrays", "q", "if(l.indexOf(s)==-1) l.add(s);", "l.indexOf(s)==-1", "l.indexOf(s)", "l.indexOf", "l", "s", "-1", "1", "l.add(s)", "l.add", "l", "s", "System.out.println(l.size())", "System.out.println", "System.out", "System", "System.out", "l.size()", "l.size", "l", "String[] args", "args" ]
import java.io.*; import java.util.*; class Main { public static void main(String[] args) throws Exception { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); while(true){ String in=br.readLine(); if(in.equals("0 0")) break; String[] a=in.split(" "); int n=Integer.parseInt(a[0]); int x=Integer.parseInt(a[1]); List<String> l=new ArrayList<String>(); for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ for(int k=1;k<=n;k++){ if(i!=j&&j!=k&&k!=i&&i+j+k==x){ int[] q={i, j, k}; Arrays.sort(q); String s=Arrays.toString(q); if(l.indexOf(s)==-1) l.add(s); } } } } System.out.println(l.size()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 11, 1, 2, 2, 13, 17, 2, 13, 17, 30, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 116, 5 ], [ 116, 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 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 24, 28 ], [ 28, 29 ], [ 28, 30 ], [ 22, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 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 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 51, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 51, 63 ], [ 63, 64 ], [ 64, 65 ], [ 51, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 68, 75 ], [ 75, 76 ], [ 75, 77 ], [ 68, 78 ], [ 78, 79 ], [ 79, 80 ], [ 68, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 86, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 84, 90 ], [ 83, 91 ], [ 91, 92 ], [ 92, 93 ], [ 32, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 32, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 32, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 8, 110 ], [ 110, 111 ], [ 111, 112 ], [ 6, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\t\tint x = sc.nextInt();\n\n\t\tfor (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\t\tint x = sc.nextInt();\n\n\t\tfor (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\t\tint x = sc.nextInt();\n\n\t\tfor (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}\n\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tint n = sc.nextInt();\n\t\tint x = sc.nextInt();\n\n\t\tfor (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}\n\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "for (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}", ";", "n != 0 || x != 0", "n != 0", "n", "0", "x != 0", "x", "0", "{\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}", "{\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}", "int result = 0;", "result", "0", "for (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n - 2", "i", "n - 2", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n - 1", "j", "n - 1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}", "result++", "result", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "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\tint n = sc.nextInt();\n\t\tint x = sc.nextInt();\n\n\t\tfor (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}\n\n\t\tsc.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\tint n = sc.nextInt();\n\t\tint x = sc.nextInt();\n\n\t\tfor (; n != 0 || x != 0;) {\n\t\t\tint result = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tresult++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\n\t\t\tn = sc.nextInt();\n\t\t\tx = sc.nextInt();\n\t\t}\n\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int x = sc.nextInt(); for (; n != 0 || x != 0;) { int result = 0; for (int i = 1; i <= n - 2; i++) { for (int j = i + 1; j <= n - 1; j++) { for (int k = j + 1; k <= n; k++) { if (i + j + k == x) { result++; } } } } System.out.println(result); n = sc.nextInt(); x = sc.nextInt(); } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 9, 41, 13, 2, 13, 2, 13, 13, 14, 2, 13, 17, 3, 14, 2, 13, 13, 3, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 40, 13, 0, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 62, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 62, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 62, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 62, 85 ], [ 85, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 87, 94 ], [ 94, 95 ], [ 94, 96 ], [ 85, 97 ], [ 97, 98 ], [ 62, 99 ], [ 99, 100 ], [ 99, 101 ], [ 14, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 6, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n\n while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }", "true", "{\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "++i", "++i", "i", "{\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }", "{\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }", "for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }", "int j = i;", "int j = i;", "j", "i", "j < n", "j", "n", "++j", "++j", "j", "{\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }", "{\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }", "if (i == j) continue;", "i == j", "i", "j", "continue;", "int num = x - (i + j);", "num", "x - (i + j)", "x", "(i + j)", "i", "j", "if (num < 1) break;", "num < 1", "num", "1", "break;", "if (num < j) break;", "num < j", "num", "j", "break;", "if (i != num && j != num && num <= n) count++;", "i != num && j != num && num <= n", "i != num && j != num && num <= n", "i != num", "i", "num", "j != num", "j", "num", "num <= n", "num", "n", "count++", "count", "num = 0", "num", "0", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n while (true) {\n int n = scan.nextInt();\n int x = scan.nextInt();\n if (n == 0 && x == 0) break;\n int count = 0;\n\n\n for (int i = 1; i < n; ++i) {\n for (int j = i; j < n; ++j) {\n if (i == j) continue;\n int num = x - (i + j);\n if (num < 1) break;\n if (num < j) break;\n if (i != num && j != num && num <= n) count++;\n num = 0;\n }\n }\n System.out.println(count);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (true) { int n = scan.nextInt(); int x = scan.nextInt(); if (n == 0 && x == 0) break; int count = 0; for (int i = 1; i < n; ++i) { for (int j = i; j < n; ++j) { if (i == j) continue; int num = x - (i + j); if (num < 1) break; if (num < j) break; if (i != num && j != num && num <= n) count++; num = 0; } } System.out.println(count); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 4, 18, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 4, 18, 13, 2, 2, 13, 13, 2, 13, 17, 17, 2, 13, 4, 18, 13, 2, 13, 17, 2, 2, 13, 17, 17, 1, 40, 13, 30, 11, 1, 41, 13, 4, 18, 13, 2, 2, 13, 13, 13, 2, 13, 17, 2, 13, 4, 18, 13, 2, 13, 17, 2, 2, 13, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 40, 13, 4, 18, 13, 13, 4, 18, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 173, 14 ], [ 173, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 17, 20 ], [ 173, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 27, 29 ], [ 23, 30 ], [ 30, 31 ], [ 23, 32 ], [ 32, 33 ], [ 23, 34 ], [ 34, 35 ], [ 23, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 41, 46 ], [ 38, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 52, 54 ], [ 38, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 57, 60 ], [ 60, 61 ], [ 60, 62 ], [ 38, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 38, 72 ], [ 72, 73 ], [ 72, 74 ], [ 38, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 83, 83 ], [ 83, 84 ], [ 83, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 79, 89 ], [ 75, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 75, 103 ], [ 103, 104 ], [ 104, 105 ], [ 75, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 115, 115 ], [ 115, 116 ], [ 115, 117 ], [ 115, 118 ], [ 111, 119 ], [ 119, 120 ], [ 119, 121 ], [ 107, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 127, 129 ], [ 124, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 107, 135 ], [ 135, 136 ], [ 136, 137 ], [ 107, 138 ], [ 139, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 143, 143 ], [ 143, 144 ], [ 143, 145 ], [ 143, 146 ], [ 139, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 152, 153 ], [ 152, 154 ], [ 147, 155 ], [ 155, 156 ], [ 38, 157 ], [ 157, 158 ], [ 158, 159 ], [ 157, 160 ], [ 23, 161 ], [ 161, 162 ], [ 162, 163 ], [ 173, 164 ], [ 164, 165 ], [ 164, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 164, 170 ], [ 170, 171 ], [ 0, 172 ], [ 172, 173 ], [ 172, 174 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\n\npublic class Main {\n\tpublic static final String EOL = System.getProperty(\"line.separator\");\n public void exec() throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tPrintWriter out = new PrintWriter(System.out);\n \tString[] s;\n \tint n,x;\n \twhile(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}\n out.flush();\n }\n \n public static void main(String[] args) throws IOException {\n \tnew Main().exec();\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.io.PrintWriter;", "PrintWriter", "java.io", "public class Main {\n\tpublic static final String EOL = System.getProperty(\"line.separator\");\n public void exec() throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tPrintWriter out = new PrintWriter(System.out);\n \tString[] s;\n \tint n,x;\n \twhile(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}\n out.flush();\n }\n \n public static void main(String[] args) throws IOException {\n \tnew Main().exec();\n }\n}", "Main", "public static final String EOL = System.getProperty(\"line.separator\");", "EOL", "System.getProperty(\"line.separator\")", "System.getProperty", "System", "\"line.separator\"", "public void exec() throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tPrintWriter out = new PrintWriter(System.out);\n \tString[] s;\n \tint n,x;\n \twhile(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}\n out.flush();\n }", "exec", "{\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tPrintWriter out = new PrintWriter(System.out);\n \tString[] s;\n \tint n,x;\n \twhile(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}\n out.flush();\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "String[] s;", "s", "int n", "n", "x;", "x", "while(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}", "true", "{\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}", "s = br.readLine().split(\" \")", "s", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "n = Integer.parseInt(s[0])", "n", "Integer.parseInt(s[0])", "Integer.parseInt", "Integer", "s[0]", "s", "0", "x = Integer.parseInt(s[1])", "x", "Integer.parseInt(s[1])", "Integer.parseInt", "Integer", "s[1]", "s", "1", "if(n == 0 && x == 0) \n \tbreak;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int count = 0;", "count", "0", "for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}", "int i=Math.max(x-n-(n-1),1);", "int i=Math.max(x-n-(n-1),1);", "i", "Math.max(x-n-(n-1),1)", "Math.max", "Math", "x-n-(n-1)", "x-n-(n-1)", "x", "n", "(n-1)", "n", "1", "1", "i<=Math.min(n-2,x/3-1)", "i", "Math.min(n-2,x/3-1)", "Math.min", "Math", "n-2", "n", "2", "x/3-1", "x/3", "x", "3", "1", "i++", "i++", "i", "for (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}", "for (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}", "int j=Math.max(x-i-n,i+1);", "int j=Math.max(x-i-n,i+1);", "j", "Math.max(x-i-n,i+1)", "Math.max", "Math", "x-i-n", "x-i-n", "x", "i", "n", "i+1", "i", "1", "j<=Math.min(n-1,(x-i)/2)", "j", "Math.min(n-1,(x-i)/2)", "Math.min", "Math", "n-1", "n", "1", "(x-i)/2", "(x-i)", "x", "i", "2", "j++", "j++", "j", "{\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}", "{\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}", "int k = x - i - j;", "k", "x - i - j", "x - i - j", "x", "i", "j", "if (j<k && k<=n) count++;", "j<k && k<=n", "j<k", "j", "k", "k<=n", "k", "n", "count++", "count", "out.println(count)", "out.println", "out", "count", "out.flush()", "out.flush", "out", "public static void main(String[] args) throws IOException {\n \tnew Main().exec();\n }", "main", "{\n \tnew Main().exec();\n }", "new Main().exec()", "new Main().exec", "new Main()", "String[] args", "args", "public class Main {\n\tpublic static final String EOL = System.getProperty(\"line.separator\");\n public void exec() throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tPrintWriter out = new PrintWriter(System.out);\n \tString[] s;\n \tint n,x;\n \twhile(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}\n out.flush();\n }\n \n public static void main(String[] args) throws IOException {\n \tnew Main().exec();\n }\n}", "public class Main {\n\tpublic static final String EOL = System.getProperty(\"line.separator\");\n public void exec() throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tPrintWriter out = new PrintWriter(System.out);\n \tString[] s;\n \tint n,x;\n \twhile(true) {\n \t\ts = br.readLine().split(\" \");\n \t\tn = Integer.parseInt(s[0]);\n x = Integer.parseInt(s[1]);\n if(n == 0 && x == 0) \n \tbreak;\n int count = 0;\n for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++)\n \tfor (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) {\n \t\tint k = x - i - j;\n \t\tif (j<k && k<=n) count++;\n \t\t}\n out.println(count);\n \t}\n out.flush();\n }\n \n public static void main(String[] args) throws IOException {\n \tnew Main().exec();\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; public class Main { public static final String EOL = System.getProperty("line.separator"); public void exec() throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(System.out); String[] s; int n,x; while(true) { s = br.readLine().split(" "); n = Integer.parseInt(s[0]); x = Integer.parseInt(s[1]); if(n == 0 && x == 0) break; int count = 0; for(int i=Math.max(x-n-(n-1),1); i<=Math.min(n-2,x/3-1); i++) for (int j=Math.max(x-i-n,i+1); j<=Math.min(n-1,(x-i)/2); j++) { int k = x - i - j; if (j<k && k<=n) count++; } out.println(count); } out.flush(); } public static void main(String[] args) throws IOException { new Main().exec(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 2, 13, 13, 13, 13, 2, 13, 13, 2, 13, 13, 30, 0, 13, 17, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 126, 11 ], [ 126, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 20, 45 ], [ 45, 46 ], [ 45, 47 ], [ 20, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 20, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 67, 68 ], [ 58, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 76, 78 ], [ 71, 79 ], [ 79, 80 ], [ 80, 81 ], [ 71, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 89, 90 ], [ 89, 91 ], [ 84, 92 ], [ 92, 93 ], [ 93, 94 ], [ 84, 95 ], [ 96, 96 ], [ 96, 97 ], [ 97, 98 ], [ 99, 99 ], [ 99, 100 ], [ 100, 101 ], [ 102, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 100, 106 ], [ 99, 107 ], [ 107, 108 ], [ 107, 109 ], [ 99, 110 ], [ 110, 111 ], [ 110, 112 ], [ 97, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 20, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 117, 122 ], [ 12, 123 ], [ 123, 124 ], [ 0, 125 ], [ 125, 126 ], [ 125, 127 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }\n \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", "public class Main {\n\n public static void main(String[] args) throws IOException {\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }\n \n \n }\n\n\n}", "Main", "public static void main(String[] args) throws IOException {\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }\n \n \n }", "main", "{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }\n \n \n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }", "true", "{\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }", "String[] line = br.readLine().split(\" \");", "line", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(line[0]);", "n", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "int x = Integer.parseInt(line[1]);", "x", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "int num = 0;", "num", "0", "if(n == 0 && x == 0) { break; }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{ break; }", "break;", "for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }", "int a = 1;", "int a = 1;", "a", "1", "a <= n", "a", "n", "a++", "a++", "a", "{\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }", "{\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }", "for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n }", "int b = 2;", "int b = 2;", "b", "2", "b <= n", "b", "n", "b++", "b++", "b", "{\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n }", "{\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n }", "for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }", "int c = 3;", "int c = 3;", "c", "3", "c <= n", "c", "n", "c++", "c++", "c", "{\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }", "{\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }", "if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }", "a+b+c == x && a < b && b < c", "a+b+c == x && a < b && b < c", "a+b+c == x", "a+b+c", "a+b+c", "a", "b", "c", "x", "a < b", "a", "b", "b < c", "b", "c", "{\n num += 1;\n }", "num += 1", "num", "1", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }\n \n \n }\n\n\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n while(true) {\n \n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int num = 0;\n \n if(n == 0 && x == 0) { break; }\n \n for (int a = 1; a <= n; a++){\n for (int b = 2; b <= n; b++){\n for(int c = 3; c <= n; c++){\n if( a+b+c == x && a < b && b < c ) {\n num += 1;\n }\n }\n } \n }\n \n System.out.println(num);\n \n }\n \n \n }\n\n\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 br = new BufferedReader(new InputStreamReader(System.in)); while(true) { String[] line = br.readLine().split(" "); int n = Integer.parseInt(line[0]); int x = Integer.parseInt(line[1]); int num = 0; if(n == 0 && x == 0) { break; } for (int a = 1; a <= n; a++){ for (int b = 2; b <= n; b++){ for(int c = 3; c <= n; c++){ if( a+b+c == x && a < b && b < c ) { num += 1; } } } } System.out.println(num); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 103, 5 ], [ 103, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 25, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 44, 46 ], [ 37, 47 ], [ 47, 48 ], [ 48, 49 ], [ 37, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 52, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 52, 64 ], [ 64, 65 ], [ 65, 66 ], [ 52, 67 ], [ 68, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 69, 76 ], [ 76, 77 ], [ 76, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 69, 82 ], [ 83, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 87, 87 ], [ 87, 88 ], [ 87, 89 ], [ 87, 90 ], [ 85, 91 ], [ 84, 92 ], [ 92, 93 ], [ 14, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 6, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "\nimport java.util.*;\n\npublic class Main {\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}\n\t}\n\t\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}\n\t}\n\t\n}", "Main", "public static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}\n\t}", "main", "{\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}\n\t}", "Scanner cin=new Scanner(System.in);", "cin", "new Scanner(System.in)", "while(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}", "true", "{\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}", "int n=cin.nextInt()", "n", "cin.nextInt()", "cin.nextInt", "cin", "x=cin.nextInt();", "x", "cin.nextInt()", "cin.nextInt", "cin", "int res=0;", "res", "0", "if(n==0 && x==0)break;", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "for(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}", "if(i+j+k==x)res++;", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "res++", "res", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "public class Main {\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}\n\t}\n\t\n}", "public class Main {\n\t\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\twhile(true) {\n\t\t\tint n=cin.nextInt(),x=cin.nextInt();\n\t\t\tint res=0;\n\t\t\tif(n==0 && x==0)break;\n\t\t\t\n\t\t\tfor(int i=1;i<=n-2;i++) {\n\t\t\t\tfor(int j=i+1;j<=n-1;j++) {\n\t\t\t\t\tfor(int k=j+1;k<=n;k++) {\n\t\t\t\t\t\tif(i+j+k==x)res++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(res);\n\t\t\t\n\t\t}\n\t}\n\t\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner cin=new Scanner(System.in); while(true) { int n=cin.nextInt(),x=cin.nextInt(); int res=0; if(n==0 && x==0)break; for(int i=1;i<=n-2;i++) { for(int j=i+1;j<=n-1;j++) { for(int k=j+1;k<=n;k++) { if(i+j+k==x)res++; } } } System.out.println(res); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 13, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 13, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 13, 17, 41, 13, 2, 13, 17, 41, 13, 2, 2, 2, 2, 2, 13, 17, 13, 17, 13, 17, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 127, 5 ], [ 127, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 25, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 28, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 39, 49 ], [ 49, 50 ], [ 50, 51 ], [ 39, 52 ], [ 53, 53 ], [ 53, 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 ], [ 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 ], [ 86, 88 ], [ 83, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 83, 94 ], [ 94, 95 ], [ 94, 96 ], [ 100, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 98, 104 ], [ 97, 105 ], [ 100, 106 ], [ 83, 107 ], [ 107, 108 ], [ 108, 109 ], [ 110, 110 ], [ 110, 111 ], [ 110, 112 ], [ 110, 113 ], [ 108, 114 ], [ 107, 115 ], [ 115, 116 ], [ 116, 117 ], [ 38, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 6, 124 ], [ 124, 125 ], [ 0, 126 ], [ 126, 127 ], [ 126, 128 ] ]
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "while(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}", "true", "{\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}", "int num = in.nextInt();", "num", "in.nextInt()", "in.nextInt", "in", "int sum = in.nextInt();", "sum", "in.nextInt()", "in.nextInt", "in", "int count = 0;", "count", "0", "if(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}", "num == 0 && sum == 0", "num == 0", "num", "0", "sum == 0", "sum", "0", "{\n\n\t\t\t\tbreak;\n\n\t\t\t}", "break;", "{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}", "for(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}", "int f = 1;", "int f = 1;", "f", "1", "f <= (num-2)", "f", "(num-2)", "num", "2", "f++", "f++", "f", "{\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}", "for(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}", "int s = f;", "int s = f;", "s", "f", "s <= (num-2)", "s", "(num-2)", "num", "2", "s++", "s++", "s", "{\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}", "{\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}", "for(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int t = s;", "int t = s;", "t", "s", "t <= (num-2)", "t", "(num-2)", "num", "2", "t++", "t++", "t", "{\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int S = s+1;", "S", "s+1", "s", "1", "int T = t+2;", "T", "t+2", "t", "2", "String c = f + \"+\" + S + \"+\" + T + \"+\";", "c", "f + \"+\" + S + \"+\" + T + \"+\"", "T", "\"+\"", "S", "f + \"+\" + S + \"+\" + T + \"+\"", "f", "\"+\"", "S", "\"+\"", "T", "\"+\"", "if(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}", "f + S + T == sum", "f + S + T", "f + S + T", "f", "S", "T", "sum", "{\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile(true){\n\n\t\t\tint num = in.nextInt();\n\t\t\tint sum = in.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(num == 0 && sum == 0){\n\n\t\t\t\tbreak;\n\n\t\t\t}else{\n\n\t\t\t\tfor(int f = 1; f <= (num-2); f++){\n\n\t\t\t\t\tfor(int s = f; s <= (num-2); s++){\n\n\t\t\t\t\t\tfor(int t = s; t <= (num-2); t++){\n\n\t\t\t\t\t\t\tint S = s+1;\n\t\t\t\t\t\t\tint T = t+2;\n\n\t\t\t\t\t\t\tString c = f + \"+\" + S + \"+\" + T + \"+\";\n\n\t\t\t\t\t\t\tif(f + S + T == sum){\n\n\t\t\t\t\t\t\t\tcount++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(count);\n\t\t\t}\n\t\t}\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); while(true){ int num = in.nextInt(); int sum = in.nextInt(); int count = 0; if(num == 0 && sum == 0){ break; }else{ for(int f = 1; f <= (num-2); f++){ for(int s = f; s <= (num-2); s++){ for(int t = s; t <= (num-2); t++){ int S = s+1; int T = t+2; String c = f + "+" + S + "+" + T + "+"; if(f + S + T == sum){ count++; } } } } System.out.println(count); } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 41, 13, 8, 4, 18, 13, 20, 20, 41, 13, 20, 4, 13, 13, 13, 4, 18, 13, 12, 13, 30, 41, 13, 41, 13, 11, 1, 30, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 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 ], [ 141, 11 ], [ 141, 12 ], [ 12, 13 ], [ 12, 14 ], [ 141, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 15, 21 ], [ 21, 22 ], [ 141, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 28, 32 ], [ 28, 33 ], [ 25, 34 ], [ 34, 35 ], [ 34, 36 ], [ 25, 37 ], [ 37, 38 ], [ 37, 39 ], [ 37, 40 ], [ 25, 41 ], [ 41, 42 ], [ 42, 43 ], [ 141, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 54, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 54, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 70, 72 ], [ 65, 73 ], [ 54, 74 ], [ 74, 75 ], [ 74, 76 ], [ 54, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 77, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 97, 98 ], [ 97, 99 ], [ 90, 100 ], [ 100, 101 ], [ 101, 102 ], [ 90, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 105, 112 ], [ 112, 113 ], [ 112, 114 ], [ 105, 115 ], [ 115, 116 ], [ 116, 117 ], [ 105, 118 ], [ 119, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 123, 123 ], [ 123, 124 ], [ 123, 125 ], [ 123, 126 ], [ 121, 127 ], [ 120, 128 ], [ 128, 129 ], [ 54, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 44, 136 ], [ 136, 137 ], [ 44, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ] ]
[ "import java.io.ByteArrayInputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n\n String INPUT = \"\";\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n\n void run() {\n Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));\n PrintWriter out = new PrintWriter(System.out);\n\n solve(sc, out);\n out.flush();\n }\n\n void solve(Scanner sc, PrintWriter out) {\n int n, x;\n \n for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n }\n}\n", "import java.io.ByteArrayInputStream;", "ByteArrayInputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n String INPUT = \"\";\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n\n void run() {\n Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));\n PrintWriter out = new PrintWriter(System.out);\n\n solve(sc, out);\n out.flush();\n }\n\n void solve(Scanner sc, PrintWriter out) {\n int n, x;\n \n for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n }\n}", "Main", "String INPUT = \"\";", "INPUT", "\"\"", "public static void main(String[] args) throws Exception {\n new Main().run();\n }", "main", "{\n new Main().run();\n }", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "void run() {\n Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));\n PrintWriter out = new PrintWriter(System.out);\n\n solve(sc, out);\n out.flush();\n }", "run", "{\n Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));\n PrintWriter out = new PrintWriter(System.out);\n\n solve(sc, out);\n out.flush();\n }", "Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));", "sc", "INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()))", "INPUT.isEmpty()", "INPUT.isEmpty", "INPUT", "new Scanner(System.in)", "new Scanner(new ByteArrayInputStream(INPUT.getBytes()))", "PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "solve(sc, out)", "solve", "sc", "out", "out.flush()", "out.flush", "out", "void solve(Scanner sc, PrintWriter out) {\n int n, x;\n \n for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n }", "solve", "{\n int n, x;\n \n for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n }", "int n", "n", "x;", "x", "for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}", ";", "{\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}", "{\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "int cnt = 0;", "cnt", "0", "for (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}", "{\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}", "if (i+j+k == x) cnt++;", "i+j+k == x", "i+j+k", "i+j+k", "i", "j", "k", "x", "cnt++", "cnt", "System.out.println(cnt)", "System.out.println", "System.out", "System", "System.out", "cnt", "Scanner sc", "sc", "PrintWriter out", "out", "public class Main {\n\n String INPUT = \"\";\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n\n void run() {\n Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));\n PrintWriter out = new PrintWriter(System.out);\n\n solve(sc, out);\n out.flush();\n }\n\n void solve(Scanner sc, PrintWriter out) {\n int n, x;\n \n for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n }\n}", "public class Main {\n\n String INPUT = \"\";\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n\n void run() {\n Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes()));\n PrintWriter out = new PrintWriter(System.out);\n\n solve(sc, out);\n out.flush();\n }\n\n void solve(Scanner sc, PrintWriter out) {\n int n, x;\n \n for (;;) {\n \tn = sc.nextInt();\n \tx = sc.nextInt();\n \tif (n == 0 && x == 0) break;\n \tint cnt = 0;\n \tfor (int i = 1; i <= n; i++) {\n \t\tfor (int j = i+1; j <= n; j++) {\n \t\t\tfor (int k = j+1; k <= n; k++) {\n \t\t\t\tif (i+j+k == x) cnt++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(cnt);\n\t\t}\n }\n}", "Main" ]
import java.io.ByteArrayInputStream; import java.io.PrintWriter; import java.util.Scanner; public class Main { String INPUT = ""; public static void main(String[] args) throws Exception { new Main().run(); } void run() { Scanner sc = INPUT.isEmpty() ? new Scanner(System.in) : new Scanner(new ByteArrayInputStream(INPUT.getBytes())); PrintWriter out = new PrintWriter(System.out); solve(sc, out); out.flush(); } void solve(Scanner sc, PrintWriter out) { int n, x; for (;;) { n = sc.nextInt(); x = sc.nextInt(); if (n == 0 && x == 0) break; int cnt = 0; for (int i = 1; i <= n; i++) { for (int j = i+1; j <= n; j++) { for (int k = j+1; k <= n; k++) { if (i+j+k == x) cnt++; } } } System.out.println(cnt); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 41, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 2, 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 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 18 ], [ 18, 19 ], [ 18, 20 ], [ 8, 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 ], [ 34, 36 ], [ 23, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 23, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 78, 79 ], [ 78, 80 ], [ 73, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 92, 94 ], [ 88, 95 ], [ 95, 96 ], [ 95, 97 ], [ 86, 98 ], [ 86, 99 ], [ 99, 100 ], [ 100, 101 ], [ 102, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 100, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 23, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 6, 118 ], [ 118, 119 ] ]
[ "/**\n から n までの数の中から、重複無しで3つの数を選びそれらの合計が x となる組み合わせの数を求めるプログラムを作成して下さい。\n\n例えば、1 から 5 までの数から3つを選んでそれらの合計が 9 となる組み合わせは、\n?1 + 3 + 5 = 9\n?2 + 3 + 4 = 9\n\nの2通りがあります。\n\n */\n\n/*sucannerクラス使うためにインポート*/\nimport java.util.Scanner;\n\nclass Main {\n\t// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 点数を受け取る変数を宣言\n\t\tint intN = 0;\n\t\tint intX = 0;\n\t\tint intKekka = 0;\n\n\t\t// breakされるまで処理をくりかえす\n\t\twhile (true) {\n\n\t\t\tintN = sc.nextInt();\n\t\t\tintX = sc.nextInt();\n\t\t\tintKekka = 0;\n\t\t\tif (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tSystem.out.println(intKekka/6);\n\t\t\t}\n\n\t\t}\n\t}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\t// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 点数を受け取る変数を宣言\n\t\tint intN = 0;\n\t\tint intX = 0;\n\t\tint intKekka = 0;\n\n\t\t// breakされるまで処理をくりかえす\n\t\twhile (true) {\n\n\t\t\tintN = sc.nextInt();\n\t\t\tintX = sc.nextInt();\n\t\t\tintKekka = 0;\n\t\t\tif (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tSystem.out.println(intKekka/6);\n\t\t\t}\n\n\t\t}\n\t}", "Main", "// プログラムのエントリポイント\n\tpublic static void main(String[] args) {\n\t\t// 入力ストリームの生成\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 点数を受け取る変数を宣言\n\t\tint intN = 0;\n\t\tint intX = 0;\n\t\tint intKekka = 0;\n\n\t\t// breakされるまで処理をくりかえす\n\t\twhile (true) {\n\n\t\t\tintN = sc.nextInt();\n\t\t\tintX = sc.nextInt();\n\t\t\tintKekka = 0;\n\t\t\tif (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tSystem.out.println(intKekka/6);\n\t\t\t}\n\n\t\t}", "main", "{\n\t\t// 入力ストリームの生成\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 点数を受け取る変数を宣言\n\t\tint intN = 0;\n\t\tint intX = 0;\n\t\tint intKekka = 0;\n\n\t\t// breakされるまで処理をくりかえす\n\t\twhile (true) {\n\n\t\t\tintN = sc.nextInt();\n\t\t\tintX = sc.nextInt();\n\t\t\tintKekka = 0;\n\t\t\tif (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tSystem.out.println(intKekka/6);\n\t\t\t}\n\n\t\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int intN = 0;", "intN", "0", "int intX = 0;", "intX", "0", "int intKekka = 0;", "intKekka", "0", "while (true) {\n\n\t\t\tintN = sc.nextInt();\n\t\t\tintX = sc.nextInt();\n\t\t\tintKekka = 0;\n\t\t\tif (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tSystem.out.println(intKekka/6);\n\t\t\t}", "true", "{\n\n\t\t\tintN = sc.nextInt();\n\t\t\tintX = sc.nextInt();\n\t\t\tintKekka = 0;\n\t\t\tif (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tSystem.out.println(intKekka/6);\n\t\t\t}", "intN = sc.nextInt()", "intN", "sc.nextInt()", "sc.nextInt", "sc", "intX = sc.nextInt()", "intX", "sc.nextInt()", "sc.nextInt", "sc", "intKekka = 0", "intKekka", "0", "if (intN == 0 && intX == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "intN == 0 && intX == 0", "intN == 0", "intN", "0", "intX == 0", "intX", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for (int i = 1; i <= intN; i++) {\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= intN", "i", "intN", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\tfor (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int j = 1; j <= intN; j++) {\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= intN", "j", "intN", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for (int k = 1; k <= intN; k++) {\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= intN", "k", "intN", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(i == j || j == k || i == k){\n\n\t\t\t\t\t\t}else if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}", "i == j || j == k || i == k", "i == j || j == k || i == k", "i == j", "i", "j", "j == k", "j", "k", "i == k", "i", "k", "{\n\n\t\t\t\t\t\t}", "if ( i + j + k == intX){\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}", "i + j + k == intX", "i + j + k", "i + j + k", "i", "j", "k", "intX", "{\n\t\t\t\t\t\t\tintKekka ++;\n\t\t\t\t\t\t\t}", "intKekka ++", "intKekka", "System.out.println(intKekka/6)", "System.out.println", "System.out", "System", "System.out", "intKekka/6", "intKekka", "6", "String[] args", "args" ]
/** から n までの数の中から、重複無しで3つの数を選びそれらの合計が x となる組み合わせの数を求めるプログラムを作成して下さい。 例えば、1 から 5 までの数から3つを選んでそれらの合計が 9 となる組み合わせは、 ?1 + 3 + 5 = 9 ?2 + 3 + 4 = 9 の2通りがあります。 */ /*sucannerクラス使うためにインポート*/ import java.util.Scanner; class Main { // プログラムのエントリポイント public static void main(String[] args) { // 入力ストリームの生成 Scanner sc = new Scanner(System.in); // 点数を受け取る変数を宣言 int intN = 0; int intX = 0; int intKekka = 0; // breakされるまで処理をくりかえす while (true) { intN = sc.nextInt(); intX = sc.nextInt(); intKekka = 0; if (intN == 0 && intX == 0) { break; } for (int i = 1; i <= intN; i++) { for (int j = 1; j <= intN; j++) { for (int k = 1; k <= intN; k++) { if(i == j || j == k || i == k){ }else if ( i + j + k == intX){ intKekka ++; } } } } System.out.println(intKekka/6); } } }
[ 7, 15, 13, 17, 15, 13, 17, 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, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 30, 42, 17, 30, 0, 13, 4, 18, 13, 14, 4, 18, 17, 13, 30, 3, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 4, 18, 13, 20, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 13, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 13, 0, 13, 13, 4, 13, 23, 13, 23, 13, 12, 13, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 40, 13, 12, 13, 30, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 184, 17 ], [ 184, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 18, 24 ], [ 24, 25 ], [ 184, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 28, 34 ], [ 34, 35 ], [ 34, 36 ], [ 28, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 37, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 47, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 53, 58 ], [ 58, 59 ], [ 47, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 47, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 71, 72 ], [ 71, 73 ], [ 47, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 79, 80 ], [ 79, 81 ], [ 47, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 44, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 97, 98 ], [ 184, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 99, 103 ], [ 103, 104 ], [ 99, 105 ], [ 105, 106 ], [ 99, 107 ], [ 107, 108 ], [ 99, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 115, 117 ], [ 111, 118 ], [ 118, 119 ], [ 109, 120 ], [ 120, 121 ], [ 109, 122 ], [ 122, 123 ], [ 99, 124 ], [ 124, 125 ], [ 124, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 137, 139 ], [ 130, 140 ], [ 140, 141 ], [ 141, 142 ], [ 130, 143 ], [ 144, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 149, 151 ], [ 145, 152 ], [ 152, 153 ], [ 152, 154 ], [ 145, 155 ], [ 155, 156 ], [ 156, 157 ], [ 145, 158 ], [ 159, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 163, 163 ], [ 163, 164 ], [ 163, 165 ], [ 163, 166 ], [ 159, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 168, 172 ], [ 172, 173 ], [ 172, 174 ], [ 167, 175 ], [ 175, 176 ], [ 176, 177 ], [ 99, 178 ], [ 178, 179 ], [ 178, 180 ], [ 180, 181 ], [ 181, 182 ], [ 0, 183 ], [ 183, 184 ], [ 183, 185 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n *\n * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_7_B\n * @author wsKmatsuda\n *\n */\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tnew Main().run();\n\n\t}\n\n\tpublic void run(){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String inputData;\n List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();\n\n try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n\n\t/**\n\t * ThreeNumberTotalCheck?????????\n\t * n???x?????????????????????\n\t * 1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°????±???????\n\t */\n\tclass ThreeNumberTotalCheck{\n\n\t\t//check limit\n\t\tpublic int n;\n\t\t//total\n\t\tpublic int x;\n\t\t//1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°\n\t\tpublic int cnt;\n\n\t\tpublic String evalution;\n\n\t\tThreeNumberTotalCheck(int _n ,int _x){\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t */\n\t\tprivate void setCnt(){\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t * @return\n\t\t */\n\t\tpublic int getCnt(){\n\n\t\t\treturn cnt;\n\n\t\t}\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.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "public class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tnew Main().run();\n\n\t}\n\n\tpublic void run(){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String inputData;\n List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();\n\n try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n\n\t/**\n\t * ThreeNumberTotalCheck?????????\n\t * n???x?????????????????????\n\t * 1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°????±???????\n\t */\n\tclass ThreeNumberTotalCheck{\n\n\t\t//check limit\n\t\tpublic int n;\n\t\t//total\n\t\tpublic int x;\n\t\t//1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°\n\t\tpublic int cnt;\n\n\t\tpublic String evalution;\n\n\t\tThreeNumberTotalCheck(int _n ,int _x){\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t */\n\t\tprivate void setCnt(){\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t * @return\n\t\t */\n\t\tpublic int getCnt(){\n\n\t\t\treturn cnt;\n\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tnew Main().run();\n\n\t}", "main", "{\n\n\t\tnew Main().run();\n\n\t}", "new Main().run()", "new Main().run", "new Main()", "String[] args", "args", "public void run(){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String inputData;\n List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();\n\n try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "run", "{\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String inputData;\n List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();\n\n try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "String inputData;", "inputData", "List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();", "testDataList", "new ArrayList<ThreeNumberTotalCheck>()", "try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}", "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 \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t}", "while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }", "true", "{\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }", "inputData = reader.readLine()", "inputData", "reader.readLine()", "reader.readLine", "reader", "if(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}", "\"0 0\".equals(inputData)", "\"0 0\".equals", "\"0 0\"", "inputData", "{\n\t\t\t\t\tbreak;\n\t\t\t\t}", "break;", "String[] strData = inputData.split(\" \");", "strData", "inputData.split(\" \")", "inputData.split", "inputData", "\" \"", "int n = Integer.parseInt(strData[0]);", "n", "Integer.parseInt(strData[0])", "Integer.parseInt", "Integer", "strData[0]", "strData", "0", "int x = Integer.parseInt(strData[1]);", "x", "Integer.parseInt(strData[1])", "Integer.parseInt", "Integer", "strData[1]", "strData", "1", "testDataList.add(new ThreeNumberTotalCheck(n,x))", "testDataList.add", "testDataList", "new ThreeNumberTotalCheck(n,x)", "for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }", "ThreeNumberTotalCheck result", "testDataList", "{\n\t \tSystem.out.println(result.getCnt());\n\t }", "{\n\t \tSystem.out.println(result.getCnt());\n\t }", "System.out.println(result.getCnt())", "System.out.println", "System.out", "System", "System.out", "result.getCnt()", "result.getCnt", "result", "class ThreeNumberTotalCheck{\n\n\t\t//check limit\n\t\tpublic int n;\n\t\t//total\n\t\tpublic int x;\n\t\t//1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°\n\t\tpublic int cnt;\n\n\t\tpublic String evalution;\n\n\t\tThreeNumberTotalCheck(int _n ,int _x){\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t */\n\t\tprivate void setCnt(){\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t * @return\n\t\t */\n\t\tpublic int getCnt(){\n\n\t\t\treturn cnt;\n\n\t\t}\n\t}", "ThreeNumberTotalCheck", "//check limit\n\t\tpublic int n;", "n", "//total\n\t\tpublic int x;", "x", "//1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°\n\t\tpublic int cnt;", "cnt", "public String evalution;", "evalution", "ThreeNumberTotalCheck(int _n ,int _x){\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}", "ThreeNumberTotalCheck", "{\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}", "n = _n", "n", "_n", "x = _x", "x", "_x", "setCnt()", "setCnt", "int _n", "_n", "int _x", "_x", "/**\n\t\t * ??¶??°?????????\n\t\t */\n\t\tprivate void setCnt(){\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}", "setCnt", "{\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}", "cnt = 0", "cnt", "0", "for(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<n+2", "i", "n+2", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}", "{\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}", "for(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}", "{\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}", "int jg = x - i - j;", "jg", "x - i - j", "x - i - j", "x", "i", "j", "if(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}", "jg > j && jg <= n", "jg > j", "jg", "j", "jg <= n", "jg", "n", "{\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}", "cnt++", "cnt", "/**\n\t\t * ??¶??°?????????\n\t\t * @return\n\t\t */\n\t\tpublic int getCnt(){\n\n\t\t\treturn cnt;\n\n\t\t}", "getCnt", "{\n\n\t\t\treturn cnt;\n\n\t\t}", "return cnt;", "cnt", "public class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tnew Main().run();\n\n\t}\n\n\tpublic void run(){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String inputData;\n List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();\n\n try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n\n\t/**\n\t * ThreeNumberTotalCheck?????????\n\t * n???x?????????????????????\n\t * 1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°????±???????\n\t */\n\tclass ThreeNumberTotalCheck{\n\n\t\t//check limit\n\t\tpublic int n;\n\t\t//total\n\t\tpublic int x;\n\t\t//1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°\n\t\tpublic int cnt;\n\n\t\tpublic String evalution;\n\n\t\tThreeNumberTotalCheck(int _n ,int _x){\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t */\n\t\tprivate void setCnt(){\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t * @return\n\t\t */\n\t\tpublic int getCnt(){\n\n\t\t\treturn cnt;\n\n\t\t}\n\t}\n\n}", "public class Main{\n\n\tpublic static void main(String[] args) {\n\n\t\tnew Main().run();\n\n\t}\n\n\tpublic void run(){\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String inputData;\n List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>();\n\n try {\n \t//??\\???\n\t while(true){\n\t\t\t\tinputData = reader.readLine();\n\t\t\t\tif(\"0 0\".equals(inputData)){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tString[] strData = inputData.split(\" \");\n\t\t\t\tint n = Integer.parseInt(strData[0]);\n\t\t\t\tint x = Integer.parseInt(strData[1]);\n\t\t\t\ttestDataList.add(new ThreeNumberTotalCheck(n,x));\n\n\t }\n\n\t //????????????\n\t for(ThreeNumberTotalCheck result :testDataList){\n\t \tSystem.out.println(result.getCnt());\n\t }\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}\n\n\t/**\n\t * ThreeNumberTotalCheck?????????\n\t * n???x?????????????????????\n\t * 1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°????±???????\n\t */\n\tclass ThreeNumberTotalCheck{\n\n\t\t//check limit\n\t\tpublic int n;\n\t\t//total\n\t\tpublic int x;\n\t\t//1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°\n\t\tpublic int cnt;\n\n\t\tpublic String evalution;\n\n\t\tThreeNumberTotalCheck(int _n ,int _x){\n\t\t\tn = _n;\n\t\t\tx = _x;\n\n\t\t\tsetCnt();\n\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t */\n\t\tprivate void setCnt(){\n\t\t\tcnt = 0;\n\n\t\t\tfor(int i=1;i<n+2;i++){\n\t\t\t\tfor(int j=i+1;j<n;j++){\n\t\t\t\t\tint jg = x - i - j;\n\t\t\t\t\t//System.out.println(i + \",\" + j + \",\" + jg + \"=\" +(i+j+jg));\n\t\t\t\t\tif(jg > j && jg <= n){\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t1-2-3\n\t\t\t\t1-2-4\n\t\t\t\t1-2-5\n\n\t\t\t\t1-3-4\n\t\t\t\t1-3-5\n\n\t\t\t\t1-4-5\n\n\t\t\t\t2-3-4\n\t\t\t\t2-3-5\n\n\t\t\t\t2-4-5\n\n\t\t\t\t3-4-5\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * ??¶??°?????????\n\t\t * @return\n\t\t */\n\t\tpublic int getCnt(){\n\n\t\t\treturn cnt;\n\n\t\t}\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; /** * * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_7_B * @author wsKmatsuda * */ public class Main{ public static void main(String[] args) { new Main().run(); } public void run(){ BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String inputData; List<ThreeNumberTotalCheck> testDataList = new ArrayList<ThreeNumberTotalCheck>(); try { //??\??? while(true){ inputData = reader.readLine(); if("0 0".equals(inputData)){ break; } String[] strData = inputData.split(" "); int n = Integer.parseInt(strData[0]); int x = Integer.parseInt(strData[1]); testDataList.add(new ThreeNumberTotalCheck(n,x)); } //???????????? for(ThreeNumberTotalCheck result :testDataList){ System.out.println(result.getCnt()); } } catch (IOException e) { e.printStackTrace(); } } /** * ThreeNumberTotalCheck????????? * n???x????????????????????? * 1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????°????±??????? */ class ThreeNumberTotalCheck{ //check limit public int n; //total public int x; //1 ?????? n ?????§?????°?????????????????????????????§???????????°?????????????????????????¨???? x ??¨??????????????????????????° public int cnt; public String evalution; ThreeNumberTotalCheck(int _n ,int _x){ n = _n; x = _x; setCnt(); } /** * ??¶??°????????? */ private void setCnt(){ cnt = 0; for(int i=1;i<n+2;i++){ for(int j=i+1;j<n;j++){ int jg = x - i - j; //System.out.println(i + "," + j + "," + jg + "=" +(i+j+jg)); if(jg > j && jg <= n){ cnt++; } } /* 1-2-3 1-2-4 1-2-5 1-3-4 1-3-5 1-4-5 2-3-4 2-3-5 2-4-5 3-4-5 */ } } /** * ??¶??°????????? * @return */ public int getCnt(){ return cnt; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 41, 13, 17, 42, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 17, 3, 0, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 2, 13, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 2, 2, 13, 13, 13, 2, 13, 13, 30, 40, 13, 30, 4, 18, 18, 13, 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 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 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 ], [ 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 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 49, 51 ], [ 44, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 33, 57 ], [ 57, 58 ], [ 57, 59 ], [ 33, 60 ], [ 60, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 60, 65 ], [ 65, 66 ], [ 65, 67 ], [ 60, 68 ], [ 68, 69 ], [ 69, 70 ], [ 60, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 80, 81 ], [ 80, 82 ], [ 73, 83 ], [ 83, 84 ], [ 84, 85 ], [ 73, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 93, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 88, 97 ], [ 97, 98 ], [ 97, 99 ], [ 88, 100 ], [ 100, 101 ], [ 101, 102 ], [ 88, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 110, 110 ], [ 110, 111 ], [ 110, 112 ], [ 110, 113 ], [ 106, 114 ], [ 114, 115 ], [ 114, 116 ], [ 105, 117 ], [ 117, 118 ], [ 118, 119 ], [ 105, 120 ], [ 33, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 8, 127 ], [ 127, 128 ], [ 128, 129 ], [ 6, 130 ], [ 130, 131 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint n, x;\n\t\tint i = 0, j = 0, k = 0;\n\t\tint count = 0;\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tboolean flag = true;\n\t\twhile (flag) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcount = 0;\n\t\t\tfor (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tint n, x;\n\t\tint i = 0, j = 0, k = 0;\n\t\tint count = 0;\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tboolean flag = true;\n\t\twhile (flag) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcount = 0;\n\t\t\tfor (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\t\tint n, x;\n\t\tint i = 0, j = 0, k = 0;\n\t\tint count = 0;\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tboolean flag = true;\n\t\twhile (flag) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcount = 0;\n\t\t\tfor (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}", "main", "{\n\n\t\tint n, x;\n\t\tint i = 0, j = 0, k = 0;\n\t\tint count = 0;\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\tboolean flag = true;\n\t\twhile (flag) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcount = 0;\n\t\t\tfor (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}", "int n", "n", "x;", "x", "int i = 0", "i", "0", "j = 0", "j", "0", "k = 0;", "k", "0", "int count = 0;", "count", "0", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "boolean flag = true;", "flag", "true", "while (flag) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcount = 0;\n\t\t\tfor (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "flag", "{\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcount = 0;\n\t\t\tfor (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "n = stdIn.nextInt()", "n", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "x = stdIn.nextInt()", "x", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "if (n == 0 && x == 0) {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}", "flag = false", "flag", "false", "break;", "count = 0", "count", "0", "for (i = 1; i < n; i++) {\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "i = 1;", "i = 1", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "{\n\t\t\t\tfor (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}", "for (j = i + 1; j < n; j++) {\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "j = i + 1;", "j = i + 1", "j", "i + 1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (k = x - i - j; k > j; k--) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "k = x - i - j;", "k = x - i - j", "k", "x - i - j", "x - i - j", "x", "i", "j", "k > j", "k", "j", "k--", "k--", "k", "{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (x == i + j + k && k <= n) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "x == i + j + k && k <= n", "x == i + j + k", "x", "i + j + k", "i + j + k", "i", "j", "k", "k <= n", "k", "n", "{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "stdIn.close()", "stdIn.close", "stdIn", "String[] args", "args" ]
import java.util.Scanner; class Main { public static void main(String[] args) { int n, x; int i = 0, j = 0, k = 0; int count = 0; Scanner stdIn = new Scanner(System.in); boolean flag = true; while (flag) { n = stdIn.nextInt(); x = stdIn.nextInt(); if (n == 0 && x == 0) { flag = false; break; } count = 0; for (i = 1; i < n; i++) { for (j = i + 1; j < n; j++) { for (k = x - i - j; k > j; k--) { if (x == i + j + k && k <= n) { count++; } else { } } } } System.out.println(count); } stdIn.close(); } }
[ 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, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 2, 2, 13, 13, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 2, 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 ], [ 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 ], [ 16, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 16, 36 ], [ 36, 37 ], [ 36, 38 ], [ 16, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 48, 49 ], [ 39, 50 ], [ 51, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 52, 57 ], [ 57, 58 ], [ 57, 59 ], [ 52, 60 ], [ 60, 61 ], [ 61, 62 ], [ 52, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 65, 73 ], [ 73, 74 ], [ 74, 75 ], [ 65, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 81, 80 ], [ 92, 81 ], [ 81, 82 ], [ 82, 83 ], [ 84, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 82, 88 ], [ 81, 89 ], [ 89, 90 ], [ 89, 91 ], [ 92, 92 ], [ 92, 93 ], [ 92, 94 ], [ 81, 95 ], [ 95, 96 ], [ 95, 97 ], [ 78, 98 ], [ 98, 99 ], [ 99, 100 ], [ 16, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 106, 107 ], [ 106, 108 ], [ 6, 109 ], [ 109, 110 ] ]
[ "import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner (System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint sum=sc.nextInt();\n\t\t\tif(n==0&&sum==0)break;\n\t\t\tint count=0;\n\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count/6);\n\t\t}\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner (System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint sum=sc.nextInt();\n\t\t\tif(n==0&&sum==0)break;\n\t\t\tint count=0;\n\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count/6);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner (System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint sum=sc.nextInt();\n\t\t\tif(n==0&&sum==0)break;\n\t\t\tint count=0;\n\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count/6);\n\t\t}\n\t}", "main", "{\n\t\tScanner sc=new Scanner (System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint sum=sc.nextInt();\n\t\t\tif(n==0&&sum==0)break;\n\t\t\tint count=0;\n\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count/6);\n\t\t}\n\t}", "Scanner sc=new Scanner (System.in);", "sc", "new Scanner (System.in)", "while(sc.hasNextInt()){\n\t\t\tint n=sc.nextInt();\n\t\t\tint sum=sc.nextInt();\n\t\t\tif(n==0&&sum==0)break;\n\t\t\tint count=0;\n\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count/6);\n\t\t}", "sc.hasNextInt()", "sc.hasNextInt", "sc", "{\n\t\t\tint n=sc.nextInt();\n\t\t\tint sum=sc.nextInt();\n\t\t\tif(n==0&&sum==0)break;\n\t\t\tint count=0;\n\t\t\tfor(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count/6);\n\t\t}", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int sum=sc.nextInt();", "sum", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0&&sum==0)break;", "n==0&&sum==0", "n==0", "n", "0", "sum==0", "sum", "0", "break;", "int count=0;", "count", "0", "for(int i=1;i<=n;i++){\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j=1;j<=n;j++){\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j=1;", "int j=1;", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k=1;k<=n;k++){\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i+j+k==sum&&i!=j&&j!=k&&i!=k){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "i+j+k==sum&&i!=j&&j!=k&&i!=k", "j!=k", "i+j+k==sum&&i!=j&&j!=k&&i!=k", "i+j+k==sum", "i+j+k", "i+j+k", "i", "j", "k", "sum", "i!=j", "i", "j", "j!=k", "j", "k", "i!=k", "i", "k", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count/6)", "System.out.println", "System.out", "System", "System.out", "count/6", "count", "6", "String[] args", "args" ]
import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner sc=new Scanner (System.in); while(sc.hasNextInt()){ int n=sc.nextInt(); int sum=sc.nextInt(); if(n==0&&sum==0)break; int count=0; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ for(int k=1;k<=n;k++){ if(i+j+k==sum&&i!=j&&j!=k&&i!=k){ count++; } } } } System.out.println(count/6); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 2, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 114, 5 ], [ 114, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 63, 71 ], [ 71, 72 ], [ 72, 73 ], [ 63, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 85, 86 ], [ 85, 87 ], [ 76, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 90, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 14, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 105, 106 ], [ 105, 107 ], [ 8, 108 ], [ 108, 109 ], [ 109, 110 ], [ 6, 111 ], [ 111, 112 ], [ 0, 113 ], [ 113, 114 ], [ 113, 115 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}", "true", "{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b = sc.nextInt();", "b", "sc.nextInt()", "sc.nextInt", "sc", "if(a == 0 && b == 0) break;", "a == 0 && b == 0", "a == 0", "a", "0", "b == 0", "b", "0", "break;", "int ways = 0;", "ways", "0", "for(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= a", "i", "a", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= a", "j", "a", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= a", "k", "a", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "i != j && j != k && i != k", "i != j && j != k && i != k", "i != j", "i", "j", "j != k", "j", "k", "i != k", "i", "k", "{\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}", "(i + j + k) == b", "(i + j + k)", "i + j + k", "i", "j", "k", "b", "{\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}", "ways++", "ways", "System.out.println(ways/6)", "System.out.println", "System.out", "System", "System.out", "ways/6", "ways", "6", "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\t\t\n\t\twhile(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif(a == 0 && b == 0) break;\n\t\t\t\n\t\t\tint ways = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= a; i++){\n\t\t\t\tfor(int j = 1; j <= a; j++){\n\t\t\t\t\tfor(int k = 1; k <= a; k++){\n\t\t\t\t\t\tif(i != j && j != k && i != k){\n\t\t\t\t\t\t\tif((i + j + k) == b){\n\t\t\t\t\t\t\t\tways++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(ways/6);\n\t\t}\n\t\t\n\t\tsc.close();\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){ int a = sc.nextInt(); int b = sc.nextInt(); if(a == 0 && b == 0) break; int ways = 0; for(int i = 1; i <= a; i++){ for(int j = 1; j <= a; j++){ for(int k = 1; k <= a; k++){ if(i != j && j != k && i != k){ if((i + j + k) == b){ ways++; } } } } } System.out.println(ways/6); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 17, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 17, 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 ], [ 142, 11 ], [ 142, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 16, 20 ], [ 20, 21 ], [ 20, 22 ], [ 16, 23 ], [ 23, 24 ], [ 16, 25 ], [ 25, 26 ], [ 16, 27 ], [ 27, 28 ], [ 16, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 34, 39 ], [ 31, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 45, 46 ], [ 45, 47 ], [ 31, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 53, 55 ], [ 31, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 58, 60 ], [ 57, 61 ], [ 61, 62 ], [ 61, 63 ], [ 56, 64 ], [ 31, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 65, 75 ], [ 75, 76 ], [ 76, 77 ], [ 65, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 87, 88 ], [ 87, 89 ], [ 80, 90 ], [ 90, 91 ], [ 91, 92 ], [ 80, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 95, 102 ], [ 102, 103 ], [ 102, 104 ], [ 95, 105 ], [ 105, 106 ], [ 106, 107 ], [ 95, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 111, 117 ], [ 110, 118 ], [ 109, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 120, 126 ], [ 119, 127 ], [ 127, 128 ], [ 128, 129 ], [ 31, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 31, 136 ], [ 136, 137 ], [ 136, 138 ], [ 12, 139 ], [ 139, 140 ], [ 0, 141 ], [ 141, 142 ], [ 141, 143 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main {\n\n public static void main(String[] args) throws IOException {\n try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\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", "public class Main {\n\n public static void main(String[] args) throws IOException {\n try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }\n }", "main", "{\n try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }\n }", "try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }", "{\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in))", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in))", "new BufferedReader(new InputStreamReader(System.in))", "int count = 0;", "count", "0", "int n", "n", "x;", "x", "String[] lines;", "lines", "while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }", "true", "{\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }", "lines = br.readLine().split(\" \")", "lines", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "n = Integer.parseInt( lines[0] )", "n", "Integer.parseInt( lines[0] )", "Integer.parseInt", "Integer", "lines[0]", "lines", "0", "x = Integer.parseInt( lines[1] )", "x", "Integer.parseInt( lines[1] )", "Integer.parseInt", "Integer", "lines[1]", "lines", "1", "if( n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n-1", "i", "n-1", "n", "1", "i++", "i++", "i", "{\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }", "{\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }", "for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }", "{\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }", "for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }", "{\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }", "if ( (i + j + k) > x ) break;", "(i + j + k) > x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "break;", "if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }", "(i + j + k) == x", "(i + j + k)", "i + j + k", "i", "j", "k", "x", "{\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "count = 0", "count", "0", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) {\n\n int count = 0;\n int n,x;\n String[] lines;\n\n while(true){\n\n lines = br.readLine().split(\" \");\n n = Integer.parseInt( lines[0] );\n x = Integer.parseInt( lines[1] );\n if( n == 0 && x == 0) break;\n\n for( int i = 1; i < n-1; i++ ){\n for( int j = i+1; j < n; j++ ) {\n for( int k = j+1; k <= n; k++ ){\n if ( (i + j + k) > x ) break;\n if ( (i + j + k) == x ){\n count++;\n // System.out.println( i + \" \" + j + \" \" + k);\n }\n }\n }\n }\n System.out.println(count);\n count = 0;\n }\n }\n }\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 { try ( BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) ) { int count = 0; int n,x; String[] lines; while(true){ lines = br.readLine().split(" "); n = Integer.parseInt( lines[0] ); x = Integer.parseInt( lines[1] ); if( n == 0 && x == 0) break; for( int i = 1; i < n-1; i++ ){ for( int j = i+1; j < n; j++ ) { for( int k = j+1; k <= n; k++ ){ if ( (i + j + k) > x ) break; if ( (i + j + k) == x ){ count++; // System.out.println( i + " " + j + " " + k); } } } } System.out.println(count); count = 0; } } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 30, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 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 ], [ 130, 8 ], [ 130, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 23, 24 ], [ 20, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 31, 32 ], [ 31, 33 ], [ 17, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 17, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 42, 50 ], [ 50, 51 ], [ 17, 52 ], [ 52, 53 ], [ 52, 54 ], [ 17, 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 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 80, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 92, 93 ], [ 92, 94 ], [ 87, 95 ], [ 95, 96 ], [ 96, 97 ], [ 87, 98 ], [ 99, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 105, 107 ], [ 100, 108 ], [ 108, 109 ], [ 99, 110 ], [ 110, 111 ], [ 111, 112 ], [ 113, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 111, 117 ], [ 110, 118 ], [ 118, 119 ], [ 119, 120 ], [ 17, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 9, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }", "true", "{\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }", "String[] ar = br.readLine().split(\" \");", "ar", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int x = Integer.parseInt(ar[0]);", "x", "Integer.parseInt(ar[0])", "Integer.parseInt", "Integer", "ar[0]", "ar", "0", "int y = Integer.parseInt(ar[1]);", "y", "Integer.parseInt(ar[1])", "Integer.parseInt", "Integer", "ar[1]", "ar", "1", "if(x == 0 && y == 0){ break;\n }", "x == 0 && y == 0", "x == 0", "x", "0", "y == 0", "y", "0", "{ break;\n }", "break;", "int ans = 0;", "ans", "0", "for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= x", "i", "x", "i++", "i++", "i", "{\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }", "{\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }", "for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= x", "j", "x", "j++", "j++", "j", "{\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }", "{\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }", "if(i == j){break;\n }", "i == j", "i", "j", "{break;\n }", "break;", "for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= x", "k", "x", "k++", "k++", "k", "{\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }", "{\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }", "if(i == k || j == k){ break;\n }", "i == k || j == k", "i == k", "i", "k", "j == k", "j", "k", "{ break;\n }", "break;", "if(i+j+k == y){\n ans++;\n }", "i+j+k == y", "i+j+k", "i+j+k", "i", "j", "k", "y", "{\n ans++;\n }", "ans++", "ans", "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) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while(true){\n String[] ar = br.readLine().split(\" \");\n int x = Integer.parseInt(ar[0]);\n int y = Integer.parseInt(ar[1]);\n if(x == 0 && y == 0){ break;\n }\n int ans = 0;\n for(int i = 1; i <= x; i++){\n for(int j = 1; j <= x; j++){\n if(i == j){break;\n }\n for(int k = 1; k <= x; k++){\n if(i == k || j == k){ break;\n }\n if(i+j+k == y){\n ans++;\n }\n }\n }\n }\n System.out.println(ans);\n }\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)); while(true){ String[] ar = br.readLine().split(" "); int x = Integer.parseInt(ar[0]); int y = Integer.parseInt(ar[1]); if(x == 0 && y == 0){ break; } int ans = 0; for(int i = 1; i <= x; i++){ for(int j = 1; j <= x; j++){ if(i == j){break; } for(int k = 1; k <= x; k++){ if(i == k || j == k){ break; } if(i+j+k == y){ ans++; } } } } System.out.println(ans); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 4, 18, 18, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 2, 2, 13, 13, 13, 40, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 111, 5 ], [ 111, 6 ], [ 6, 7 ], [ 6, 8 ], [ 111, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 39, 42 ], [ 9, 43 ], [ 43, 44 ], [ 111, 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 ], [ 51, 59 ], [ 59, 60 ], [ 60, 61 ], [ 51, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 64, 74 ], [ 74, 75 ], [ 75, 76 ], [ 64, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 79, 86 ], [ 86, 87 ], [ 86, 88 ], [ 79, 89 ], [ 89, 90 ], [ 90, 91 ], [ 79, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 98, 98 ], [ 98, 99 ], [ 98, 100 ], [ 98, 101 ], [ 94, 102 ], [ 102, 103 ], [ 47, 104 ], [ 104, 105 ], [ 45, 106 ], [ 106, 107 ], [ 45, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main(String args[]){\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}\n\t}\n\tprivate static int challenge(int n,int x){\n\t\tint ways=0;\n\t\tfor(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ways;\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main(String args[]){\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}\n\t}\n\tprivate static int challenge(int n,int x){\n\t\tint ways=0;\n\t\tfor(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ways;\n\t}\n}", "Main", "private static Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "public static void main(String args[]){\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}\n\t}", "main", "{\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}\n\t}", "while(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}", "true", "{\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0&&x==0) break;", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "System.out.println(challenge(n,x))", "System.out.println", "System.out", "System", "System.out", "challenge(n,x)", "challenge", "n", "x", "String args[]", "args", "private static int challenge(int n,int x){\n\t\tint ways=0;\n\t\tfor(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ways;\n\t}", "challenge", "{\n\t\tint ways=0;\n\t\tfor(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ways;\n\t}", "int ways=0;", "ways", "0", "for(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}", "for(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}", "{\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}", "if(x==i+j+k) ways++;", "x==i+j+k", "x", "i+j+k", "i+j+k", "i", "j", "k", "ways++", "ways", "return ways;", "ways", "int n", "n", "int x", "x", "public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main(String args[]){\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}\n\t}\n\tprivate static int challenge(int n,int x){\n\t\tint ways=0;\n\t\tfor(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ways;\n\t}\n}", "public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tpublic static void main(String args[]){\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0) break;\n\t\t\tSystem.out.println(challenge(n,x));\n\t\t}\n\t}\n\tprivate static int challenge(int n,int x){\n\t\tint ways=0;\n\t\tfor(int i=1;i<=n;i++){\n\t\t\tfor(int j=i+1;j<=n;j++){\n\t\t\t\tfor(int k=j+1;k<=n;k++){\n\t\t\t\t\tif(x==i+j+k) ways++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ways;\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { private static Scanner sc=new Scanner(System.in); public static void main(String args[]){ while(true){ int n=sc.nextInt(); int x=sc.nextInt(); if(n==0&&x==0) break; System.out.println(challenge(n,x)); } } private static int challenge(int n,int x){ int ways=0; for(int i=1;i<=n;i++){ for(int j=i+1;j<=n;j++){ for(int k=j+1;k<=n;k++){ if(x==i+j+k) ways++; } } } return ways; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 41, 13, 17, 14, 2, 13, 17, 30, 4, 18, 18, 13, 13, 17, 30, 14, 2, 2, 13, 17, 13, 30, 11, 1, 41, 13, 13, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 17, 30, 40, 13, 30, 3, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 17, 30, 40, 13, 30, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 174, 5 ], [ 174, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 33, 34 ], [ 25, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 39, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 44, 49 ], [ 39, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 51, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 58, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 80, 81 ], [ 80, 82 ], [ 73, 83 ], [ 83, 84 ], [ 84, 85 ], [ 73, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 91, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 89, 95 ], [ 88, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 100, 100 ], [ 100, 101 ], [ 100, 102 ], [ 100, 103 ], [ 98, 104 ], [ 97, 105 ], [ 105, 106 ], [ 106, 107 ], [ 88, 108 ], [ 108, 109 ], [ 51, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 111, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 111, 123 ], [ 123, 124 ], [ 124, 125 ], [ 111, 126 ], [ 127, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 132, 134 ], [ 128, 135 ], [ 135, 136 ], [ 135, 137 ], [ 128, 138 ], [ 138, 139 ], [ 139, 140 ], [ 128, 141 ], [ 142, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 146, 146 ], [ 146, 147 ], [ 146, 148 ], [ 146, 149 ], [ 144, 150 ], [ 143, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 155, 155 ], [ 155, 156 ], [ 155, 157 ], [ 155, 158 ], [ 153, 159 ], [ 152, 160 ], [ 160, 161 ], [ 161, 162 ], [ 143, 163 ], [ 163, 164 ], [ 50, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 165, 170 ], [ 6, 171 ], [ 171, 172 ], [ 0, 173 ], [ 173, 174 ], [ 173, 175 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\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\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\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\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "true", "{\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}", "int count=0;", "count", "0", "if(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}", "x<6", "x", "6", "{\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}", "System.out.println(\"0\")", "System.out.println", "System.out", "System", "System.out", "\"0\"", "{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}", "if(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}", "x-3>n", "x-3", "x", "3", "n", "{\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int i=n;", "int i=n;", "i", "n", "i>x/3", "i", "x/3", "x", "3", "i--", "i--", "i", "{\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "for(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "int j=i-1;", "int j=i-1;", "j", "i-1", "i", "1", "j>1", "j", "1", "j--", "j--", "j", "{\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "if(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}", "x-i-j<j", "x-i-j", "x-i-j", "x", "i", "j", "j", "{\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "if(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}", "x-i-j>0", "x-i-j", "x-i-j", "x", "i", "j", "0", "{\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}", "count++", "count", "{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}", "break;", "{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}", "for(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int i=x-3;", "int i=x-3;", "i", "x-3", "x", "3", "i>x/3", "i", "x/3", "x", "3", "i--", "i--", "i", "{\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "for(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "int j=i-1;", "int j=i-1;", "j", "i-1", "i", "1", "j>1", "j", "1", "j--", "j--", "j", "{\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "if(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}", "x-i-j<j", "x-i-j", "x-i-j", "x", "i", "j", "j", "{\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "if(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}", "x-i-j>0", "x-i-j", "x-i-j", "x", "i", "j", "0", "{\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}", "count++", "count", "{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}", "break;", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\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\twhile(true){\n\t\t\tint n=sc.nextInt();\n\t\t\tint x=sc.nextInt();\n\t\t\tif(n==0&&x==0){\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tint count=0;\n\t\t\t\tif(x<6){\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}else{\n\t\t\t\t\tif(x-3>n){\n\t\t\t\t\t\tfor(int i=n;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(int i=x-3;i>x/3;i--){\n\t\t\t\t\t\t\tfor(int j=i-1;j>1;j--){\n\t\t\t\t\t\t\t\tif(x-i-j<j){\n\t\t\t\t\t\t\t\t\tif(x-i-j>0){\n\t\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(count);\n\t\t\t\t}\n\t\t\t}\n\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(true){ int n=sc.nextInt(); int x=sc.nextInt(); if(n==0&&x==0){ break; }else{ int count=0; if(x<6){ System.out.println("0"); }else{ if(x-3>n){ for(int i=n;i>x/3;i--){ for(int j=i-1;j>1;j--){ if(x-i-j<j){ if(x-i-j>0){ count++; } }else{ break; } } } }else{ for(int i=x-3;i>x/3;i--){ for(int j=i-1;j>1;j--){ if(x-i-j<j){ if(x-i-j>0){ count++; } }else{ break; } } } } System.out.println(count); } } } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 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 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 17, 28 ], [ 28, 29 ], [ 28, 30 ], [ 17, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 17, 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 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 56, 63 ], [ 63, 64 ], [ 63, 65 ], [ 56, 66 ], [ 66, 67 ], [ 67, 68 ], [ 56, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 74, 74 ], [ 74, 75 ], [ 74, 76 ], [ 74, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 17, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 89, 94 ], [ 9, 95 ], [ 95, 96 ] ]
[ "import java.util.Scanner;\nimport java.util.Arrays;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint n = scanner.nextInt();\n\t\t\tint x = scanner.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint n = scanner.nextInt();\n\t\t\tint x = scanner.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args){\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint n = scanner.nextInt();\n\t\t\tint x = scanner.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\twhile(true){\n\t\t\tint n = scanner.nextInt();\n\t\t\tint x = scanner.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "while(true){\n\t\t\tint n = scanner.nextInt();\n\t\t\tint x = scanner.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tint n = scanner.nextInt();\n\t\t\tint x = scanner.nextInt();\n\t\t\tint count = 0;\n\n\t\t\tif(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tfor(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "int x = scanner.nextInt();", "x", "scanner.nextInt()", "scanner.nextInt", "scanner", "int count = 0;", "count", "0", "if(n == 0 && x == 0){\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for(int i = 1; i < x/3; i++){\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < x/3", "i", "x/3", "x", "3", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = i+1; j < n; j++){\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tint k = x - i - j;\n\t\t\t\t\tif(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}\n\t\t\t\t}", "int k = x - i - j;", "k", "x - i - j", "x - i - j", "x", "i", "j", "if(k > j && k <= n){\n\t\t\t\t\t count ++;\n\t\t\t\t\t}", "k > j && k <= n", "k > j", "k", "j", "k <= n", "k", "n", "{\n\t\t\t\t\t count ++;\n\t\t\t\t\t}", "count ++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args" ]
import java.util.Scanner; import java.util.Arrays; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); while(true){ int n = scanner.nextInt(); int x = scanner.nextInt(); int count = 0; if(n == 0 && x == 0){ break; } for(int i = 1; i < x/3; i++){ for(int j = i+1; j < n; j++){ int k = x - i - j; if(k > j && k <= n){ count ++; } } } System.out.println(count); } } }
[ 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, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 13, 30, 14, 2, 2, 2, 2, 13, 13, 13, 13, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 105, 5 ], [ 105, 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 ], [ 16, 27 ], [ 27, 28 ], [ 27, 29 ], [ 16, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 16, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 47, 49 ], [ 40, 50 ], [ 50, 51 ], [ 51, 52 ], [ 40, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 55, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 70, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 81, 81 ], [ 81, 82 ], [ 81, 83 ], [ 81, 84 ], [ 79, 85 ], [ 78, 86 ], [ 86, 87 ], [ 88, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 86, 92 ], [ 77, 93 ], [ 93, 94 ], [ 94, 95 ], [ 16, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 6, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}\n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}\n }", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}", "sc.hasNextInt()", "sc.hasNextInt", "sc", "{\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int c = 0;", "c", "0", "if (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "if (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "i + j < x", "i + j", "i", "j", "x", "{\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}", "x - i - j <= n && x - i - j > j", "x - i - j <= n", "x - i - j", "x - i - j", "x", "i", "j", "n", "x - i - j > j", "x - i - j", "x - i - j", "x", "i", "j", "j", "{\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}", "c++", "c", "System.out.println(c)", "System.out.println", "System.out", "System", "System.out", "c", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNextInt()) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint c = 0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (int i = 1; i < n - 1; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\t\tif (i + j < x) {\n\t\t\t\t\t\tif (x - i - j <= n && x - i - j > j) {\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(c);\n\t\t}\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { int n = sc.nextInt(); int x = sc.nextInt(); int c = 0; if (n == 0 && x == 0) { break; } for (int i = 1; i < n - 1; i++) { for (int j = i + 1; j <= n; j++) { if (i + j < x) { if (x - i - j <= n && x - i - j > j) { c++; } } } } System.out.println(c); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 17, 41, 13, 41, 13, 41, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 13, 11, 1, 41, 13, 2, 17, 13, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 17, 30, 0, 13, 17, 11, 1, 41, 13, 2, 17, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 17, 30, 0, 13, 2, 13, 13, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 0, 13, 13, 14, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 155, 5 ], [ 155, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 14, 16 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 21, 23 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 38, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 26, 46 ], [ 46, 47 ], [ 46, 48 ], [ 26, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 61, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 65, 72 ], [ 72, 73 ], [ 72, 74 ], [ 65, 75 ], [ 75, 76 ], [ 76, 77 ], [ 65, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 83, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 79, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 105, 106 ], [ 105, 107 ], [ 98, 108 ], [ 108, 109 ], [ 109, 110 ], [ 98, 111 ], [ 112, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 120, 122 ], [ 117, 123 ], [ 123, 124 ], [ 125, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 129, 130 ], [ 129, 131 ], [ 125, 132 ], [ 132, 133 ], [ 132, 134 ], [ 123, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 139, 143 ], [ 143, 144 ], [ 144, 145 ], [ 26, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 146, 151 ], [ 6, 152 ], [ 152, 153 ], [ 0, 154 ], [ 154, 155 ], [ 154, 156 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String [] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint sum, count = 0;\n\t\tint n, x;\n\t\tboolean flg = true;\n\t\t\n\t\twhile(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\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 sum, count = 0;\n\t\tint n, x;\n\t\tboolean flg = true;\n\t\t\n\t\twhile(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t}\n}", "Main", "public static void main(String [] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint sum, count = 0;\n\t\tint n, x;\n\t\tboolean flg = true;\n\t\t\n\t\twhile(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint sum, count = 0;\n\t\tint n, x;\n\t\tboolean flg = true;\n\t\t\n\t\twhile(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\n\t\t\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int sum", "sum", "count = 0;", "count", "0", "int n", "n", "x;", "x", "boolean flg = true;", "flg", "true", "while(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}", "true", "{\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}", "n = scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "x = scan.nextInt()", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(n == 0 && x == 0)break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "count = 0", "count", "0", "for(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "sum = i", "sum", "i", "for(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 1 + i;", "int j = 1 + i;", "j", "1 + i", "1", "i", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}", "sum = i", "sum", "i", "if( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}", "j != i", "j", "i", "{\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}", "sum += j", "sum", "j", "flg = true", "flg", "true", "{\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}", "flg = false", "flg", "false", "for(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "int k = 1 + j;", "int k = 1 + j;", "k", "1 + j", "1", "j", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}", "if( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "flg == true", "flg", "true", "{\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "sum = i + j", "sum", "i + j", "i", "j", "if( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "i != j && i != k && j != k", "i != j && i != k && j != k", "i != j", "i", "j", "i != k", "i", "k", "j != k", "j", "k", "{\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "sum += k", "sum", "k", "if( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}", "x == sum", "x", "sum", "{\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String [] args", "args", "public class Main {\n\tpublic static void main(String [] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint sum, count = 0;\n\t\tint n, x;\n\t\tboolean flg = true;\n\t\t\n\t\twhile(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\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 sum, count = 0;\n\t\tint n, x;\n\t\tboolean flg = true;\n\t\t\n\t\twhile(true) {\n\t\t\tn = scan.nextInt();\n\t\t\tx = scan.nextInt();\n\t\t\t\n\t\t\tif(n == 0 && x == 0)break;\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\tfor(int i = 1; i <= n; i++) {\n\t\t\t\tsum = i;\n\t\t\t\tfor(int j = 1 + i; j <= n; j++) {\n\t\t\t\t\tsum = i;\n\t\t\t\t\tif( j != i) {\n\t\t\t\t\t\tsum += j;\n\t\t\t\t\t\tflg = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tflg = false;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int k = 1 + j; k <= n; k++) {\n\t\t\t\t\t\tif( flg == true) {\n\t\t\t\t\t\t\tsum = i + j;\n\t\t\t\t\t\t\tif( i != j && i != k && j != k) {\n\t\t\t\t\t\t\t\tsum += k;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( x == sum) {\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(count);\n\t\t\t\n\t\t}\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 sum, count = 0; int n, x; boolean flg = true; while(true) { n = scan.nextInt(); x = scan.nextInt(); if(n == 0 && x == 0)break; count = 0; for(int i = 1; i <= n; i++) { sum = i; for(int j = 1 + i; j <= n; j++) { sum = i; if( j != i) { sum += j; flg = true; }else { flg = false; } for(int k = 1 + j; k <= n; k++) { if( flg == true) { sum = i + j; if( i != j && i != k && j != k) { sum += k; if( x == sum) { count++; } } } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 41, 13, 17, 0, 13, 4, 18, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 120, 5 ], [ 120, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 17, 18 ], [ 18, 19 ], [ 16, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 26, 29 ], [ 29, 30 ], [ 30, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 38, 39 ], [ 20, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 40, 48 ], [ 20, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 49, 59 ], [ 59, 60 ], [ 60, 61 ], [ 49, 62 ], [ 63, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 64, 76 ], [ 76, 77 ], [ 77, 78 ], [ 64, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 81, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 81, 93 ], [ 93, 94 ], [ 94, 95 ], [ 81, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 101, 101 ], [ 101, 102 ], [ 101, 103 ], [ 101, 104 ], [ 99, 105 ], [ 98, 106 ], [ 106, 107 ], [ 20, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 8, 114 ], [ 114, 115 ], [ 115, 116 ], [ 6, 117 ], [ 117, 118 ], [ 0, 119 ], [ 119, 120 ], [ 119, 121 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\tint n, x;\n\t\twhile (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tsc.close();\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\t\tint n, x;\n\t\twhile (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tsc.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\tint n, x;\n\t\twhile (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tsc.close();\n\t}", "main", "{\n\t\tScanner sc= new Scanner(System.in);\n\t\tint n, x;\n\t\twhile (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tsc.close();\n\t}", "Scanner sc= new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n", "n", "x;", "x", "while (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "sc.hasNext()", "sc.hasNext", "sc", "{\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int count = 0;", "count", "0", "n = Integer.parseInt(sc.next())", "n", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "x = Integer.parseInt(sc.next())", "x", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "if (n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "for (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i < n+1", "i", "n+1", "n", "1", "i++", "i++", "i", "{\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j < n+1", "j", "n+1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k < n+1", "k", "n+1", "n", "1", "k++", "k++", "k", "{\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}", "if (i + j + k == x) count++;", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "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\tint n, x;\n\t\twhile (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\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\tint n, x;\n\t\twhile (sc.hasNext()) {\n\t\t\tint count = 0;\n\t\t\tn = Integer.parseInt(sc.next());\n\t\t\tx = Integer.parseInt(sc.next());\n\t\t\tif (n == 0 && x == 0) break;\n\t\t\tfor (int i=1; i < n+1; i++) {\n\t\t\t\tfor (int j=i+1; j < n+1; j++) {\n\t\t\t\t\tfor (int k=j+1; k < n+1; k++) {\n\t\t\t\t\t\tif (i + j + k == x) count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tsc.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc= new Scanner(System.in); int n, x; while (sc.hasNext()) { int count = 0; n = Integer.parseInt(sc.next()); x = Integer.parseInt(sc.next()); if (n == 0 && x == 0) break; for (int i=1; i < n+1; i++) { for (int j=i+1; j < n+1; j++) { for (int k=j+1; k < n+1; k++) { if (i + j + k == x) count++; } } } System.out.println(count); } sc.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 14, 4, 18, 13, 17, 30, 3, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 41, 13, 39, 13, 13, 13, 4, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 14, 2, 2, 4, 18, 13, 17, 4, 18, 13, 4, 18, 13, 13, 13, 30, 0, 13, 17, 14, 40, 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 ], [ 183, 8 ], [ 183, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 17, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 23, 28 ], [ 28, 29 ], [ 17, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 32, 35 ], [ 17, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 41, 42 ], [ 41, 43 ], [ 17, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 49, 50 ], [ 49, 51 ], [ 17, 52 ], [ 52, 53 ], [ 52, 54 ], [ 17, 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 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 91, 92 ], [ 91, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 86, 97 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 111, 111 ], [ 111, 112 ], [ 111, 113 ], [ 111, 114 ], [ 109, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 119, 122 ], [ 116, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 116, 127 ], [ 127, 128 ], [ 127, 129 ], [ 116, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 138, 139 ], [ 130, 140 ], [ 140, 141 ], [ 141, 142 ], [ 130, 143 ], [ 144, 144 ], [ 144, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 147, 151 ], [ 146, 152 ], [ 152, 153 ], [ 153, 154 ], [ 152, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 152, 159 ], [ 145, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 116, 164 ], [ 164, 165 ], [ 165, 166 ], [ 164, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 168, 171 ], [ 17, 172 ], [ 172, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 172, 177 ], [ 177, 178 ], [ 178, 179 ], [ 9, 180 ], [ 180, 181 ], [ 0, 182 ], [ 182, 183 ], [ 182, 184 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t */\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\twhile(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}\n\t}\n\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t */\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\twhile(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}\n\t}\n\n}", "Main", "/**\n\t * @param args\n\t * @throws IOException \n\t */\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\twhile(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\twhile(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}", "true", "{\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}", "String input = br.readLine();", "input", "br.readLine()", "br.readLine", "br", "if(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}", "input.equals(\"0 0\")", "input.equals", "input", "\"0 0\"", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "String[] numbers = input.split(\" \");", "numbers", "input.split(\" \")", "input.split", "input", "\" \"", "Integer max = Integer.parseInt(numbers[0]);", "max", "Integer.parseInt(numbers[0])", "Integer.parseInt", "Integer", "numbers[0]", "numbers", "0", "Integer target = Integer.parseInt(numbers[1]);", "target", "Integer.parseInt(numbers[1])", "Integer.parseInt", "Integer", "numbers[1]", "numbers", "1", "ArrayList<Integer[]> result = new ArrayList<Integer[]>();", "result", "new ArrayList<Integer[]>()", "for(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= max", "i", "max", "i++", "i++", "i", "{\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= max", "j", "max", "j++", "j++", "j", "{\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "if(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "j != i", "j", "i", "{\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "for(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= max", "k", "max", "k++", "k++", "k", "{\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "k != i && k != j", "k != i", "k", "i", "k != j", "k", "j", "{\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "if(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "i + j + k == target", "i + j + k", "i + j + k", "i", "j", "k", "target", "{\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "Integer[] comb = {i, j, k};", "comb", "{i, j, k}", "i", "j", "k", "Arrays.sort(comb)", "Arrays.sort", "Arrays", "comb", "boolean is_contain = false;", "is_contain", "false", "for(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "int l = 0;", "int l = 0;", "l", "0", "l< result.size()", "l", "result.size()", "result.size", "result", "l++", "l++", "l", "{\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "if(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}", "result.size() > 0 && Arrays.equals(result.get(l), comb)", "result.size() > 0", "result.size()", "result.size", "result", "0", "Arrays.equals(result.get(l), comb)", "Arrays.equals", "Arrays", "result.get(l)", "result.get", "result", "l", "comb", "{\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}", "is_contain = true", "is_contain", "true", "if(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}", "!is_contain", "is_contain", "{\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}", "result.add(comb)", "result.add", "result", "comb", "System.out.println(result.size())", "System.out.println", "System.out", "System", "System.out", "result.size()", "result.size", "result", "String[] args", "args", "public class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t */\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\twhile(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}\n\t}\n\n}", "public class Main {\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t */\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\twhile(true){\n\t\t\tString input = br.readLine();\n\t\t\tif(input.equals(\"0 0\")){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString[] numbers = input.split(\" \");\n\t\t\tInteger max = Integer.parseInt(numbers[0]);\n\t\t\tInteger target = Integer.parseInt(numbers[1]);\n\t\t\tArrayList<Integer[]> result = new ArrayList<Integer[]>();\n\t\t\tfor(int i = 1; i <= max; i++){\n\t\t\t\tfor(int j = 1; j <= max; j++){\n\t\t\t\t\tif(j != i){\n\t\t\t\t\t\tfor(int k = 1; k <= max; k++){\n\t\t\t\t\t\t\tif(k != i && k != j){\n\t\t\t\t\t\t\t\tif(i + j + k == target){\n\t\t\t\t\t\t\t\t\tInteger[] comb = {i, j, k};\n\t\t\t\t\t\t\t\t\tArrays.sort(comb);\n\t\t\t\t\t\t\t\t\tboolean is_contain = false;\n\t\t\t\t\t\t\t\t\tfor(int l = 0; l< result.size(); l++){\n\t\t\t\t\t\t\t\t\t\tif(result.size() > 0 && Arrays.equals(result.get(l), comb)){\n\t\t\t\t\t\t\t\t\t\t\tis_contain = true;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!is_contain){\n\t\t\t\t\t\t\t\t\t\tresult.add(comb);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(result.size());\n\t\t}\n\t}\n\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true){ String input = br.readLine(); if(input.equals("0 0")){ break; } String[] numbers = input.split(" "); Integer max = Integer.parseInt(numbers[0]); Integer target = Integer.parseInt(numbers[1]); ArrayList<Integer[]> result = new ArrayList<Integer[]>(); for(int i = 1; i <= max; i++){ for(int j = 1; j <= max; j++){ if(j != i){ for(int k = 1; k <= max; k++){ if(k != i && k != j){ if(i + j + k == target){ Integer[] comb = {i, j, k}; Arrays.sort(comb); boolean is_contain = false; for(int l = 0; l< result.size(); l++){ if(result.size() > 0 && Arrays.equals(result.get(l), comb)){ is_contain = true; } } if(!is_contain){ result.add(comb); } } } } } } } System.out.println(result.size()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 20, 17, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 17, 13, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 17, 13, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 17, 13, 14, 2, 2, 2, 18, 13, 17, 18, 13, 17, 18, 13, 17, 13, 30, 40, 13, 4, 18, 4, 18, 13, 13, 17, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 152, 5 ], [ 152, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 8, 15 ], [ 15, 16 ], [ 15, 17 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 24, 29 ], [ 21, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 32, 35 ], [ 35, 36 ], [ 35, 37 ], [ 21, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 40, 43 ], [ 43, 44 ], [ 43, 45 ], [ 21, 46 ], [ 46, 47 ], [ 46, 48 ], [ 21, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 21, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 59, 67 ], [ 67, 68 ], [ 68, 69 ], [ 59, 70 ], [ 71, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 77, 84 ], [ 84, 85 ], [ 84, 86 ], [ 77, 87 ], [ 87, 88 ], [ 88, 89 ], [ 77, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 91, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 97, 104 ], [ 104, 105 ], [ 104, 106 ], [ 97, 107 ], [ 107, 108 ], [ 108, 109 ], [ 97, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 111, 117 ], [ 117, 118 ], [ 118, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 120, 124 ], [ 124, 125 ], [ 124, 126 ], [ 120, 127 ], [ 127, 128 ], [ 127, 129 ], [ 118, 130 ], [ 117, 131 ], [ 131, 132 ], [ 132, 133 ], [ 21, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 136, 139 ], [ 134, 140 ], [ 8, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 141, 146 ], [ 146, 147 ], [ 147, 148 ], [ 6, 149 ], [ 149, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "import java.io.*;\n\npublic class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n int[] num = new int[3];\n\n while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }\n System.out.print(sb.toString());\n }\n}", "import java.io.*;", "io.*", "java", "public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n int[] num = new int[3];\n\n while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }\n System.out.print(sb.toString());\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n int[] num = new int[3];\n\n while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }\n System.out.print(sb.toString());\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n int[] num = new int[3];\n\n while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }\n System.out.print(sb.toString());\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "int[] num = new int[3];", "num", "new int[3]", "3", "while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }", "true", "{\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }", "String[] line = br.readLine().split(\" \");", "line", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(line[0]);", "n", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "int x = Integer.parseInt(line[1]);", "x", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "int cnt = 0;", "cnt", "0", "if(n == 0 && x == 0){\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }", "{\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }", "num[0] = i", "num[0]", "num", "0", "i", "for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }", "int j = i+1;", "int j = i+1;", "j", "i+1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }", "{\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }", "num[1] = j", "num[1]", "num", "1", "j", "for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }", "{\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }", "num[2] = k", "num[2]", "num", "2", "k", "if(num[0] + num[1] + num[2] == x){\n cnt++;\n }", "num[0] + num[1] + num[2] == x", "num[0] + num[1] + num[2]", "num[0] + num[1] + num[2]", "num[0]", "num", "0", "num[1]", "num", "1", "num[2]", "num", "2", "x", "{\n cnt++;\n }", "cnt++", "cnt", "sb.append(cnt).append(\"\\n\")", "sb.append(cnt).append", "sb.append(cnt)", "sb.append", "sb", "cnt", "\"\\n\"", "System.out.print(sb.toString())", "System.out.print", "System.out", "System", "System.out", "sb.toString()", "sb.toString", "sb", "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 StringBuilder sb = new StringBuilder();\n int[] num = new int[3];\n\n while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }\n System.out.print(sb.toString());\n }\n}", "public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n int[] num = new int[3];\n\n while(true){\n String[] line = br.readLine().split(\" \");\n int n = Integer.parseInt(line[0]);\n int x = Integer.parseInt(line[1]);\n int cnt = 0;\n\n if(n == 0 && x == 0){\n break;\n }\n for(int i = 1; i <= n; i++){\n num[0] = i;\n for(int j = i+1; j <= n; j++){\n num[1] = j;\n for(int k = j+1; k <= n; k++){\n num[2] = k;\n if(num[0] + num[1] + num[2] == x){\n cnt++;\n }\n }\n }\n }\n sb.append(cnt).append(\"\\n\");\n }\n System.out.print(sb.toString());\n }\n}", "Main" ]
import java.io.*; public class Main{ public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int[] num = new int[3]; while(true){ String[] line = br.readLine().split(" "); int n = Integer.parseInt(line[0]); int x = Integer.parseInt(line[1]); int cnt = 0; if(n == 0 && x == 0){ break; } for(int i = 1; i <= n; i++){ num[0] = i; for(int j = i+1; j <= n; j++){ num[1] = j; for(int k = j+1; k <= n; k++){ num[2] = k; if(num[0] + num[1] + num[2] == x){ cnt++; } } } } sb.append(cnt).append("\n"); } System.out.print(sb.toString()); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 41, 13, 17, 11, 1, 41, 13, 4, 18, 13, 17, 2, 2, 13, 13, 2, 13, 17, 2, 13, 4, 18, 13, 2, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 4, 18, 13, 2, 13, 17, 2, 2, 13, 13, 13, 2, 13, 4, 18, 13, 2, 13, 17, 2, 2, 13, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 152, 11 ], [ 152, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 23, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 20, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 39, 42 ], [ 42, 43 ], [ 42, 44 ], [ 20, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 20, 55 ], [ 55, 56 ], [ 55, 57 ], [ 20, 58 ], [ 58, 59 ], [ 58, 60 ], [ 20, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 65, 69 ], [ 70, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 61, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 81, 83 ], [ 78, 84 ], [ 84, 85 ], [ 84, 86 ], [ 61, 87 ], [ 87, 88 ], [ 88, 89 ], [ 61, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 96, 99 ], [ 99, 100 ], [ 99, 101 ], [ 96, 102 ], [ 103, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 92, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 109, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 92, 120 ], [ 120, 121 ], [ 121, 122 ], [ 92, 123 ], [ 124, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 128, 128 ], [ 128, 129 ], [ 128, 130 ], [ 128, 131 ], [ 124, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 137, 138 ], [ 137, 139 ], [ 132, 140 ], [ 140, 141 ], [ 141, 142 ], [ 20, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 143, 148 ], [ 12, 149 ], [ 149, 150 ], [ 0, 151 ], [ 151, 152 ], [ 151, 153 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }\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 public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }", "true", "{\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }", "String[] lines = br.readLine().split(\" \");", "lines", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "int n = Integer.parseInt(lines[0]);", "n", "Integer.parseInt(lines[0])", "Integer.parseInt", "Integer", "lines[0]", "lines", "0", "int x = Integer.parseInt(lines[1]);", "x", "Integer.parseInt(lines[1])", "Integer.parseInt", "Integer", "lines[1]", "lines", "1", "if (n == 0 && x == 0) {\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "int count = 0;", "count", "0", "int m = 0;", "m", "0", "for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }", "int i = Math.max(1, x - n - (n - 1));", "int i = Math.max(1, x - n - (n - 1));", "i", "Math.max(1, x - n - (n - 1))", "Math.max", "Math", "1", "x - n - (n - 1)", "x - n - (n - 1)", "x", "n", "(n - 1)", "n", "1", "i <= Math.min(n - 2, x / 3)", "i", "Math.min(n - 2, x / 3)", "Math.min", "Math", "n - 2", "n", "2", "x / 3", "x", "3", "i++", "i++", "i", "{\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }", "{\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }", "for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }", "int j = Math.max(i + 1, x - n - i);", "int j = Math.max(i + 1, x - n - i);", "j", "Math.max(i + 1, x - n - i)", "Math.max", "Math", "i + 1", "i", "1", "x - n - i", "x - n - i", "x", "n", "i", "j <= Math.min(n - 1, (x - i) / 2)", "j", "Math.min(n - 1, (x - i) / 2)", "Math.min", "Math", "n - 1", "n", "1", "(x - i) / 2", "(x - i)", "x", "i", "2", "j++", "j++", "j", "{\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }", "{\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }", "int k = x - i - j;", "k", "x - i - j", "x - i - j", "x", "i", "j", "if (k <= n && k > j) {\n count++;\n }", "k <= n && k > j", "k <= n", "k", "n", "k > j", "k", "j", "{\n count++;\n }", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }\n}", "public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n while (true) {\n String[] lines = br.readLine().split(\" \");\n int n = Integer.parseInt(lines[0]);\n int x = Integer.parseInt(lines[1]);\n if (n == 0 && x == 0) {\n break;\n }\n int count = 0;\n int m = 0;\n for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) {\n for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) {\n int k = x - i - j;\n if (k <= n && k > j) {\n count++;\n }\n }\n }\n System.out.println(count);\n }\n }\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 br = new BufferedReader(new InputStreamReader(System.in)); while (true) { String[] lines = br.readLine().split(" "); int n = Integer.parseInt(lines[0]); int x = Integer.parseInt(lines[1]); if (n == 0 && x == 0) { break; } int count = 0; int m = 0; for (int i = Math.max(1, x - n - (n - 1)); i <= Math.min(n - 2, x / 3); i++) { for (int j = Math.max(i + 1, x - n - i); j <= Math.min(n - 1, (x - i) / 2); j++) { int k = x - i - j; if (k <= n && k > j) { count++; } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 2, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 2, 2, 13, 13, 2, 2, 13, 13, 13, 2, 2, 13, 13, 2, 17, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 16, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 16, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 28, 32 ], [ 32, 33 ], [ 32, 34 ], [ 27, 35 ], [ 35, 36 ], [ 16, 37 ], [ 37, 38 ], [ 37, 39 ], [ 16, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 49, 51 ], [ 40, 52 ], [ 52, 53 ], [ 53, 54 ], [ 40, 55 ], [ 56, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 57, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 65, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 78, 80 ], [ 57, 81 ], [ 81, 82 ], [ 82, 83 ], [ 57, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 89, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 87, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 16, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 6, 103 ], [ 103, 104 ] ]
[ "import java.util.*;\n\nclass Main {\n public static void main(String args[]) {\n try (Scanner sc = new Scanner(System.in)) {\n while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n }\n}", "import java.util.*;", "util.*", "java", "class Main {\n public static void main(String args[]) {\n try (Scanner sc = new Scanner(System.in)) {\n while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n }\n}", "Main", "public static void main(String args[]) {\n try (Scanner sc = new Scanner(System.in)) {\n while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n }", "main", "{\n try (Scanner sc = new Scanner(System.in)) {\n while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }\n }", "try (Scanner sc = new Scanner(System.in)) {\n while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }", "{\n while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }\n }", "Scanner sc = new Scanner(System.in)", "Scanner sc = new Scanner(System.in)", "new Scanner(System.in)", "while (true) {\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }", "true", "{\n int n = sc.nextInt(), x = sc.nextInt();\n if (n == 0 && x == 0) {\n break;\n }\n int ans = 0;\n for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }\n System.out.println(ans);\n }", "int n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if (n == 0 && x == 0) {\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "int ans = 0;", "ans", "0", "for (int i = 1; i <= n && i <= x; i++) {\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n && i <= x", "i <= n", "i", "n", "i <= x", "i", "x", "i++", "i++", "i", "{\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }", "{\n for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }\n }", "for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) {\n if (x - i - j <= n) {\n ans++;\n }\n }", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j < n && i + j <= x && x - i > 2 * j", "j < n && i + j <= x && x - i > 2 * j", "j < n", "j", "n", "i + j <= x", "i + j", "i", "j", "x", "x - i > 2 * j", "x - i", "x", "i", "2 * j", "2", "j", "j++", "j++", "j", "{\n if (x - i - j <= n) {\n ans++;\n }\n }", "{\n if (x - i - j <= n) {\n ans++;\n }\n }", "if (x - i - j <= n) {\n ans++;\n }", "x - i - j <= n", "x - i - j", "x - i - j", "x", "i", "j", "n", "{\n ans++;\n }", "ans++", "ans", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String args[]", "args" ]
import java.util.*; class Main { public static void main(String args[]) { try (Scanner sc = new Scanner(System.in)) { while (true) { int n = sc.nextInt(), x = sc.nextInt(); if (n == 0 && x == 0) { break; } int ans = 0; for (int i = 1; i <= n && i <= x; i++) { for (int j = i + 1; j < n && i + j <= x && x - i > 2 * j; j++) { if (x - i - j <= n) { ans++; } } } System.out.println(ans); } } } }
[ 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, 42, 17, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 2, 2, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 115, 5 ], [ 115, 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 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 36, 37 ], [ 36, 38 ], [ 31, 39 ], [ 39, 40 ], [ 40, 41 ], [ 31, 42 ], [ 43, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 44, 51 ], [ 51, 52 ], [ 51, 53 ], [ 44, 54 ], [ 54, 55 ], [ 55, 56 ], [ 44, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 59, 66 ], [ 66, 67 ], [ 66, 68 ], [ 59, 69 ], [ 69, 70 ], [ 70, 71 ], [ 59, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 78, 78 ], [ 78, 79 ], [ 78, 80 ], [ 78, 81 ], [ 74, 82 ], [ 82, 83 ], [ 27, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 84, 89 ], [ 27, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 27, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 27, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 105, 107 ], [ 100, 108 ], [ 8, 109 ], [ 109, 110 ], [ 110, 111 ], [ 6, 112 ], [ 112, 113 ], [ 0, 114 ], [ 114, 115 ], [ 114, 116 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint x = scan.nextInt();\n\t\tint count=0;\n\t\t while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}\n\t\tscan.close();\n\t}\n\n}\n", "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\n\t\tint n = scan.nextInt();\n\t\tint x = scan.nextInt();\n\t\tint count=0;\n\t\t while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}\n\t\tscan.close();\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint x = scan.nextInt();\n\t\tint count=0;\n\t\t while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint x = scan.nextInt();\n\t\tint count=0;\n\t\t while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "int count=0;", "count", "0", "while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}", "true", "{\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}", "count = 0", "count", "0", "for(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}", "for(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}", "int h=j+1;", "int h=j+1;", "h", "j+1", "j", "1", "h<=n", "h", "n", "h++", "h++", "h", "{\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}", "{\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}", "if(x ==i+j+h )count ++;", "x ==i+j+h", "x", "i+j+h", "i+j+h", "i", "j", "h", "count ++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "n = scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "x = scan.nextInt()", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "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\n\t\tint n = scan.nextInt();\n\t\tint x = scan.nextInt();\n\t\tint count=0;\n\t\t while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}\n\t\tscan.close();\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint n = scan.nextInt();\n\t\tint x = scan.nextInt();\n\t\tint count=0;\n\t\t while(true) {\n\t\t count = 0;\n\t\tfor(int i=1;i<=n;i++) {\n\t\t\tfor(int j=i+1;j<=n;j++) {\n\t\t\t\tfor(int h=j+1;h<=n;h++) {\n\t\t\t\t\tif(x ==i+j+h )count ++;\n\t\t\t\t\t//System.out.println(i + \" \" + j + \" \" +h);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(count);\n\t\tn = scan.nextInt();\n\t\tx = scan.nextInt();\n\t\tif(n == 0 && x == 0) break;\n\t\t}\n\t\tscan.close();\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); int x = scan.nextInt(); int count=0; while(true) { count = 0; for(int i=1;i<=n;i++) { for(int j=i+1;j<=n;j++) { for(int h=j+1;h<=n;h++) { if(x ==i+j+h )count ++; //System.out.println(i + " " + j + " " +h); } } } System.out.println(count); n = scan.nextInt(); x = scan.nextInt(); if(n == 0 && x == 0) break; } scan.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 4, 18, 18, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 17, 2, 2, 13, 13, 13, 30, 0, 13, 2, 13, 17, 29, 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 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 17, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 28, 30 ], [ 14, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 33, 36 ], [ 36, 37 ], [ 36, 38 ], [ 14, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 44, 46 ], [ 39, 47 ], [ 47, 48 ], [ 14, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 54, 57 ], [ 6, 58 ], [ 58, 59 ], [ 4, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 71, 72 ], [ 71, 73 ], [ 66, 74 ], [ 74, 75 ], [ 75, 76 ], [ 66, 77 ], [ 78, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 79, 84 ], [ 84, 85 ], [ 84, 86 ], [ 79, 87 ], [ 87, 88 ], [ 88, 89 ], [ 79, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 97, 98 ], [ 97, 99 ], [ 92, 100 ], [ 100, 101 ], [ 101, 102 ], [ 92, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 106, 110 ], [ 111, 111 ], [ 111, 112 ], [ 111, 113 ], [ 111, 114 ], [ 105, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 62, 121 ], [ 121, 122 ], [ 60, 123 ], [ 123, 124 ], [ 60, 125 ], [ 125, 126 ] ]
[ "import java.util.*;\n\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString[] line =sc.nextLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t//break\t\n\t\t\tif(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(sum(n,x));\n\t\t}\t\t\t\t\t\n\n\t}\n\tpublic static int sum(int n,int x){\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n}", "import java.util.*;", "util.*", "java", "class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString[] line =sc.nextLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t//break\t\n\t\t\tif(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(sum(n,x));\n\t\t}\t\t\t\t\t\n\n\t}\n\tpublic static int sum(int n,int x){\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc= new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString[] line =sc.nextLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t//break\t\n\t\t\tif(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(sum(n,x));\n\t\t}\t\t\t\t\t\n\n\t}", "main", "{\n\t\tScanner sc= new Scanner(System.in);\n\t\twhile(true){\n\t\t\tString[] line =sc.nextLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t//break\t\n\t\t\tif(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(sum(n,x));\n\t\t}\t\t\t\t\t\n\n\t}", "Scanner sc= new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(true){\n\t\t\tString[] line =sc.nextLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t//break\t\n\t\t\tif(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(sum(n,x));\n\t\t}", "true", "{\n\t\t\tString[] line =sc.nextLine().split(\" \");\n\t\t\tint n = Integer.parseInt(line[0]);\n\t\t\tint x = Integer.parseInt(line[1]);\n\t\t//break\t\n\t\t\tif(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(sum(n,x));\n\t\t}", "String[] line =sc.nextLine().split(\" \");", "line", "sc.nextLine().split(\" \")", "sc.nextLine().split", "sc.nextLine()", "sc.nextLine", "sc", "\" \"", "int n = Integer.parseInt(line[0]);", "n", "Integer.parseInt(line[0])", "Integer.parseInt", "Integer", "line[0]", "line", "0", "int x = Integer.parseInt(line[1]);", "x", "Integer.parseInt(line[1])", "Integer.parseInt", "Integer", "line[1]", "line", "1", "if(n==0 && x==0){\n\t\t\t\tbreak;\n\t\t\t}", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "System.out.println(sum(n,x))", "System.out.println", "System.out", "System", "System.out", "sum(n,x)", "sum", "n", "x", "String[] args", "args", "public static int sum(int n,int x){\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "sum", "{\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "int count=0;", "count", "0", "for(int i=0;i<n;i++){\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "{\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=0;j<i;j++){\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int j=0;", "int j=0;", "j", "0", "j<i", "j", "i", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int k=0;k<j;k++){\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}", "int k=0;", "int k=0;", "k", "0", "k<j", "k", "j", "k++", "k++", "k", "{\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}\n\t\t\t\t}", "if(x-3==i+j+k){\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}", "x-3==i+j+k", "x-3", "x", "3", "i+j+k", "i+j+k", "i", "j", "k", "{\n\t\t\t\t\t\tcount=count+1;\n\t\t\t\t\t}", "count=count+1", "count", "count+1", "count", "1", "return count;", "count", "int n", "n", "int x", "x" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc= new Scanner(System.in); while(true){ String[] line =sc.nextLine().split(" "); int n = Integer.parseInt(line[0]); int x = Integer.parseInt(line[1]); //break if(n==0 && x==0){ break; } System.out.println(sum(n,x)); } } public static int sum(int n,int x){ int count=0; for(int i=0;i<n;i++){ for(int j=0;j<i;j++){ for(int k=0;k<j;k++){ if(x-3==i+j+k){ count=count+1; } } } } return count; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 41, 13, 20, 17, 41, 13, 17, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 29, 30, 0, 13, 4, 18, 4, 18, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 0, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 0, 13, 13, 0, 13, 2, 13, 17, 0, 13, 4, 18, 4, 18, 13, 17, 4, 18, 18, 13, 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 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 11, 17 ], [ 17, 18 ], [ 11, 19 ], [ 19, 20 ], [ 11, 21 ], [ 21, 22 ], [ 21, 23 ], [ 11, 24 ], [ 24, 25 ], [ 24, 26 ], [ 11, 27 ], [ 27, 28 ], [ 11, 29 ], [ 29, 30 ], [ 29, 31 ], [ 11, 33 ], [ 33, 34 ], [ 33, 35 ], [ 11, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 39, 46 ], [ 36, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 50, 55 ], [ 47, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 58, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 70, 71 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 58, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 58, 85 ], [ 85, 86 ], [ 85, 87 ], [ 58, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 88, 93 ], [ 93, 94 ], [ 93, 95 ], [ 88, 96 ], [ 96, 97 ], [ 97, 98 ], [ 88, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 105, 107 ], [ 101, 108 ], [ 108, 109 ], [ 108, 110 ], [ 101, 111 ], [ 111, 112 ], [ 112, 113 ], [ 101, 114 ], [ 115, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 121, 122 ], [ 121, 123 ], [ 116, 124 ], [ 124, 125 ], [ 125, 126 ], [ 116, 127 ], [ 128, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 132, 132 ], [ 132, 133 ], [ 132, 134 ], [ 132, 135 ], [ 130, 136 ], [ 129, 137 ], [ 137, 138 ], [ 138, 139 ], [ 115, 140 ], [ 140, 141 ], [ 140, 142 ], [ 58, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 145, 147 ], [ 58, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 150, 155 ], [ 11, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 156, 161 ], [ 9, 162 ], [ 162, 163 ] ]
[ "import java.io.*;\nimport java.io.IOException;\n\nclass Main{\n\tpublic static void main(String args[]){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint \tn,\n\t\t\t\tx,\n\t\t\t\ta,\t\t\t//1つ目の数\n\t\t\t\tb = 2,\t\t//2つ目の数(ループの初期判定のために2で初期化)\n\t\t\t\tc = 3,\t\t//3つ目の数(ループの初期判定のために3で初期化)\n\t\t\t\tcount;\t//組み合わせ数\n\t\t\n\t\tString[] input = new String[2];\t\t//入力を受け取る配列\n\t\tString output = \"\";\t\t\t\t\t//出力する文字列変数\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t\t//入力\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//出力\n\t\tSystem.out.print(output);\n\t\t\n\t}\n}\n", "import java.io.*;", "io.*", "java", "import java.io.IOException;", "IOException", "java.io", "class Main{\n\tpublic static void main(String args[]){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint \tn,\n\t\t\t\tx,\n\t\t\t\ta,\t\t\t//1つ目の数\n\t\t\t\tb = 2,\t\t//2つ目の数(ループの初期判定のために2で初期化)\n\t\t\t\tc = 3,\t\t//3つ目の数(ループの初期判定のために3で初期化)\n\t\t\t\tcount;\t//組み合わせ数\n\t\t\n\t\tString[] input = new String[2];\t\t//入力を受け取る配列\n\t\tString output = \"\";\t\t\t\t\t//出力する文字列変数\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t\t//入力\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//出力\n\t\tSystem.out.print(output);\n\t\t\n\t}\n}", "Main", "public static void main(String args[]){\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint \tn,\n\t\t\t\tx,\n\t\t\t\ta,\t\t\t//1つ目の数\n\t\t\t\tb = 2,\t\t//2つ目の数(ループの初期判定のために2で初期化)\n\t\t\t\tc = 3,\t\t//3つ目の数(ループの初期判定のために3で初期化)\n\t\t\t\tcount;\t//組み合わせ数\n\t\t\n\t\tString[] input = new String[2];\t\t//入力を受け取る配列\n\t\tString output = \"\";\t\t\t\t\t//出力する文字列変数\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t\t//入力\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//出力\n\t\tSystem.out.print(output);\n\t\t\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tint \tn,\n\t\t\t\tx,\n\t\t\t\ta,\t\t\t//1つ目の数\n\t\t\t\tb = 2,\t\t//2つ目の数(ループの初期判定のために2で初期化)\n\t\t\t\tc = 3,\t\t//3つ目の数(ループの初期判定のために3で初期化)\n\t\t\t\tcount;\t//組み合わせ数\n\t\t\n\t\tString[] input = new String[2];\t\t//入力を受け取る配列\n\t\tString output = \"\";\t\t\t\t\t//出力する文字列変数\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t\t//入力\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//出力\n\t\tSystem.out.print(output);\n\t\t\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int \tn", "n", "x", "x", "a", "a", "b = 2", "b", "2", "c = 3", "c", "3", "count;", "count", "String[] input = new String[2];", "input", "new String[2]", "2", "String output = \"\";", "output", "\"\"", "try{\n\t\t\t\n\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t\t//入力\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}", "catch(IOException e){\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}", "IOException e", "{\n\t\t\tSystem.out.println(e);\n\t\t\treturn;\n\t\t}", "System.out.println(e)", "System.out.println", "System.out", "System", "System.out", "e", "return;", "{\n\t\t\t\n\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t\t//入力\n\t\t\t\n\t\t\twhile(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}\n\t\t}", "input = br.readLine().split(\"[\\\\s]+\")", "input", "br.readLine().split(\"[\\\\s]+\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"[\\\\s]+\"", "while(true){\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}", "true", "{\n\t\t\t\tn = Integer.parseInt(input[0]);\n\t\t\t\tx = Integer.parseInt(input[1]);\n\t\t\t\t\n\t\t\t\t//終了判定\n\t\t\t\tif(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcount = 0;\n\t\t\t\tfor(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\toutput += count + \"\\n\";\t\t\t//出力内容を入れる\n\t\t\t\t\n\t\t\t\tinput = br.readLine().split(\"[\\\\s]+\");\t//2回目以降の入力\n\t\t\t}", "n = Integer.parseInt(input[0])", "n", "Integer.parseInt(input[0])", "Integer.parseInt", "Integer", "input[0]", "input", "0", "x = Integer.parseInt(input[1])", "x", "Integer.parseInt(input[1])", "Integer.parseInt", "Integer", "input[1]", "input", "1", "if(n == 0 && x == 0){\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\t\t//2つのデータがすべて0の時に終了する\n\t\t\t\t\tbreak;\n\t\t\t\t}", "break;", "count = 0", "count", "0", "for(a = 1;a < b;a++){\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}", "a = 1;", "a = 1", "a", "1", "a < b", "a", "b", "a++", "a++", "a", "{\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}", "{\t\t\t//aは最小値から徐々に+1していく\n\t\t\t\t\n\t\t\t\t\tfor(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}\n\t\t\t\t}", "for(b = a+1;b < c;b++){\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}", "b = a+1;", "b = a+1", "b", "a+1", "a", "1", "b < c", "b", "c", "b++", "b++", "b", "{\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}", "{\t\t//bはa+1からc-1まで+1していく\n\t\t\t\t\t\n\t\t\t\t\t\tfor(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = n;\n\t\t\t\t\t}", "for(c = n;c > b;c--){\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "c = n;", "c = n", "c", "n", "c > b", "c", "b", "c--", "c--", "c", "{\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\t//cは最大値から徐々に-1していく\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "if(a + b + c == x){\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}", "a + b + c == x", "a + b + c", "a + b + c", "a", "b", "c", "x", "{\t//a,b,cの合計がxかどうか\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcount++;\t\t//組み合わせが見つかったためカウントアップ\n\t\t\t\t\t\t\t}", "count++", "count", "c = n", "c", "n", "output += count + \"\\n\"", "output", "count + \"\\n\"", "count", "\"\\n\"", "input = br.readLine().split(\"[\\\\s]+\")", "input", "br.readLine().split(\"[\\\\s]+\")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\"[\\\\s]+\"", "System.out.print(output)", "System.out.print", "System.out", "System", "System.out", "output", "String args[]", "args" ]
import java.io.*; import java.io.IOException; class Main{ public static void main(String args[]){ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n, x, a, //1つ目の数 b = 2, //2つ目の数(ループの初期判定のために2で初期化) c = 3, //3つ目の数(ループの初期判定のために3で初期化) count; //組み合わせ数 String[] input = new String[2]; //入力を受け取る配列 String output = ""; //出力する文字列変数 try{ input = br.readLine().split("[\\s]+"); //入力 while(true){ n = Integer.parseInt(input[0]); x = Integer.parseInt(input[1]); //終了判定 if(n == 0 && x == 0){ //2つのデータがすべて0の時に終了する break; } count = 0; for(a = 1;a < b;a++){ //aは最小値から徐々に+1していく for(b = a+1;b < c;b++){ //bはa+1からc-1まで+1していく for(c = n;c > b;c--){ //cは最大値から徐々に-1していく if(a + b + c == x){ //a,b,cの合計がxかどうか count++; //組み合わせが見つかったためカウントアップ } } c = n; } } output += count + "\n"; //出力内容を入れる input = br.readLine().split("[\\s]+"); //2回目以降の入力 } }catch(IOException e){ System.out.println(e); return; } //出力 System.out.print(output); } }
[ 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, 41, 13, 42, 2, 2, 13, 17, 2, 13, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 13, 41, 13, 20, 2, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 4, 18, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 2, 4, 18, 13, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 4, 18, 13, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 4, 18, 13, 13, 30, 3, 11, 1, 41, 13, 2, 13, 17, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 4, 18, 13, 13, 30, 40, 18, 13, 13, 14, 2, 2, 2, 13, 13, 13, 4, 18, 13, 13, 30, 3, 11, 1, 41, 13, 17, 2, 13, 2, 4, 18, 13, 17, 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 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 204, 11 ], [ 204, 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 ], [ 14, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 36, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 14, 55 ], [ 55, 56 ], [ 55, 57 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 58, 62 ], [ 14, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 63, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 70, 74 ], [ 63, 75 ], [ 75, 76 ], [ 76, 77 ], [ 63, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 87, 92 ], [ 80, 93 ], [ 93, 94 ], [ 94, 95 ], [ 80, 96 ], [ 97, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 107, 112 ], [ 98, 113 ], [ 113, 114 ], [ 114, 115 ], [ 98, 116 ], [ 117, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 119, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 118, 127 ], [ 127, 128 ], [ 117, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 133, 135 ], [ 129, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 138, 141 ], [ 129, 142 ], [ 142, 143 ], [ 143, 144 ], [ 129, 145 ], [ 146, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 150, 150 ], [ 150, 151 ], [ 150, 152 ], [ 150, 153 ], [ 148, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 147, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 146, 163 ], [ 163, 164 ], [ 164, 165 ], [ 166, 166 ], [ 166, 167 ], [ 166, 168 ], [ 166, 169 ], [ 164, 170 ], [ 170, 171 ], [ 171, 172 ], [ 170, 173 ], [ 163, 174 ], [ 174, 175 ], [ 14, 176 ], [ 176, 177 ], [ 177, 178 ], [ 178, 179 ], [ 178, 180 ], [ 176, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 183, 187 ], [ 176, 188 ], [ 188, 189 ], [ 189, 190 ], [ 176, 191 ], [ 192, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 193, 198 ], [ 198, 199 ], [ 198, 200 ], [ 12, 201 ], [ 201, 202 ], [ 0, 203 ], [ 203, 204 ], [ 203, 205 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\n\npublic class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tList <Integer> N = new ArrayList<Integer>();\n\t\tList <Integer> X = new ArrayList<Integer>();\n\t\tint n;\n\t\tint x;\n\t\tdo {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);\n\t\t\n\t\tint[] ans = new int[N.size()-1];\n\t\tfor(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\t\n\t\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tList <Integer> N = new ArrayList<Integer>();\n\t\tList <Integer> X = new ArrayList<Integer>();\n\t\tint n;\n\t\tint x;\n\t\tdo {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);\n\t\t\n\t\tint[] ans = new int[N.size()-1];\n\t\tfor(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\t\n\t\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tList <Integer> N = new ArrayList<Integer>();\n\t\tList <Integer> X = new ArrayList<Integer>();\n\t\tint n;\n\t\tint x;\n\t\tdo {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);\n\t\t\n\t\tint[] ans = new int[N.size()-1];\n\t\tfor(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\t\n\t\n\t}", "main", "{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tList <Integer> N = new ArrayList<Integer>();\n\t\tList <Integer> X = new ArrayList<Integer>();\n\t\tint n;\n\t\tint x;\n\t\tdo {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);\n\t\t\n\t\tint[] ans = new int[N.size()-1];\n\t\tfor(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\t\n\t\n\t}", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "List <Integer> N = new ArrayList<Integer>();", "N", "new ArrayList<Integer>()", "List <Integer> X = new ArrayList<Integer>();", "X", "new ArrayList<Integer>()", "int n;", "n", "int x;", "x", "do {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);", "n != 0 || x != 0", "n != 0", "n", "0", "x != 0", "x", "0", "{\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t}", "n = stdIn.nextInt()", "n", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "x = stdIn.nextInt()", "x", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "N.add(n)", "N.add", "N", "n", "X.add(x)", "X.add", "X", "x", "int[] ans = new int[N.size()-1];", "ans", "new int[N.size()-1]", "N.size()-1", "N.size()", "N.size", "N", "1", "for(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N.size()-1", "i", "N.size()-1", "N.size()", "N.size", "N", "1", "i++", "i++", "i", "{\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= N.get(i)-2", "j", "N.get(i)-2", "N.get(i)", "N.get", "N", "i", "2", "j++", "j++", "j", "{\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int k = j+1;", "int k = j+1;", "k", "j+1", "j", "1", "k <= N.get(i)-1", "k", "N.get(i)-1", "N.get(i)", "N.get", "N", "i", "1", "k++", "k++", "k", "{\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "if(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "j + k > X.get(i)", "j + k", "j", "k", "X.get(i)", "X.get", "X", "i", "{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}", "break;", "for(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int l = k+1;", "int l = k+1;", "l", "k+1", "k", "1", "l <= N.get(i)", "l", "N.get(i)", "N.get", "N", "i", "l++", "l++", "l", "{\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}", "j + k + l == X.get(i)", "j + k + l", "j + k + l", "j", "k", "l", "X.get(i)", "X.get", "X", "i", "{\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}", "ans[i]++", "ans[i]", "ans", "i", "if(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "j + k + l > X.get(i)", "j + k + l", "j + k + l", "j", "k", "l", "X.get(i)", "X.get", "X", "i", "{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}", "break;", "for (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < N.size()-1", "i", "N.size()-1", "N.size()", "N.size", "N", "1", "i++", "i++", "i", "{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "{\n\t\t\tSystem.out.println(ans[i]);\n\t\t}", "System.out.println(ans[i])", "System.out.println", "System.out", "System", "System.out", "ans[i]", "ans", "i", "String[] args", "args", "public class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tList <Integer> N = new ArrayList<Integer>();\n\t\tList <Integer> X = new ArrayList<Integer>();\n\t\tint n;\n\t\tint x;\n\t\tdo {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);\n\t\t\n\t\tint[] ans = new int[N.size()-1];\n\t\tfor(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\t\n\t\n\t}\n}", "public class Main {\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tList <Integer> N = new ArrayList<Integer>();\n\t\tList <Integer> X = new ArrayList<Integer>();\n\t\tint n;\n\t\tint x;\n\t\tdo {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tN.add(n);\n\t\t\tX.add(x);\n\t\t} while (n != 0 || x != 0);\n\t\t\n\t\tint[] ans = new int[N.size()-1];\n\t\tfor(int i = 0; i < N.size()-1; i++) {\n\t\t\tfor(int j = 1; j <= N.get(i)-2; j++) {\n\t\t\t\tfor(int k = j+1; k <= N.get(i)-1; k++) {\n\t\t\t\t\tif(j + k > X.get(i)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(int l = k+1; l <= N.get(i); l++) {\n\t\t\t\t\t\tif(j + k + l == X.get(i)) {\n\t\t\t\t\t\t\tans[i]++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(j + k + l > X.get(i)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < N.size()-1; i++) {\n\t\t\tSystem.out.println(ans[i]);\n\t\t}\n\t\t\n\t\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); List <Integer> N = new ArrayList<Integer>(); List <Integer> X = new ArrayList<Integer>(); int n; int x; do { n = stdIn.nextInt(); x = stdIn.nextInt(); N.add(n); X.add(x); } while (n != 0 || x != 0); int[] ans = new int[N.size()-1]; for(int i = 0; i < N.size()-1; i++) { for(int j = 1; j <= N.get(i)-2; j++) { for(int k = j+1; k <= N.get(i)-1; k++) { if(j + k > X.get(i)) { break; } for(int l = k+1; l <= N.get(i); l++) { if(j + k + l == X.get(i)) { ans[i]++; } if(j + k + l > X.get(i)) { break; } } } } } for (int i = 0; i < N.size()-1; i++) { System.out.println(ans[i]); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 11, 1, 30, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 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 ], [ 15, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 15, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 15, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 15, 35 ], [ 35, 36 ], [ 35, 37 ], [ 15, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 55, 57 ], [ 51, 58 ], [ 58, 59 ], [ 58, 60 ], [ 51, 61 ], [ 61, 62 ], [ 62, 63 ], [ 51, 64 ], [ 65, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 66, 73 ], [ 73, 74 ], [ 73, 75 ], [ 66, 76 ], [ 76, 77 ], [ 77, 78 ], [ 66, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 84, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 82, 88 ], [ 81, 89 ], [ 89, 90 ], [ 15, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 6, 97 ], [ 97, 98 ] ]
[ "\nimport java.util.*;\n\nclass Main{\npublic static void main(String[] args){\nScanner sc = new Scanner(System.in);\nfor(;;){\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}\n}\n}", "import java.util.*;", "util.*", "java", "class Main{\npublic static void main(String[] args){\nScanner sc = new Scanner(System.in);\nfor(;;){\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}\n}\n}", "Main", "public static void main(String[] args){\nScanner sc = new Scanner(System.in);\nfor(;;){\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}\n}", "main", "{\nScanner sc = new Scanner(System.in);\nfor(;;){\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}\n}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "for(;;){\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}", ";", "{\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}", "{\nint n=sc.nextInt();\nint x =sc.nextInt();\nif(n==0 && x==0) break;\nint ans =0;\nfor(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}\nSystem.out.println(ans);\n}", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x =sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0 && x==0) break;", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "int ans =0;", "ans", "0", "for(int i=1; i<=n; i++){\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}", "{\n\tfor(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}\n}", "for(int c=i+1; c<=n; c++){\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}", "int c=i+1;", "int c=i+1;", "c", "i+1", "i", "1", "c<=n", "c", "n", "c++", "c++", "c", "{\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}", "{\n\t\tfor(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}\n\t}", "for(int b=c+1; b<=n; b++){\n\t\t\tif(i+c+b == x) ans++;\n\t\t}", "int b=c+1;", "int b=c+1;", "b", "c+1", "c", "1", "b<=n", "b", "n", "b++", "b++", "b", "{\n\t\t\tif(i+c+b == x) ans++;\n\t\t}", "{\n\t\t\tif(i+c+b == x) ans++;\n\t\t}", "if(i+c+b == x) ans++;", "i+c+b == x", "i+c+b", "i+c+b", "i", "c", "b", "x", "ans++", "ans", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); for(;;){ int n=sc.nextInt(); int x =sc.nextInt(); if(n==0 && x==0) break; int ans =0; for(int i=1; i<=n; i++){ for(int c=i+1; c<=n; c++){ for(int b=c+1; b<=n; b++){ if(i+c+b == x) ans++; } } } System.out.println(ans); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 42, 2, 4, 18, 0, 13, 4, 18, 13, 17, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 2, 4, 18, 13, 18, 13, 17, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 2, 13, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 13, 2, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 130, 11 ], [ 130, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 14, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 21, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 21, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 37, 44 ], [ 36, 45 ], [ 35, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 46, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 46, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 63, 70 ], [ 46, 71 ], [ 71, 72 ], [ 71, 73 ], [ 46, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 74, 82 ], [ 82, 83 ], [ 83, 84 ], [ 74, 85 ], [ 86, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 87, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 87, 99 ], [ 99, 100 ], [ 100, 101 ], [ 87, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 103, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 116, 118 ], [ 111, 119 ], [ 119, 120 ], [ 46, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 12, 127 ], [ 127, 128 ], [ 0, 129 ], [ 129, 130 ], [ 129, 131 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\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) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "String x = \"\";", "x", "\"\"", "try {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}", "catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}", "NumberFormatException e", "{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}", "IOException e", "{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t}", "while ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}", "(x = in.readLine()).equals(\"0 0\") == false", "(x = in.readLine()).equals(\"0 0\")", "(x = in.readLine()).equals", "(x = in.readLine())", "x", "in.readLine()", "in.readLine", "in", "\"0 0\"", "false", "{\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}", "String[] data = x.split(\" \");", "data", "x.split(\" \")", "x.split", "x", "\" \"", "int n = Integer.parseInt(data[0]);", "n", "Integer.parseInt(data[0])", "Integer.parseInt", "Integer", "data[0]", "data", "0", "int sum = (Integer.parseInt(data[1]) - 3);", "sum", "(Integer.parseInt(data[1]) - 3)", "Integer.parseInt(data[1])", "Integer.parseInt", "Integer", "data[1]", "data", "1", "3", "int num = 0;", "num", "0", "for (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}", "for (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}", "int j = (i + 1);", "int j = (i + 1);", "j", "(i + 1)", "i", "1", "(i + j) < sum", "(i + j)", "i", "j", "sum", "j++", "j++", "j", "{\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}", "int k = sum - (i + j);", "k", "sum - (i + j)", "sum", "(i + j)", "i", "j", "if ((k > j) && (k < n)) num++;", "(k > j) && (k < n)", "(k > j)", "k", "j", "(k < n)", "k", "n", "num++", "num", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()).equals(\"0 0\") == false) {\n\t\t\t\tString[] data = x.split(\" \");\n\t\t\t\tint n = Integer.parseInt(data[0]);\n\t\t\t\tint sum = (Integer.parseInt(data[1]) - 3);\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\t\tfor (int j = (i + 1); (i + j) < sum; j++) {\n\t\t\t\t\t\tint k = sum - (i + j);\n\t\t\t\t\t\tif ((k > j) && (k < n)) num++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\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) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String x = ""; try { while ((x = in.readLine()).equals("0 0") == false) { String[] data = x.split(" "); int n = Integer.parseInt(data[0]); int sum = (Integer.parseInt(data[1]) - 3); int num = 0; for (int i = 0; i < n; i++) { for (int j = (i + 1); (i + j) < sum; j++) { int k = sum - (i + j); if ((k > j) && (k < n)) num++; } } System.out.println(num); } } catch (NumberFormatException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 14, 40, 2, 2, 13, 17, 2, 13, 17, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 4, 13, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 2, 2, 2, 13, 13, 13, 13, 41, 13, 2, 2, 13, 13, 2, 13, 13, 29, 2, 13, 13, 23, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 134, 5 ], [ 134, 6 ], [ 6, 7 ], [ 6, 8 ], [ 134, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 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 ], [ 16, 27 ], [ 27, 28 ], [ 27, 29 ], [ 16, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 36, 38 ], [ 30, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 47, 49 ], [ 40, 50 ], [ 50, 51 ], [ 51, 52 ], [ 40, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 62, 64 ], [ 55, 65 ], [ 65, 66 ], [ 66, 67 ], [ 55, 68 ], [ 69, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 75, 76 ], [ 75, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 70, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 84, 88 ], [ 84, 89 ], [ 83, 90 ], [ 90, 91 ], [ 39, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 9, 98 ], [ 98, 99 ], [ 134, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 107, 107 ], [ 107, 108 ], [ 107, 109 ], [ 107, 110 ], [ 105, 111 ], [ 102, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 118, 120 ], [ 102, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 100, 125 ], [ 125, 126 ], [ 100, 127 ], [ 127, 128 ], [ 100, 129 ], [ 129, 130 ], [ 100, 131 ], [ 131, 132 ], [ 0, 133 ], [ 133, 134 ], [ 133, 135 ] ]
[ "import java.util.*;\npublic class Main {\n static Scanner kbd = new Scanner(System.in);\n public static void main(String[] args) {\n \n while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }\n }\n static boolean m(int a, int b, int c, int x){\n boolean p = a+b+c==x;\n boolean q = a<b && b<c;\n return p&&q;\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n static Scanner kbd = new Scanner(System.in);\n public static void main(String[] args) {\n \n while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }\n }\n static boolean m(int a, int b, int c, int x){\n boolean p = a+b+c==x;\n boolean q = a<b && b<c;\n return p&&q;\n }\n}", "Main", "static Scanner kbd = new Scanner(System.in);", "kbd", "new Scanner(System.in)", "public static void main(String[] args) {\n \n while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }\n }", "main", "{\n \n while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }\n }", "while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }", "kbd.hasNext()", "kbd.hasNext", "kbd", "{\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }", "int n = kbd.nextInt();", "n", "kbd.nextInt()", "kbd.nextInt", "kbd", "int x = kbd.nextInt();", "x", "kbd.nextInt()", "kbd.nextInt", "kbd", "int z=0;", "z", "0", "if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }", "!(n==0 && x==0)", "(n==0 && x==0)", "n==0", "n", "0", "x==0", "x", "0", "{\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }", "for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }", "int a=1;", "int a=1;", "a", "1", "a<=n-2", "a", "n-2", "n", "2", "a++", "a++", "a", "{\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }", "{\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }", "for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }", "int b=2;", "int b=2;", "b", "2", "b<=n-1", "b", "n-1", "n", "1", "b++", "b++", "b", "{\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }", "{\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }", "for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }", "int c=3;", "int c=3;", "c", "3", "c<=n", "c", "n", "c++", "c++", "c", "{\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }", "{\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }", "if(m(a,b,c,x)) z++;", "m(a,b,c,x)", "m", "a", "b", "c", "x", "z++", "z", "System.out.println(z)", "System.out.println", "System.out", "System", "System.out", "z", "String[] args", "args", "static boolean m(int a, int b, int c, int x){\n boolean p = a+b+c==x;\n boolean q = a<b && b<c;\n return p&&q;\n }", "m", "{\n boolean p = a+b+c==x;\n boolean q = a<b && b<c;\n return p&&q;\n }", "boolean p = a+b+c==x;", "p", "a+b+c==x", "a+b+c", "a+b+c", "a", "b", "c", "x", "boolean q = a<b && b<c;", "q", "a<b && b<c", "a<b", "a", "b", "b<c", "b", "c", "return p&&q;", "p&&q", "p", "q", "int a", "a", "int b", "b", "int c", "c", "int x", "x", "public class Main {\n static Scanner kbd = new Scanner(System.in);\n public static void main(String[] args) {\n \n while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }\n }\n static boolean m(int a, int b, int c, int x){\n boolean p = a+b+c==x;\n boolean q = a<b && b<c;\n return p&&q;\n }\n}", "public class Main {\n static Scanner kbd = new Scanner(System.in);\n public static void main(String[] args) {\n \n while(kbd.hasNext()){\n int n = kbd.nextInt();\n int x = kbd.nextInt();\n int z=0;\n if(!(n==0 && x==0)){\n for(int a=1; a<=n-2; a++){\n for(int b=2; b<=n-1; b++){\n for(int c=3; c<=n; c++){\n //System.out.println(a+\" \"+b+\" \"+c);\n if(m(a,b,c,x)) z++;\n }\n }\n }\n System.out.println(z);\n }\n }\n }\n static boolean m(int a, int b, int c, int x){\n boolean p = a+b+c==x;\n boolean q = a<b && b<c;\n return p&&q;\n }\n}", "Main" ]
import java.util.*; public class Main { static Scanner kbd = new Scanner(System.in); public static void main(String[] args) { while(kbd.hasNext()){ int n = kbd.nextInt(); int x = kbd.nextInt(); int z=0; if(!(n==0 && x==0)){ for(int a=1; a<=n-2; a++){ for(int b=2; b<=n-1; b++){ for(int c=3; c<=n; c++){ //System.out.println(a+" "+b+" "+c); if(m(a,b,c,x)) z++; } } } System.out.println(z); } } } static boolean m(int a, int b, int c, int x){ boolean p = a+b+c==x; boolean q = a<b && b<c; return p&&q; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 20, 17, 41, 13, 20, 11, 1, 30, 30, 0, 13, 4, 18, 4, 18, 13, 17, 11, 1, 0, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 0, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 3, 11, 1, 0, 13, 17, 2, 13, 18, 13, 17, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 18, 13, 17, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 18, 13, 17, 1, 40, 13, 30, 30, 0, 13, 8, 2, 2, 2, 13, 13, 13, 18, 13, 17, 17, 17, 4, 18, 18, 13, 13, 13, 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 ], [ 12, 13 ], [ 11, 14 ], [ 14, 15 ], [ 11, 16 ], [ 16, 17 ], [ 11, 18 ], [ 18, 19 ], [ 11, 20 ], [ 20, 21 ], [ 20, 22 ], [ 11, 24 ], [ 24, 25 ], [ 24, 26 ], [ 11, 28 ], [ 28, 29 ], [ 28, 30 ], [ 11, 31 ], [ 31, 32 ], [ 31, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 37, 42 ], [ 34, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 43, 48 ], [ 48, 49 ], [ 48, 50 ], [ 43, 51 ], [ 51, 52 ], [ 52, 53 ], [ 43, 54 ], [ 55, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 63, 64 ], [ 63, 65 ], [ 34, 66 ], [ 66, 67 ], [ 66, 68 ], [ 34, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 70, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 69, 81 ], [ 34, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 82, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 82, 92 ], [ 92, 93 ], [ 93, 94 ], [ 82, 95 ], [ 96, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 97, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 97, 109 ], [ 109, 110 ], [ 110, 111 ], [ 97, 112 ], [ 113, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 118, 120 ], [ 114, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 114, 126 ], [ 126, 127 ], [ 127, 128 ], [ 114, 129 ], [ 130, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 134, 135 ], [ 136, 136 ], [ 136, 137 ], [ 136, 138 ], [ 136, 139 ], [ 134, 140 ], [ 140, 141 ], [ 140, 142 ], [ 133, 143 ], [ 133, 144 ], [ 34, 145 ], [ 145, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 145, 150 ], [ 11, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 9, 156 ], [ 156, 157 ] ]
[ "import java.io.*;\nimport java.util.Arrays;\nclass Main{\n public static void main(String[] args) throws IOException {\n int i,j,k,cnt;\n int[] n = new int[990];\n String[] str = new String[990];\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n for(;;){\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }\n System.out.flush();\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.Arrays;", "Arrays", "java.util", "class Main{\n public static void main(String[] args) throws IOException {\n int i,j,k,cnt;\n int[] n = new int[990];\n String[] str = new String[990];\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n for(;;){\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }\n System.out.flush();\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n int i,j,k,cnt;\n int[] n = new int[990];\n String[] str = new String[990];\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n for(;;){\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }\n System.out.flush();\n }", "main", "{\n int i,j,k,cnt;\n int[] n = new int[990];\n String[] str = new String[990];\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n for(;;){\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }\n System.out.flush();\n }", "int i", "i", "j", "j", "k", "k", "cnt;", "cnt", "int[] n = new int[990];", "n", "new int[990]", "990", "String[] str = new String[990];", "str", "new String[990]", "990", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "for(;;){\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }", ";", "{\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }", "{\n str = in.readLine().split(\" \");\n for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n } \n cnt=0;\n if(n[0]==0 && n[1]==0) break; \n for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }\n System.out.println(cnt);\n }", "str = in.readLine().split(\" \")", "str", "in.readLine().split(\" \")", "in.readLine().split", "in.readLine()", "in.readLine", "in", "\" \"", "for(i=0;i<2;i++){\n n[i]=Integer.parseInt(str[i]); \n }", "i=0;", "i=0", "i", "0", "i<2", "i", "2", "i++", "i++", "i", "{\n n[i]=Integer.parseInt(str[i]); \n }", "{\n n[i]=Integer.parseInt(str[i]); \n }", "n[i]=Integer.parseInt(str[i])", "n[i]", "n", "i", "Integer.parseInt(str[i])", "Integer.parseInt", "Integer", "str[i]", "str", "i", "cnt=0", "cnt", "0", "if(n[0]==0 && n[1]==0) break;", "n[0]==0 && n[1]==0", "n[0]==0", "n[0]", "n", "0", "0", "n[1]==0", "n[1]", "n", "1", "0", "break;", "for(i=1;i<=n[0];i++){\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }", "i=1;", "i=1", "i", "1", "i<=n[0]", "i", "n[0]", "n", "0", "i++", "i++", "i", "{\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }", "{\n for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n } \n }", "for(j=i+1;j<=n[0];j++){\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n }", "j=i+1;", "j=i+1", "j", "i+1", "i", "1", "j<=n[0]", "j", "n[0]", "n", "0", "j++", "j++", "j", "{\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n }", "{\n for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }\n }", "for(k=j+1;k<=n[0];k++){\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }", "k=j+1;", "k=j+1", "k", "j+1", "j", "1", "k<=n[0]", "k", "n[0]", "n", "0", "k++", "k++", "k", "{\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }", "{\n cnt+=(i+j+k==n[1] ? 1 : 0);\n }", "cnt+=(i+j+k==n[1] ? 1 : 0)", "cnt", "(i+j+k==n[1] ? 1 : 0)", "i+j+k==n[1]", "i+j+k", "i+j+k", "i", "j", "k", "n[1]", "n", "1", "1", "0", "System.out.println(cnt)", "System.out.println", "System.out", "System", "System.out", "cnt", "System.out.flush()", "System.out.flush", "System.out", "System", "System.out", "String[] args", "args" ]
import java.io.*; import java.util.Arrays; class Main{ public static void main(String[] args) throws IOException { int i,j,k,cnt; int[] n = new int[990]; String[] str = new String[990]; BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); for(;;){ str = in.readLine().split(" "); for(i=0;i<2;i++){ n[i]=Integer.parseInt(str[i]); } cnt=0; if(n[0]==0 && n[1]==0) break; for(i=1;i<=n[0];i++){ for(j=i+1;j<=n[0];j++){ for(k=j+1;k<=n[0];k++){ cnt+=(i+j+k==n[1] ? 1 : 0); } } } System.out.println(cnt); } System.out.flush(); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 4, 18, 18, 13, 13, 13, 12, 13, 30, 4, 18, 20, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 4, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 14, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 14, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 25, 33 ], [ 14, 34 ], [ 34, 35 ], [ 34, 36 ], [ 14, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 42, 43 ], [ 42, 44 ], [ 37, 45 ], [ 45, 46 ], [ 46, 47 ], [ 37, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 68, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 93, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 91, 97 ], [ 90, 98 ], [ 98, 99 ], [ 14, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 100, 105 ], [ 4, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 106, 112 ], [ 112, 113 ] ]
[ "import java.util.*;\nclass Main{\n Scanner sc=new Scanner(System.in);\n void main(){\n\twhile(true){\n\t int n=sc.nextInt();\n\t int x=sc.nextInt();\n\t if(n==0&&x==0)break;\n\t int ans=0;\n\t for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(ans);\n\t}\n }\n public static void main(String[]ag){\n\tnew Main().main();\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n Scanner sc=new Scanner(System.in);\n void main(){\n\twhile(true){\n\t int n=sc.nextInt();\n\t int x=sc.nextInt();\n\t if(n==0&&x==0)break;\n\t int ans=0;\n\t for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(ans);\n\t}\n }\n public static void main(String[]ag){\n\tnew Main().main();\n }\n}", "Main", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "void main(){\n\twhile(true){\n\t int n=sc.nextInt();\n\t int x=sc.nextInt();\n\t if(n==0&&x==0)break;\n\t int ans=0;\n\t for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(ans);\n\t}\n }", "main", "{\n\twhile(true){\n\t int n=sc.nextInt();\n\t int x=sc.nextInt();\n\t if(n==0&&x==0)break;\n\t int ans=0;\n\t for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(ans);\n\t}\n }", "while(true){\n\t int n=sc.nextInt();\n\t int x=sc.nextInt();\n\t if(n==0&&x==0)break;\n\t int ans=0;\n\t for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(ans);\n\t}", "true", "{\n\t int n=sc.nextInt();\n\t int x=sc.nextInt();\n\t if(n==0&&x==0)break;\n\t int ans=0;\n\t for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(ans);\n\t}", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x=sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0&&x==0)break;", "n==0&&x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "int ans=0;", "ans", "0", "for(int i=1;i<=n;i++){\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }", "{\n\t\tfor(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}\n\t }", "for(int j=i;j<=n;j++){\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}", "int j=i;", "int j=i;", "j", "i", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}", "{\n\t\t if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t}", "if(j!=i){\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }", "j!=i", "j", "i", "{\n\t\t\tfor(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}\n\t\t }", "for(int k=j;k<=n;k++){\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}", "int k=j;", "int k=j;", "k", "j", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}", "{\n\t\t\t if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }\n\t\t\t}", "if(k!=i&&k!=j){\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }", "k!=i&&k!=j", "k!=i", "k", "i", "k!=j", "k", "j", "{\n\t\t\t\tif(k+j+i==x)ans++;\n\t\t\t }", "if(k+j+i==x)ans++;", "k+j+i==x", "k+j+i", "k+j+i", "k", "j", "i", "x", "ans++", "ans", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "public static void main(String[]ag){\n\tnew Main().main();\n }", "main", "{\n\tnew Main().main();\n }", "new Main().main()", "new Main().main", "new Main()", "String[]ag", "ag" ]
import java.util.*; class Main{ Scanner sc=new Scanner(System.in); void main(){ while(true){ int n=sc.nextInt(); int x=sc.nextInt(); if(n==0&&x==0)break; int ans=0; for(int i=1;i<=n;i++){ for(int j=i;j<=n;j++){ if(j!=i){ for(int k=j;k<=n;k++){ if(k!=i&&k!=j){ if(k+j+i==x)ans++; } } } } } System.out.println(ans); } } public static void main(String[]ag){ new Main().main(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 0, 13, 20, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 41, 13, 41, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 18, 13, 13, 18, 13, 13, 18, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 0, 13, 17, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 155, 5 ], [ 155, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 8, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 21, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 21, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 21, 42 ], [ 42, 43 ], [ 21, 44 ], [ 44, 45 ], [ 44, 46 ], [ 21, 48 ], [ 48, 49 ], [ 21, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 64, 66 ], [ 63, 67 ], [ 67, 68 ], [ 67, 69 ], [ 21, 70 ], [ 70, 71 ], [ 21, 72 ], [ 72, 73 ], [ 21, 74 ], [ 74, 75 ], [ 21, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 76, 86 ], [ 86, 87 ], [ 87, 88 ], [ 76, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 91, 103 ], [ 103, 104 ], [ 104, 105 ], [ 91, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 108, 115 ], [ 115, 116 ], [ 115, 117 ], [ 108, 118 ], [ 118, 119 ], [ 119, 120 ], [ 108, 121 ], [ 122, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 126, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 130, 132 ], [ 126, 133 ], [ 133, 134 ], [ 133, 135 ], [ 124, 136 ], [ 123, 137 ], [ 137, 138 ], [ 138, 139 ], [ 21, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 21, 146 ], [ 146, 147 ], [ 146, 148 ], [ 8, 149 ], [ 149, 150 ], [ 150, 151 ], [ 6, 152 ], [ 152, 153 ], [ 0, 154 ], [ 154, 155 ], [ 154, 156 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n;\n int x;\n int sum=0;\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }\n sc.close();\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 int n;\n int x;\n int sum=0;\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }\n sc.close();\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n;\n int x;\n int sum=0;\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n;\n int x;\n int sum=0;\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n;", "n", "int x;", "x", "int sum=0;", "sum", "0", "while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }", "true", "{\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }", "n = sc.nextInt()", "n", "sc.nextInt()", "sc.nextInt", "sc", "x = sc.nextInt()", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n==0 && x==0){\n break;\n }", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "{\n break;\n }", "break;", "int[] num;", "num", "num = new int[n]", "num", "new int[n]", "n", "int count;", "count", "for(count=0;count<n;count++){\n num[count] = count + 1;\n }", "count=0;", "count=0", "count", "0", "count<n", "count", "n", "count++", "count++", "count", "{\n num[count] = count + 1;\n }", "{\n num[count] = count + 1;\n }", "num[count] = count + 1", "num[count]", "num", "count", "count + 1", "count", "1", "int i", "i", "j", "j", "k;", "k", "for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }", "i=0;", "i=0", "i", "0", "i<n-2", "i", "n-2", "n", "2", "i++", "i++", "i", "{\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }", "{\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }", "for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }", "j=i+1;", "j=i+1", "j", "i+1", "i", "1", "j<n-1", "j", "n-1", "n", "1", "j++", "j++", "j", "{\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }", "{\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }", "for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }", "k=j+1;", "k=j+1", "k", "j+1", "j", "1", "k<n", "k", "n", "k++", "k++", "k", "{\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }", "{\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }", "if(num[i]+num[j]+num[k] == x){\n sum++;\n }", "num[i]+num[j]+num[k] == x", "num[i]+num[j]+num[k]", "num[i]+num[j]+num[k]", "num[i]", "num", "i", "num[j]", "num", "j", "num[k]", "num", "k", "x", "{\n sum++;\n }", "sum++", "sum", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "sum = 0", "sum", "0", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n;\n int x;\n int sum=0;\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }\n sc.close();\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n;\n int x;\n int sum=0;\n while (true) {\n n = sc.nextInt();\n x = sc.nextInt();\n if(n==0 && x==0){\n break;\n }\n int[] num;\n num = new int[n];\n int count;\n for(count=0;count<n;count++){\n num[count] = count + 1;\n }\n int i,j,k;\n for(i=0;i<n-2;i++){\n for(j=i+1;j<n-1;j++){\n for(k=j+1;k<n;k++){\n if(num[i]+num[j]+num[k] == x){\n sum++;\n }\n }\n }\n }\n System.out.println(sum);\n sum = 0; \n }\n sc.close();\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n; int x; int sum=0; while (true) { n = sc.nextInt(); x = sc.nextInt(); if(n==0 && x==0){ break; } int[] num; num = new int[n]; int count; for(count=0;count<n;count++){ num[count] = count + 1; } int i,j,k; for(i=0;i<n-2;i++){ for(j=i+1;j<n-1;j++){ for(k=j+1;k<n;k++){ if(num[i]+num[j]+num[k] == x){ sum++; } } } } System.out.println(sum); sum = 0; } sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 13, 13, 30, 3, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 13, 30, 3, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 3, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 132, 5 ], [ 132, 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 ], [ 16, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 16, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 16, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 35, 37 ], [ 30, 38 ], [ 38, 39 ], [ 16, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 40, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 47, 49 ], [ 40, 50 ], [ 50, 51 ], [ 51, 52 ], [ 40, 53 ], [ 54, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 54, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 61, 68 ], [ 68, 69 ], [ 68, 70 ], [ 61, 71 ], [ 71, 72 ], [ 72, 73 ], [ 61, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 76, 82 ], [ 82, 83 ], [ 75, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 84, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 84, 96 ], [ 96, 97 ], [ 97, 98 ], [ 84, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 104, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 102, 108 ], [ 101, 109 ], [ 109, 110 ], [ 100, 111 ], [ 111, 112 ], [ 112, 113 ], [ 114, 114 ], [ 114, 115 ], [ 114, 116 ], [ 114, 117 ], [ 112, 118 ], [ 111, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 16, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 123, 128 ], [ 6, 129 ], [ 129, 130 ], [ 0, 131 ], [ 131, 132 ], [ 131, 133 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\twhile (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\twhile (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}\n }\n}", "Main", "public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\twhile (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}\n }", "main", "{\n\tScanner scan = new Scanner(System.in);\n\twhile (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "while (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}", "scan.hasNext()", "scan.hasNext", "scan", "{\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}", "int count = 0;", "count", "0", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "int x = scan.nextInt();", "x", "scan.nextInt()", "scan.nextInt", "scan", "if (n == 0 && x == 0) {\n\t\tbreak;\n\t }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\tbreak;\n\t }", "break;", "for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }", "int i = 1;", "int i = 1;", "i", "1", "i < n - 1", "i", "n - 1", "n", "1", "i++", "i++", "i", "{\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }", "{\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }", "if (i > x) {\n\t\t break;\n\t\t}", "i > x", "i", "x", "{\n\t\t break;\n\t\t}", "break;", "for (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}", "{\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}", "if (j + i > x) {\n\t\t\tbreak;\n\t\t }", "j + i > x", "j + i", "j", "i", "x", "{\n\t\t\tbreak;\n\t\t }", "break;", "for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k < n + 1", "k", "n + 1", "n", "1", "k++", "k++", "k", "{\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }", "{\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }", "if (j + i + k > x) {\n\t\t\t break;\n\t\t\t}", "j + i + k > x", "j + i + k", "j + i + k", "j", "i", "k", "x", "{\n\t\t\t break;\n\t\t\t}", "break;", "if (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}", "j + i + k == x", "j + i + k", "j + i + k", "j", "i", "k", "x", "{\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}", "count++", "count", "break;", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "String[] args", "args", "public class Main{\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\twhile (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}\n }\n}", "public class Main{\n public static void main(String[] args) {\n\tScanner scan = new Scanner(System.in);\n\twhile (scan.hasNext()) {\n\t int count = 0;\n\t int n = scan.nextInt();\n\t int x = scan.nextInt();\n\t if (n == 0 && x == 0) {\n\t\tbreak;\n\t }\n\t for (int i = 1; i < n - 1; i++) {\n\t\tif (i > x) {\n\t\t break;\n\t\t}\n\t\tfor (int j = i + 1; j < n; j++) {\n\t\t if (j + i > x) {\n\t\t\tbreak;\n\t\t }\n\t\t for (int k = j + 1; k < n + 1; k++) {\n\t\t\tif (j + i + k > x) {\n\t\t\t break;\n\t\t\t}\n\t\t\tif (j + i + k == x) {\n\t\t\t count++;\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t}\n\t }\n\t System.out.println(count);\n\t}\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); while (scan.hasNext()) { int count = 0; int n = scan.nextInt(); int x = scan.nextInt(); if (n == 0 && x == 0) { break; } for (int i = 1; i < n - 1; i++) { if (i > x) { break; } for (int j = i + 1; j < n; j++) { if (j + i > x) { break; } for (int k = j + 1; k < n + 1; k++) { if (j + i + k > x) { break; } if (j + i + k == x) { count++; break; } } } } System.out.println(count); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 3, 4, 18, 18, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 17, 41, 13, 41, 13, 41, 13, 41, 13, 17, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 40, 13, 29, 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 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 21, 22 ], [ 22, 23 ], [ 18, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 18, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 18, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 43, 46 ], [ 6, 47 ], [ 47, 48 ], [ 4, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 51, 58 ], [ 58, 59 ], [ 51, 60 ], [ 60, 61 ], [ 51, 62 ], [ 62, 63 ], [ 51, 64 ], [ 64, 65 ], [ 64, 66 ], [ 51, 67 ], [ 67, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 67, 72 ], [ 72, 73 ], [ 72, 74 ], [ 67, 75 ], [ 75, 76 ], [ 76, 77 ], [ 67, 78 ], [ 79, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 80, 87 ], [ 87, 88 ], [ 87, 89 ], [ 80, 90 ], [ 90, 91 ], [ 91, 92 ], [ 80, 93 ], [ 94, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 95, 102 ], [ 102, 103 ], [ 102, 104 ], [ 95, 105 ], [ 105, 106 ], [ 106, 107 ], [ 95, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 113, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 111, 117 ], [ 110, 118 ], [ 118, 119 ], [ 51, 120 ], [ 120, 121 ], [ 49, 122 ], [ 122, 123 ], [ 49, 124 ], [ 124, 125 ] ]
[ "import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n, x;\n while(true){\n n = scan.nextInt();\n x = scan.nextInt();\n if(n == 0 && x == 0) break;\n System.out.println(calcCombi(n, x));\n }\n }\n public static int calcCombi(int n, int x){\n if(x < 6) return 0;\n int i, j, k;\n int count = 0;\n for(i = 1; i <= n; i++){\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }\n return count;\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n, x;\n while(true){\n n = scan.nextInt();\n x = scan.nextInt();\n if(n == 0 && x == 0) break;\n System.out.println(calcCombi(n, x));\n }\n }\n public static int calcCombi(int n, int x){\n if(x < 6) return 0;\n int i, j, k;\n int count = 0;\n for(i = 1; i <= n; i++){\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }\n return count;\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n, x;\n while(true){\n n = scan.nextInt();\n x = scan.nextInt();\n if(n == 0 && x == 0) break;\n System.out.println(calcCombi(n, x));\n }\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n, x;\n while(true){\n n = scan.nextInt();\n x = scan.nextInt();\n if(n == 0 && x == 0) break;\n System.out.println(calcCombi(n, x));\n }\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n", "n", "x;", "x", "while(true){\n n = scan.nextInt();\n x = scan.nextInt();\n if(n == 0 && x == 0) break;\n System.out.println(calcCombi(n, x));\n }", "true", "{\n n = scan.nextInt();\n x = scan.nextInt();\n if(n == 0 && x == 0) break;\n System.out.println(calcCombi(n, x));\n }", "n = scan.nextInt()", "n", "scan.nextInt()", "scan.nextInt", "scan", "x = scan.nextInt()", "x", "scan.nextInt()", "scan.nextInt", "scan", "if(n == 0 && x == 0) break;", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "break;", "System.out.println(calcCombi(n, x))", "System.out.println", "System.out", "System", "System.out", "calcCombi(n, x)", "calcCombi", "n", "x", "String[] args", "args", "public static int calcCombi(int n, int x){\n if(x < 6) return 0;\n int i, j, k;\n int count = 0;\n for(i = 1; i <= n; i++){\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }\n return count;\n }", "calcCombi", "{\n if(x < 6) return 0;\n int i, j, k;\n int count = 0;\n for(i = 1; i <= n; i++){\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }\n return count;\n }", "if(x < 6) return 0;", "x < 6", "x", "6", "return 0;", "0", "int i", "i", "j", "j", "k;", "k", "int count = 0;", "count", "0", "for(i = 1; i <= n; i++){\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }", "i = 1;", "i = 1", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }", "{\n for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }\n }", "for(j = i + 1; j <= n; j++){\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }", "j = i + 1;", "j = i + 1", "j", "i + 1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }", "{\n for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }\n }", "for(k = j + 1; k <= n; k++){\n if(i + j + k == x) count++;\n }", "k = j + 1;", "k = j + 1", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n if(i + j + k == x) count++;\n }", "{\n if(i + j + k == x) count++;\n }", "if(i + j + k == x) count++;", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "count++", "count", "return count;", "count", "int n", "n", "int x", "x" ]
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int n, x; while(true){ n = scan.nextInt(); x = scan.nextInt(); if(n == 0 && x == 0) break; System.out.println(calcCombi(n, x)); } } public static int calcCombi(int n, int x){ if(x < 6) return 0; int i, j, k; int count = 0; for(i = 1; i <= n; i++){ for(j = i + 1; j <= n; j++){ for(k = j + 1; k <= n; k++){ if(i + j + k == x) count++; } } } return count; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 4, 18, 13, 4, 18, 13, 40, 17, 30, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 13, 2, 13, 17, 30, 3, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 17, 30, 9, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 172, 8 ], [ 172, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 16, 21 ], [ 15, 22 ], [ 22, 23 ], [ 23, 24 ], [ 15, 25 ], [ 25, 26 ], [ 26, 27 ], [ 25, 28 ], [ 28, 29 ], [ 12, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 30, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 37, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 47, 50 ], [ 47, 51 ], [ 44, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 54, 57 ], [ 57, 58 ], [ 57, 59 ], [ 44, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 65, 66 ], [ 65, 67 ], [ 44, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 44, 78 ], [ 78, 79 ], [ 78, 80 ], [ 44, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 81, 91 ], [ 91, 92 ], [ 92, 93 ], [ 81, 94 ], [ 95, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 96, 102 ], [ 102, 103 ], [ 95, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 104, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 104, 116 ], [ 116, 117 ], [ 117, 118 ], [ 104, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 126, 128 ], [ 121, 129 ], [ 129, 130 ], [ 120, 131 ], [ 131, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 135, 137 ], [ 131, 138 ], [ 138, 139 ], [ 138, 140 ], [ 131, 141 ], [ 141, 142 ], [ 142, 143 ], [ 131, 144 ], [ 145, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 149, 149 ], [ 149, 150 ], [ 149, 151 ], [ 149, 152 ], [ 145, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 158, 159 ], [ 44, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 160, 165 ], [ 30, 166 ], [ 166, 167 ], [ 167, 168 ], [ 9, 169 ], [ 169, 170 ], [ 0, 171 ], [ 171, 172 ], [ 171, 173 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) {\n try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main {\n public static void main(String[] args) {\n try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }\n }\n}", "Main", "public static void main(String[] args) {\n try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }\n }", "main", "{\n try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }\n }", "try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }", "catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }", "Exception e", "{\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }", "System.out.println(e)", "System.out.println", "System.out", "System", "System.out", "e", "e.getStackTrace()", "e.getStackTrace", "e", "System.exit(-1)", "System.exit", "System", "-1", "1", "{\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n }", "BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));", "stdReader", "new BufferedReader(new InputStreamReader(System.in))", "String line;", "line", "while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }", "(line = stdReader.readLine()) != null", "(line = stdReader.readLine())", "line", "stdReader.readLine()", "stdReader.readLine", "stdReader", "null", "{\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }", "String[] input = line.split(\" \", 0);", "input", "line.split(\" \", 0)", "line.split", "line", "\" \"", "0", "int n = Integer.parseInt(input[0]);", "n", "Integer.parseInt(input[0])", "Integer.parseInt", "Integer", "input[0]", "input", "0", "int x = Integer.parseInt(input[1]);", "x", "Integer.parseInt(input[1])", "Integer.parseInt", "Integer", "input[1]", "input", "1", "if(n == 0 && x == 0) {\n break;\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "int count = 0;", "count", "0", "for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= (n - 2)", "i", "(n - 2)", "n", "2", "i++", "i++", "i", "{\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }", "{\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }", "if(i > (x - 2)) {\n break;\n }", "i > (x - 2)", "i", "(x - 2)", "x", "2", "{\n break;\n }", "break;", "for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }", "int j = (i + 1);", "int j = (i + 1);", "j", "(i + 1)", "i", "1", "j <= (n - 1)", "j", "(n - 1)", "n", "1", "j++", "j++", "j", "{\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }", "{\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }", "if(i + j > x - 1) {\n continue;\n }", "i + j > x - 1", "i + j", "i", "j", "x - 1", "x", "1", "{\n continue;\n }", "continue;", "for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }", "int k = (j + 1);", "int k = (j + 1);", "k", "(j + 1)", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }", "{\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }", "int sum = i + j + k;", "sum", "i + j + k", "i + j + k", "i", "j", "k", "if(sum == x) {\n count++;\n }", "sum == x", "sum", "x", "{\n count++;\n }", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "stdReader.close()", "stdReader.close", "stdReader", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n try {\n BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));\n \n String line;\n \n while((line = stdReader.readLine()) != null) {\n String[] input = line.split(\" \", 0);\n int n = Integer.parseInt(input[0]); \n int x = Integer.parseInt(input[1]);\n \n if(n == 0 && x == 0) {\n break;\n }\n \n int count = 0;\n \n for(int i = 1; i <= (n - 2); i++) {\n if(i > (x - 2)) {\n break;\n }\n for(int j = (i + 1); j <= (n - 1); j++) {\n if(i + j > x - 1) {\n continue;\n }\n for(int k = (j + 1); k <= n; k++) {\n int sum = i + j + k;\n if(sum == x) {\n count++;\n }\n }\n }\n }\n \n System.out.println(count);\n }\n stdReader.close();\n } catch(Exception e) {\n System.out.println(e);\n e.getStackTrace();\n System.exit(-1);\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try { BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in)); String line; while((line = stdReader.readLine()) != null) { String[] input = line.split(" ", 0); int n = Integer.parseInt(input[0]); int x = Integer.parseInt(input[1]); if(n == 0 && x == 0) { break; } int count = 0; for(int i = 1; i <= (n - 2); i++) { if(i > (x - 2)) { break; } for(int j = (i + 1); j <= (n - 1); j++) { if(i + j > x - 1) { continue; } for(int k = (j + 1); k <= n; k++) { int sum = i + j + k; if(sum == x) { count++; } } } } System.out.println(count); } stdReader.close(); } catch(Exception e) { System.out.println(e); e.getStackTrace(); System.exit(-1); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 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 ], [ 125, 8 ], [ 125, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 28, 31 ], [ 17, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 37, 38 ], [ 37, 39 ], [ 17, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 42, 45 ], [ 45, 46 ], [ 45, 47 ], [ 17, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 49, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 17, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 58, 71 ], [ 72, 72 ], [ 72, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 77, 79 ], [ 73, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 73, 85 ], [ 85, 86 ], [ 86, 87 ], [ 73, 88 ], [ 89, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 94, 95 ], [ 94, 96 ], [ 90, 97 ], [ 97, 98 ], [ 97, 99 ], [ 90, 100 ], [ 100, 101 ], [ 101, 102 ], [ 90, 103 ], [ 104, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 108, 108 ], [ 108, 109 ], [ 108, 110 ], [ 108, 111 ], [ 106, 112 ], [ 105, 113 ], [ 113, 114 ], [ 114, 115 ], [ 17, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 116, 121 ], [ 9, 122 ], [ 122, 123 ], [ 0, 124 ], [ 124, 125 ], [ 124, 126 ] ]
[ "import java.io.*;\nimport java.util.Arrays;\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\twhile(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.Arrays;", "Arrays", "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\twhile(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) throws IOException{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "main", "{ \n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "int count = 0;", "count", "0", "String line = br.readLine();", "line", "br.readLine()", "br.readLine", "br", "String[] spl = line.split(\" \");", "spl", "line.split(\" \")", "line.split", "line", "\" \"", "int n = Integer.parseInt(spl[0]);", "n", "Integer.parseInt(spl[0])", "Integer.parseInt", "Integer", "spl[0]", "spl", "0", "int x = Integer.parseInt(spl[1]);", "x", "Integer.parseInt(spl[1])", "Integer.parseInt", "Integer", "spl[1]", "spl", "1", "if(n == 0 && x == 0){break;}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{break;}", "break;", "for (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= (n-2)", "i", "(n-2)", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i+1 ;", "int j = i+1 ;", "j", "i+1", "i", "1", "j<= (n-1)", "j", "(n-1)", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = j+1 ;", "int k = j+1 ;", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "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\twhile(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\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\twhile(true){\n\t\t\tint count = 0;\n\t\t\tString line = br.readLine();\n\t\t\tString[] spl = line.split(\" \");\n\t\t\tint n = Integer.parseInt(spl[0]);\n\t\t\tint x = Integer.parseInt(spl[1]);\n\t\t\tif(n == 0 && x == 0){break;}\n\t\t\tfor (int i = 1 ; i <= (n-2) ; i++ ) {\n\t\t\t\tfor (int j = i+1 ; j<= (n-1) ; j++ ) {\n\t\t\t\t\tfor (int k = j+1 ; k <= n ; k++) {\n\t\t\t\t\t\tif(i + j + k == x){\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t}\n}", "Main" ]
import java.io.*; import java.util.Arrays; public class Main{ public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true){ int count = 0; String line = br.readLine(); String[] spl = line.split(" "); int n = Integer.parseInt(spl[0]); int x = Integer.parseInt(spl[1]); if(n == 0 && x == 0){break;} for (int i = 1 ; i <= (n-2) ; i++ ) { for (int j = i+1 ; j<= (n-1) ; j++ ) { for (int k = j+1 ; k <= n ; k++) { if(i + j + k == x){ count++; } } } } System.out.println(count); } } }
[ 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, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 17, 30, 41, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 14, 2, 13, 17, 30, 4, 18, 13, 17, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 40, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 2, 2, 13, 13, 13, 13, 30, 41, 13, 17, 28, 13, 13, 30, 30, 14, 2, 2, 2, 2, 2, 18, 13, 17, 13, 2, 18, 13, 17, 13, 2, 18, 13, 17, 13, 2, 2, 2, 18, 13, 17, 13, 2, 18, 13, 17, 13, 2, 18, 13, 17, 13, 2, 2, 2, 18, 13, 17, 13, 2, 18, 13, 17, 13, 2, 18, 13, 17, 13, 30, 0, 13, 17, 3, 14, 13, 30, 41, 13, 20, 17, 0, 18, 13, 17, 13, 0, 18, 13, 17, 13, 0, 18, 13, 17, 13, 4, 18, 13, 13, 3, 4, 18, 13, 4, 18, 13, 28, 13, 13, 30, 30, 4, 18, 18, 13, 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 ], [ 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 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 32, 33 ], [ 27, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 34, 40 ], [ 40, 41 ], [ 34, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 47, 52 ], [ 44, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 55, 58 ], [ 58, 59 ], [ 58, 60 ], [ 44, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 44, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 70, 74 ], [ 74, 75 ], [ 74, 76 ], [ 69, 77 ], [ 77, 78 ], [ 69, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 80, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 89, 95 ], [ 95, 96 ], [ 89, 97 ], [ 97, 98 ], [ 89, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 117, 118 ], [ 117, 119 ], [ 112, 120 ], [ 120, 121 ], [ 121, 122 ], [ 112, 123 ], [ 124, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 130, 131 ], [ 130, 132 ], [ 125, 133 ], [ 133, 134 ], [ 134, 135 ], [ 125, 136 ], [ 137, 137 ], [ 137, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 142, 146 ], [ 146, 147 ], [ 146, 148 ], [ 141, 149 ], [ 149, 150 ], [ 149, 151 ], [ 139, 152 ], [ 152, 153 ], [ 154, 154 ], [ 154, 155 ], [ 154, 156 ], [ 154, 157 ], [ 152, 158 ], [ 138, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 159, 163 ], [ 163, 164 ], [ 163, 165 ], [ 163, 166 ], [ 167, 167 ], [ 167, 168 ], [ 168, 169 ], [ 170, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 173, 177 ], [ 172, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 178, 182 ], [ 171, 183 ], [ 183, 184 ], [ 184, 185 ], [ 184, 186 ], [ 183, 187 ], [ 170, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 191, 193 ], [ 190, 194 ], [ 189, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 195, 199 ], [ 188, 200 ], [ 200, 201 ], [ 201, 202 ], [ 201, 203 ], [ 200, 204 ], [ 170, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 208, 209 ], [ 208, 210 ], [ 207, 211 ], [ 206, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 212, 216 ], [ 205, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 221 ], [ 168, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 222, 226 ], [ 159, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 230, 231 ], [ 230, 232 ], [ 229, 234 ], [ 234, 235 ], [ 235, 236 ], [ 235, 237 ], [ 234, 238 ], [ 229, 239 ], [ 239, 240 ], [ 240, 241 ], [ 240, 242 ], [ 239, 243 ], [ 229, 244 ], [ 244, 245 ], [ 245, 246 ], [ 245, 247 ], [ 244, 248 ], [ 229, 249 ], [ 249, 250 ], [ 250, 251 ], [ 249, 252 ], [ 229, 253 ], [ 89, 254 ], [ 254, 255 ], [ 255, 256 ], [ 254, 257 ], [ 257, 258 ], [ 258, 259 ], [ 34, 260 ], [ 260, 261 ], [ 260, 262 ], [ 260, 263 ], [ 264, 264 ], [ 264, 265 ], [ 265, 266 ], [ 266, 267 ], [ 267, 268 ], [ 267, 269 ], [ 265, 270 ], [ 18, 271 ], [ 271, 272 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.List;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\ttry {\n\t\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\t\tint n, x;\n\t\t\tdo {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);\n\t\t\tfor (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\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.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "class Main {\n\tpublic static void main(String[] args) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\ttry {\n\t\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\t\tint n, x;\n\t\t\tdo {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);\n\t\t\tfor (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\ttry {\n\t\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\t\tint n, x;\n\t\t\tdo {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);\n\t\t\tfor (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "main", "{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\ttry {\n\t\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\t\tint n, x;\n\t\t\tdo {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);\n\t\t\tfor (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "InputStreamReader isr = new InputStreamReader(System.in);", "isr", "new InputStreamReader(System.in)", "BufferedReader br = new BufferedReader(isr);", "br", "new BufferedReader(isr)", "try {\n\t\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\t\tint n, x;\n\t\t\tdo {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);\n\t\t\tfor (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}", "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\t\t\tList<Integer> ret = new ArrayList<Integer>();\n\t\t\tint n, x;\n\t\t\tdo {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);\n\t\t\tfor (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}\n\t\t}", "List<Integer> ret = new ArrayList<Integer>();", "ret", "new ArrayList<Integer>()", "int n", "n", "x;", "x", "do {\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (true);", "true", "{\n\t\t\t\tString[] inputList = br.readLine().split(\" \");\n\t\t\t\tn = Integer.parseInt(inputList[0]);\n\t\t\t\tx = Integer.parseInt(inputList[1]);\n\t\t\t\tif (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "String[] inputList = br.readLine().split(\" \");", "inputList", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "n = Integer.parseInt(inputList[0])", "n", "Integer.parseInt(inputList[0])", "Integer.parseInt", "Integer", "inputList[0]", "inputList", "0", "x = Integer.parseInt(inputList[1])", "x", "Integer.parseInt(inputList[1])", "Integer.parseInt", "Integer", "inputList[1]", "inputList", "1", "if (n == 0 && x == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\t\tbreak;\n\t\t\t\t}", "break;", "{\n\t\t\t\t\tif (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}\n\t\t\t\t}", "if (x < 6) {\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}", "x < 6", "x", "6", "{\n\t\t\t\t\t\tret.add(0);\n\t\t\t\t\t}", "ret.add(0)", "ret.add", "ret", "0", "{\n\t\t\t\t\t\tList<int[]> hoge = new ArrayList<int[]>();\n\t\t\t\t\t\tint a, b, c;\n\t\t\t\t\t\tfor (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tret.add(hoge.size());\n\t\t\t\t\t}", "List<int[]> hoge = new ArrayList<int[]>();", "hoge", "new ArrayList<int[]>()", "int a", "a", "b", "b", "c;", "c", "for (a = 1; a <= n; a++) {\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "a = 1;", "a = 1", "a", "1", "a <= n", "a", "n", "a++", "a++", "a", "{\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\tfor (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "for (b = 1; b <= n; b++) {\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "b = 1;", "b = 1", "b", "1", "b <= n", "b", "n", "b++", "b++", "b", "{\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\tfor (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}", "for (c = 1; c <= n; c++) {\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "c = 1;", "c = 1", "c", "1", "c <= n", "c", "n", "c++", "c++", "c", "{\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\t\tif (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}", "if (!(a == b || b == c || a == c) && a + b + c == x) {\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "!(a == b || b == c || a == c) && a + b + c == x", "!(a == b || b == c || a == c)", "(a == b || b == c || a == c)", "a == b || b == c || a == c", "a == b", "a", "b", "b == c", "b", "c", "a == c", "a", "c", "a + b + c == x", "a + b + c", "a + b + c", "a", "b", "c", "x", "{\n\t\t\t\t\t\t\t\t\t\tboolean flg = true;\n\t\t\t\t\t\t\t\t\t\tfor (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "boolean flg = true;", "flg", "true", "for (int[] list : hoge) {\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}", "int[] list", "hoge", "{\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}", "{\n\t\t\t\t\t\t\t\t\t\t\tif ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}", "if ((list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)) {\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}", "(list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)", "(list[0] == a || list[0] == b || list[0] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[1] == a || list[1] == b || list[1] == c)\n\t\t\t\t\t\t\t\t\t\t\t\t\t&& (list[2] == a || list[2] == b || list[2] == c)", "(list[0] == a || list[0] == b || list[0] == c)", "list[0] == a || list[0] == b || list[0] == c", "list[0] == a", "list[0]", "list", "0", "a", "list[0] == b", "list[0]", "list", "0", "b", "list[0] == c", "list[0]", "list", "0", "c", "(list[1] == a || list[1] == b || list[1] == c)", "list[1] == a || list[1] == b || list[1] == c", "list[1] == a", "list[1]", "list", "1", "a", "list[1] == b", "list[1]", "list", "1", "b", "list[1] == c", "list[1]", "list", "1", "c", "(list[2] == a || list[2] == b || list[2] == c)", "list[2] == a || list[2] == b || list[2] == c", "list[2] == a", "list[2]", "list", "2", "a", "list[2] == b", "list[2]", "list", "2", "b", "list[2] == c", "list[2]", "list", "2", "c", "{\n\t\t\t\t\t\t\t\t\t\t\t\tflg = false;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t}", "flg = false", "flg", "false", "break;", "if (flg) {\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}", "flg", "{\n\t\t\t\t\t\t\t\t\t\t\tint[] tmp = new int[3];\n\t\t\t\t\t\t\t\t\t\t\ttmp[0] = a;\n\t\t\t\t\t\t\t\t\t\t\ttmp[1] = b;\n\t\t\t\t\t\t\t\t\t\t\ttmp[2] = c;\n\t\t\t\t\t\t\t\t\t\t\thoge.add(tmp);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}", "int[] tmp = new int[3];", "tmp", "new int[3]", "3", "tmp[0] = a", "tmp[0]", "tmp", "0", "a", "tmp[1] = b", "tmp[1]", "tmp", "1", "b", "tmp[2] = c", "tmp[2]", "tmp", "2", "c", "hoge.add(tmp)", "hoge.add", "hoge", "tmp", "break;", "ret.add(hoge.size())", "ret.add", "ret", "hoge.size()", "hoge.size", "hoge", "for (int num : ret) {\n\t\t\t\tSystem.out.println(num);\n\t\t\t}", "int num", "ret", "{\n\t\t\t\tSystem.out.println(num);\n\t\t\t}", "{\n\t\t\t\tSystem.out.println(num);\n\t\t\t}", "System.out.println(num)", "System.out.println", "System.out", "System", "System.out", "num", "String[] args", "args" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; class Main { public static void main(String[] args) { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); try { List<Integer> ret = new ArrayList<Integer>(); int n, x; do { String[] inputList = br.readLine().split(" "); n = Integer.parseInt(inputList[0]); x = Integer.parseInt(inputList[1]); if (n == 0 && x == 0) { break; } else { if (x < 6) { ret.add(0); } else { List<int[]> hoge = new ArrayList<int[]>(); int a, b, c; for (a = 1; a <= n; a++) { for (b = 1; b <= n; b++) { for (c = 1; c <= n; c++) { if (!(a == b || b == c || a == c) && a + b + c == x) { boolean flg = true; for (int[] list : hoge) { if ((list[0] == a || list[0] == b || list[0] == c) && (list[1] == a || list[1] == b || list[1] == c) && (list[2] == a || list[2] == b || list[2] == c)) { flg = false; break; } } if (flg) { int[] tmp = new int[3]; tmp[0] = a; tmp[1] = b; tmp[2] = c; hoge.add(tmp); break; } } } } } ret.add(hoge.size()); } } } while (true); for (int num : ret) { System.out.println(num); } } catch (IOException e) { e.printStackTrace(); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 17, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 2, 2, 13, 13, 13, 14, 2, 2, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 13, 2, 13, 17, 2, 13, 17, 30, 40, 13, 4, 18, 18, 13, 13, 2, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 112, 5 ], [ 112, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 14, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 28, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 39, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 39, 49 ], [ 49, 50 ], [ 50, 51 ], [ 39, 52 ], [ 53, 53 ], [ 53, 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 ], [ 72, 72 ], [ 72, 73 ], [ 72, 74 ], [ 72, 75 ], [ 68, 76 ], [ 76, 77 ], [ 80, 78 ], [ 90, 79 ], [ 87, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 87, 87 ], [ 87, 88 ], [ 87, 89 ], [ 90, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 92, 94 ], [ 80, 95 ], [ 95, 96 ], [ 95, 97 ], [ 76, 98 ], [ 98, 99 ], [ 99, 100 ], [ 38, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 106, 107 ], [ 106, 108 ], [ 6, 109 ], [ 109, 110 ], [ 0, 111 ], [ 111, 112 ], [ 111, 113 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }\n }\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 while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }", "true", "{\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }", "int count = 0;", "count", "0", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n break;\n }", "break;", "{\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }", "for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < n + 1", "i", "n + 1", "n", "1", "i++", "i++", "i", "{\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }", "{\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }", "for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j < n + 1", "j", "n + 1", "n", "1", "j++", "j++", "j", "{\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }", "{\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }", "int k = x - i - j;", "k", "x - i - j", "x - i - j", "x", "i", "j", "if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }", "i != j && i != k && j != k && k < n + 1 && k > 0", "k < n + 1", "j != k", "i != j && i != k && j != k && k < n + 1 && k > 0", "i != j", "i", "j", "i != k", "i", "k", "j != k", "j", "k", "k < n + 1", "k", "n + 1", "n", "1", "k > 0", "k", "0", "{\n count++;\n }", "count++", "count", "System.out.println(count / 6)", "System.out.println", "System.out", "System", "System.out", "count / 6", "count", "6", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true) {\n int count = 0;\n int n = sc.nextInt();\n int x = sc.nextInt();\n if(n == 0 && x == 0) {\n break;\n } else {\n for(int i = 1; i < n + 1; i++) {\n for(int j = 1; j < n + 1; j++) {\n int k = x - i - j;\n if(i != j && i != k && j != k && k < n + 1 && k > 0) {\n count++;\n }\n }\n }\n System.out.println(count / 6);\n }\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true) { int count = 0; int n = sc.nextInt(); int x = sc.nextInt(); if(n == 0 && x == 0) { break; } else { for(int i = 1; i < n + 1; i++) { for(int j = 1; j < n + 1; j++) { int k = x - i - j; if(i != j && i != k && j != k && k < n + 1 && k > 0) { count++; } } } System.out.println(count / 6); } } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 20, 42, 2, 0, 13, 4, 18, 13, 17, 30, 14, 4, 18, 13, 17, 30, 3, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 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 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 128, 11 ], [ 128, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 14, 17 ], [ 17, 18 ], [ 17, 19 ], [ 14, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 25, 26 ], [ 21, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 29, 34 ], [ 34, 35 ], [ 28, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 28, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 28, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 53, 54 ], [ 52, 55 ], [ 55, 56 ], [ 55, 57 ], [ 28, 58 ], [ 58, 59 ], [ 58, 60 ], [ 28, 61 ], [ 61, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 61, 66 ], [ 66, 67 ], [ 66, 68 ], [ 68, 69 ], [ 68, 70 ], [ 61, 71 ], [ 71, 72 ], [ 72, 73 ], [ 61, 74 ], [ 75, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 76, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 76, 88 ], [ 88, 89 ], [ 89, 90 ], [ 76, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 93, 100 ], [ 100, 101 ], [ 100, 102 ], [ 93, 103 ], [ 103, 104 ], [ 104, 105 ], [ 93, 106 ], [ 107, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 111, 111 ], [ 111, 112 ], [ 111, 113 ], [ 111, 114 ], [ 109, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 28, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 12, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tString line;\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}\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", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tString line;\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tString line;\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}", "main", "{\n\t\t// TODO Auto-generated method stub\n\t\tString line;\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}", "String line;", "line", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "while ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}", "(line = br.readLine()) != null", "(line = br.readLine())", "line", "br.readLine()", "br.readLine", "br", "null", "{\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}", "if (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}", "line.equals(\"0 0\")", "line.equals", "line", "\"0 0\"", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "String[] arr = line.split(\" \");", "arr", "line.split(\" \")", "line.split", "line", "\" \"", "int n = Integer.parseInt(arr[0]);", "n", "Integer.parseInt(arr[0])", "Integer.parseInt", "Integer", "arr[0]", "arr", "0", "int x = Integer.parseInt(arr[1]);", "x", "Integer.parseInt(arr[1])", "Integer.parseInt", "Integer", "arr[1]", "arr", "1", "int ans = 0;", "ans", "0", "for (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n - 2", "i", "n - 2", "n", "2", "i++", "i++", "i", "{\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n - 1", "j", "n - 1", "n", "1", "j++", "j++", "j", "{\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}", "ans++", "ans", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tString line;\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tString line;\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tif (line.equals(\"0 0\")) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tString[] arr = line.split(\" \");\n\t\t\tint n = Integer.parseInt(arr[0]);\n\t\t\tint x = Integer.parseInt(arr[1]);\n\n\t\t\tint ans = 0;\n\t\t\tfor (int i = 1; i <= n - 2; i++) {\n\t\t\t\tfor (int j = i + 1; j <= n - 1; j++) {\n\t\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tans++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t}\n\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 { // TODO Auto-generated method stub String line; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while ((line = br.readLine()) != null) { if (line.equals("0 0")) { break; } String[] arr = line.split(" "); int n = Integer.parseInt(arr[0]); int x = Integer.parseInt(arr[1]); int ans = 0; for (int i = 1; i <= n - 2; i++) { for (int j = i + 1; j <= n - 1; j++) { for (int k = j + 1; k <= n; k++) { if (i + j + k == x) { ans++; } } } } System.out.println(ans); } } }
[ 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, 20, 11, 1, 41, 13, 17, 1, 40, 13, 30, 30, 4, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 4, 18, 13, 13, 17, 14, 2, 2, 4, 18, 13, 13, 17, 2, 4, 18, 13, 13, 17, 3, 11, 1, 41, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 4, 18, 13, 13, 17, 2, 4, 18, 13, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 13, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 13, 13, 9, 11, 1, 41, 13, 13, 2, 13, 4, 18, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 2, 13, 13, 9, 14, 2, 2, 2, 13, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 2, 4, 18, 13, 13, 17, 4, 18, 18, 13, 13, 4, 18, 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 ], [ 191, 11 ], [ 191, 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 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 27, 32 ], [ 32, 33 ], [ 33, 34 ], [ 27, 35 ], [ 36, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 37, 40 ], [ 37, 41 ], [ 41, 42 ], [ 42, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 44, 47 ], [ 44, 48 ], [ 48, 49 ], [ 49, 50 ], [ 36, 51 ], [ 51, 52 ], [ 52, 53 ], [ 51, 54 ], [ 51, 55 ], [ 36, 56 ], [ 56, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 60, 61 ], [ 59, 62 ], [ 58, 63 ], [ 57, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 65, 68 ], [ 64, 69 ], [ 56, 70 ], [ 14, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 76, 77 ], [ 77, 78 ], [ 71, 79 ], [ 80, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 83, 88 ], [ 82, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 90, 93 ], [ 89, 94 ], [ 81, 95 ], [ 80, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 96, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 104, 105 ], [ 103, 106 ], [ 96, 107 ], [ 107, 108 ], [ 108, 109 ], [ 96, 110 ], [ 111, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 112, 123 ], [ 123, 124 ], [ 124, 125 ], [ 112, 126 ], [ 127, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 128, 132 ], [ 127, 133 ], [ 133, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 133, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 140, 143 ], [ 133, 144 ], [ 144, 145 ], [ 145, 146 ], [ 133, 147 ], [ 148, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 150, 154 ], [ 154, 155 ], [ 154, 156 ], [ 149, 157 ], [ 148, 158 ], [ 158, 159 ], [ 159, 160 ], [ 161, 161 ], [ 161, 162 ], [ 161, 163 ], [ 161, 164 ], [ 159, 165 ], [ 165, 166 ], [ 166, 167 ], [ 165, 168 ], [ 158, 169 ], [ 169, 170 ], [ 170, 171 ], [ 169, 172 ], [ 169, 173 ], [ 173, 174 ], [ 174, 175 ], [ 175, 176 ], [ 174, 177 ], [ 173, 178 ], [ 80, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 181, 183 ], [ 179, 184 ], [ 184, 185 ], [ 185, 186 ], [ 184, 187 ], [ 12, 188 ], [ 188, 189 ], [ 0, 190 ], [ 190, 191 ], [ 190, 192 ] ]
[ "import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> n = new ArrayList<Integer>();\n\t\tList<Integer> x = new ArrayList<Integer>();\n\t\tList<Integer> count = new ArrayList<Integer>();\n\n\t\t for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }\n\n\n\n for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }\n\t}\n\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.List;", "List", "java.util", "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\tList<Integer> n = new ArrayList<Integer>();\n\t\tList<Integer> x = new ArrayList<Integer>();\n\t\tList<Integer> count = new ArrayList<Integer>();\n\n\t\t for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }\n\n\n\n for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> n = new ArrayList<Integer>();\n\t\tList<Integer> x = new ArrayList<Integer>();\n\t\tList<Integer> count = new ArrayList<Integer>();\n\n\t\t for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }\n\n\n\n for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> n = new ArrayList<Integer>();\n\t\tList<Integer> x = new ArrayList<Integer>();\n\t\tList<Integer> count = new ArrayList<Integer>();\n\n\t\t for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }\n\n\n\n for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "List<Integer> n = new ArrayList<Integer>();", "n", "new ArrayList<Integer>()", "List<Integer> x = new ArrayList<Integer>();", "x", "new ArrayList<Integer>()", "List<Integer> count = new ArrayList<Integer>();", "count", "new ArrayList<Integer>()", "for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }", "int i=0;", "int i=0;", "i", "0", "i++", "i++", "i", "{\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }", "{\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }", "n.add(i, scan.nextInt())", "n.add", "n", "i", "scan.nextInt()", "scan.nextInt", "scan", "x.add(i, scan.nextInt())", "x.add", "x", "i", "scan.nextInt()", "scan.nextInt", "scan", "count.add(i, 0)", "count.add", "count", "i", "0", "if(n.get(i)==0 && x.get(i)==0) break;", "n.get(i)==0 && x.get(i)==0", "n.get(i)==0", "n.get(i)", "n.get", "n", "i", "0", "x.get(i)==0", "x.get(i)", "x.get", "x", "i", "0", "break;", "for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }", "int h=0;", "int h=0;", "h", "0", "h++", "h++", "h", "{\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }", "{\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }", "if(n.get(h)==0 && x.get(h)==0) break;", "n.get(h)==0 && x.get(h)==0", "n.get(h)==0", "n.get(h)", "n.get", "n", "h", "0", "x.get(h)==0", "x.get(h)", "x.get", "x", "h", "0", "break;", "for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }", "int i=1;", "int i=1;", "i", "1", "i<=n.get(h)", "i", "n.get(h)", "n.get", "n", "h", "i++", "i++", "i", "{\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }", "{\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }", "for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }", "int j=i;", "int j=i;", "j", "i", "j<=n.get(h)", "j", "n.get(h)", "n.get", "n", "h", "j++", "j++", "j", "{\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }", "{\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }", "if(i==j)continue;", "i==j", "i", "j", "continue;", "for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }", "int k=j;", "int k=j;", "k", "j", "k <= n.get(h)", "k", "n.get(h)", "n.get", "n", "h", "k++", "k++", "k", "{\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }", "{\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }", "if(i==k || j==k)continue;", "i==k || j==k", "i==k", "i", "k", "j==k", "j", "k", "continue;", "if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );", "i+j+k == x.get(h)", "i+j+k", "i+j+k", "i", "j", "k", "x.get(h)", "x.get", "x", "h", "count.set(h, count.get(h)+1 )", "count.set", "count", "h", "count.get(h)+1", "count.get(h)", "count.get", "count", "h", "1", "System.out.println(count.get(h))", "System.out.println", "System.out", "System", "System.out", "count.get(h)", "count.get", "count", "h", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> n = new ArrayList<Integer>();\n\t\tList<Integer> x = new ArrayList<Integer>();\n\t\tList<Integer> count = new ArrayList<Integer>();\n\n\t\t for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }\n\n\n\n for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tList<Integer> n = new ArrayList<Integer>();\n\t\tList<Integer> x = new ArrayList<Integer>();\n\t\tList<Integer> count = new ArrayList<Integer>();\n\n\t\t for(int i=0;;i++){\n\t\t\t n.add(i, scan.nextInt());\n\t\t\t x.add(i, scan.nextInt());\n\t\t\t count.add(i, 0);\n\t\t\t if(n.get(i)==0 && x.get(i)==0) break;\n\t\t }\n\n\n\n for(int h=0;;h++){\n\t\t if(n.get(h)==0 && x.get(h)==0) break;\n\t\t for(int i=1;i<=n.get(h);i++){\n\t\t\t for(int j=i;j<=n.get(h);j++){\n\t\t\t\t if(i==j)continue;\n\t\t\t\t for(int k=j;k <= n.get(h);k++){\n\t\t\t\t\t if(i==k || j==k)continue;\n\t\t\t\t\t if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 );\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t\tSystem.out.println(count.get(h));\n }\n\t}\n\n}", "Main" ]
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); List<Integer> n = new ArrayList<Integer>(); List<Integer> x = new ArrayList<Integer>(); List<Integer> count = new ArrayList<Integer>(); for(int i=0;;i++){ n.add(i, scan.nextInt()); x.add(i, scan.nextInt()); count.add(i, 0); if(n.get(i)==0 && x.get(i)==0) break; } for(int h=0;;h++){ if(n.get(h)==0 && x.get(h)==0) break; for(int i=1;i<=n.get(h);i++){ for(int j=i;j<=n.get(h);j++){ if(i==j)continue; for(int k=j;k <= n.get(h);k++){ if(i==k || j==k)continue; if(i+j+k == x.get(h)) count.set(h, count.get(h)+1 ); } } } System.out.println(count.get(h)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 17, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 30, 3, 11, 1, 0, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 0, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 116, 5 ], [ 116, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ 14, 15 ], [ 8, 16 ], [ 16, 17 ], [ 8, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 8, 22 ], [ 22, 23 ], [ 8, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 37, 38 ], [ 37, 39 ], [ 26, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 45, 47 ], [ 40, 48 ], [ 48, 49 ], [ 26, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 50, 58 ], [ 58, 59 ], [ 59, 60 ], [ 50, 61 ], [ 62, 62 ], [ 62, 63 ], [ 63, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 63, 70 ], [ 70, 71 ], [ 70, 72 ], [ 63, 73 ], [ 73, 74 ], [ 74, 75 ], [ 63, 76 ], [ 77, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 82, 83 ], [ 82, 84 ], [ 78, 85 ], [ 85, 86 ], [ 85, 87 ], [ 78, 88 ], [ 88, 89 ], [ 89, 90 ], [ 78, 91 ], [ 92, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 96, 96 ], [ 96, 97 ], [ 96, 98 ], [ 96, 99 ], [ 94, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 26, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 8, 110 ], [ 110, 111 ], [ 111, 112 ], [ 6, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n, x, i, j, k, count;\n\t\twhile (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n, x, i, j, k, count;\n\t\twhile (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n, x, i, j, k, count;\n\t\twhile (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}", "main", "{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n, x, i, j, k, count;\n\t\twhile (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}", "Scanner stdIn = new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int n", "n", "x", "x", "i", "i", "j", "j", "k", "k", "count;", "count", "while (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "true", "{\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}", "n = stdIn.nextInt()", "n", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "x = stdIn.nextInt()", "x", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "count=0", "count", "0", "if (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "n == 0 && x == 0", "n == 0", "n", "0", "x == 0", "x", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "for (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "i = 1;", "i = 1", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "j = i+1;", "j = i+1", "j", "i+1", "i", "1", "j < n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "k = j+1;", "k = j+1", "k", "j+1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "System.out.println(count)", "System.out.println", "System.out", "System", "System.out", "count", "stdIn.close()", "stdIn.close", "stdIn", "String[] args", "args", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n, x, i, j, k, count;\n\t\twhile (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint n, x, i, j, k, count;\n\t\twhile (true) {\n\t\t\tn = stdIn.nextInt();\n\t\t\tx = stdIn.nextInt();\n\t\t\tcount=0;\n\t\t\tif (n == 0 && x == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tfor (i = 1; i <= n; i++) {\n\t\t\t\tfor (j = i+1; j < n; j++) {\n\t\t\t\t\tfor (k = j+1; k <= n; k++) {\n\t\t\t\t\t\tif (i + j + k == x) {\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n\t\tstdIn.close();\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner stdIn = new Scanner(System.in); int n, x, i, j, k, count; while (true) { n = stdIn.nextInt(); x = stdIn.nextInt(); count=0; if (n == 0 && x == 0) { break; } for (i = 1; i <= n; i++) { for (j = i+1; j < n; j++) { for (k = j+1; k <= n; k++) { if (i + j + k == x) { count++; } } } } System.out.println(count); } stdIn.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 20, 42, 17, 30, 0, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 3, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 4, 18, 13, 13, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 4, 18, 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 ], [ 161, 14 ], [ 161, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 17, 21 ], [ 21, 22 ], [ 21, 23 ], [ 17, 25 ], [ 25, 26 ], [ 25, 27 ], [ 17, 28 ], [ 28, 29 ], [ 28, 30 ], [ 17, 31 ], [ 31, 32 ], [ 31, 33 ], [ 17, 34 ], [ 34, 35 ], [ 34, 36 ], [ 17, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 45, 46 ], [ 42, 47 ], [ 39, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 50, 53 ], [ 53, 54 ], [ 53, 55 ], [ 39, 56 ], [ 56, 57 ], [ 56, 58 ], [ 58, 59 ], [ 59, 60 ], [ 58, 61 ], [ 61, 62 ], [ 61, 63 ], [ 39, 64 ], [ 64, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 69, 71 ], [ 64, 72 ], [ 39, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 78, 79 ], [ 78, 80 ], [ 73, 81 ], [ 81, 82 ], [ 82, 83 ], [ 73, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 86, 93 ], [ 93, 94 ], [ 93, 95 ], [ 86, 96 ], [ 96, 97 ], [ 97, 98 ], [ 86, 99 ], [ 100, 100 ], [ 100, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 105, 107 ], [ 101, 108 ], [ 108, 109 ], [ 108, 110 ], [ 101, 111 ], [ 111, 112 ], [ 112, 113 ], [ 101, 114 ], [ 115, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 119, 119 ], [ 119, 120 ], [ 119, 121 ], [ 119, 122 ], [ 117, 123 ], [ 116, 124 ], [ 124, 125 ], [ 125, 126 ], [ 39, 127 ], [ 127, 128 ], [ 128, 129 ], [ 127, 130 ], [ 39, 131 ], [ 131, 132 ], [ 131, 133 ], [ 17, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 134, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 142, 143 ], [ 134, 144 ], [ 144, 145 ], [ 145, 146 ], [ 134, 147 ], [ 148, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 149, 154 ], [ 154, 155 ], [ 155, 156 ], [ 154, 157 ], [ 15, 158 ], [ 158, 159 ], [ 0, 160 ], [ 160, 161 ], [ 160, 162 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main\n{\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] strs = new String[2];\n\t\tint n=0, x=0, count=0;\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tfor(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}\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.ArrayList;", "ArrayList", "java.util", "public class Main\n{\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] strs = new String[2];\n\t\tint n=0, x=0, count=0;\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tfor(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}\n\t}\n}", "Main", "public static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] strs = new String[2];\n\t\tint n=0, x=0, count=0;\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tfor(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}\n\t}", "main", "{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] strs = new String[2];\n\t\tint n=0, x=0, count=0;\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tfor(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}\n\t}", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "String[] strs = new String[2];", "strs", "new String[2]", "2", "int n=0", "n", "0", "x=0", "x", "0", "count=0;", "count", "0", "ArrayList<Integer> result = new ArrayList<Integer>();", "result", "new ArrayList<Integer>()", "while(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}", "true", "{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}", "strs = br.readLine().split(\" \")", "strs", "br.readLine().split(\" \")", "br.readLine().split", "br.readLine()", "br.readLine", "br", "\" \"", "n = Integer.parseInt(strs[0])", "n", "Integer.parseInt(strs[0])", "Integer.parseInt", "Integer", "strs[0]", "strs", "0", "x = Integer.parseInt(strs[1])", "x", "Integer.parseInt(strs[1])", "Integer.parseInt", "Integer", "strs[1]", "strs", "1", "if(n==0 && x==0)\tbreak;", "n==0 && x==0", "n==0", "n", "0", "x==0", "x", "0", "break;", "for(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int j=i+1;", "int j=i+1;", "j", "i+1", "i", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int k=j+1;", "int k=j+1;", "k", "j+1", "j", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "i+j+k==x", "i+j+k", "i+j+k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}", "count++", "count", "result.add(count)", "result.add", "result", "count", "count = 0", "count", "0", "for(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}", "int cnt=0;", "int cnt=0;", "cnt", "0", "cnt<result.size()", "cnt", "result.size()", "result.size", "result", "cnt++", "cnt++", "cnt", "{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}", "{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}", "System.out.println(result.get(cnt))", "System.out.println", "System.out", "System", "System.out", "result.get(cnt)", "result.get", "result", "cnt", "String[] args", "args", "public class Main\n{\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] strs = new String[2];\n\t\tint n=0, x=0, count=0;\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tfor(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}\n\t}\n}", "public class Main\n{\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] strs = new String[2];\n\t\tint n=0, x=0, count=0;\n\t\tArrayList<Integer> result = new ArrayList<Integer>();\n\t\twhile(true)\n\t\t{\n\t\t\tstrs = br.readLine().split(\" \");\n\t\t\tn = Integer.parseInt(strs[0]);\n\t\t\tx = Integer.parseInt(strs[1]);\n\t\t\tif(n==0 && x==0)\tbreak;\n\t\t\tfor(int i=1; i<=n; i++)\n\t\t\t{\n\t\t\t\tfor(int j=i+1; j<=n; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int k=j+1; k<=n; k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(i+j+k==x)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tfor(int cnt=0; cnt<result.size(); cnt++)\n\t\t{\n\t\t\tSystem.out.println(result.get(cnt));\n\t\t}\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String[] strs = new String[2]; int n=0, x=0, count=0; ArrayList<Integer> result = new ArrayList<Integer>(); while(true) { strs = br.readLine().split(" "); n = Integer.parseInt(strs[0]); x = Integer.parseInt(strs[1]); if(n==0 && x==0) break; for(int i=1; i<=n; i++) { for(int j=i+1; j<=n; j++) { for(int k=j+1; k<=n; k++) { if(i+j+k==x) { count++; } } } } result.add(count); count = 0; } for(int cnt=0; cnt<result.size(); cnt++) { System.out.println(result.get(cnt)); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 17, 41, 13, 20, 42, 17, 30, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 30, 3, 30, 4, 18, 18, 13, 13, 4, 13, 18, 13, 17, 18, 13, 17, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 2, 2, 2, 13, 13, 13, 13, 30, 40, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 151, 5 ], [ 151, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 13 ], [ 13, 14 ], [ 13, 15 ], [ 8, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 19, 24 ], [ 24, 25 ], [ 24, 26 ], [ 19, 27 ], [ 27, 28 ], [ 28, 29 ], [ 19, 30 ], [ 31, 31 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 18, 39 ], [ 39, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 40, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 39, 51 ], [ 51, 52 ], [ 39, 53 ], [ 53, 54 ], [ 54, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 59, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 67 ], [ 67, 68 ], [ 68, 69 ], [ 6, 70 ], [ 70, 71 ], [ 151, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 74, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 78, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 98, 99 ], [ 98, 100 ], [ 91, 101 ], [ 101, 102 ], [ 102, 103 ], [ 91, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 106, 113 ], [ 113, 114 ], [ 113, 115 ], [ 106, 116 ], [ 116, 117 ], [ 117, 118 ], [ 106, 119 ], [ 120, 120 ], [ 120, 121 ], [ 121, 122 ], [ 124, 123 ], [ 131, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 128, 129 ], [ 128, 130 ], [ 131, 131 ], [ 131, 132 ], [ 131, 133 ], [ 124, 134 ], [ 134, 135 ], [ 136, 136 ], [ 136, 137 ], [ 136, 138 ], [ 136, 139 ], [ 134, 140 ], [ 121, 141 ], [ 141, 142 ], [ 142, 143 ], [ 74, 144 ], [ 144, 145 ], [ 72, 146 ], [ 146, 147 ], [ 72, 148 ], [ 148, 149 ], [ 0, 150 ], [ 150, 151 ], [ 150, 152 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint[] f_w = new int[2];\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdo {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);\n\t\tsc.close();\n\n\n\t}\n\n\tprivate static int findWays(int n, int x) {\n\t\tint cnt = 0;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cnt;\n\n\t}\n\n}\n", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint[] f_w = new int[2];\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdo {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);\n\t\tsc.close();\n\n\n\t}\n\n\tprivate static int findWays(int n, int x) {\n\t\tint cnt = 0;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cnt;\n\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tint[] f_w = new int[2];\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdo {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);\n\t\tsc.close();\n\n\n\t}", "main", "{\n\t\tint[] f_w = new int[2];\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdo {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);\n\t\tsc.close();\n\n\n\t}", "int[] f_w = new int[2];", "f_w", "new int[2]", "2", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "do {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);", "true", "{\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}", "for (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}", "int i = 0;", "int i = 0;", "i", "0", "i < 2", "i", "2", "i++", "i++", "i", "{\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}", "{\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}", "f_w[i] = sc.nextInt()", "f_w[i]", "f_w", "i", "sc.nextInt()", "sc.nextInt", "sc", "if (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}", "f_w[0] == 0 && f_w[1] == 0", "f_w[0] == 0", "f_w[0]", "f_w", "0", "0", "f_w[1] == 0", "f_w[1]", "f_w", "1", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "{\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}", "System.out.println(findWays(f_w[0], f_w[1]))", "System.out.println", "System.out", "System", "System.out", "findWays(f_w[0], f_w[1])", "findWays", "f_w[0]", "f_w", "0", "f_w[1]", "f_w", "1", "sc.close()", "sc.close", "sc", "String[] args", "args", "private static int findWays(int n, int x) {\n\t\tint cnt = 0;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cnt;\n\n\t}", "findWays", "{\n\t\tint cnt = 0;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cnt;\n\n\t}", "int cnt = 0;", "cnt", "0", "for (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "int j = i + 1;", "int j = i + 1;", "j", "i + 1", "i", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "for (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}", "int k = j + 1;", "int k = j + 1;", "k", "j + 1", "j", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}", "{\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}", "if (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}", "i != j && j != k && k != i && i + j + k == x", "k != i", "i != j && j != k && k != i && i + j + k == x", "i != j", "i", "j", "j != k", "j", "k", "k != i", "k", "i", "i + j + k == x", "i + j + k", "i + j + k", "i", "j", "k", "x", "{\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}", "cnt++", "cnt", "return cnt;", "cnt", "int n", "n", "int x", "x", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint[] f_w = new int[2];\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdo {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);\n\t\tsc.close();\n\n\n\t}\n\n\tprivate static int findWays(int n, int x) {\n\t\tint cnt = 0;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cnt;\n\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint[] f_w = new int[2];\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdo {\n\t\t\tfor (int i = 0; i < 2; i++) {\n\t\t\t\tf_w[i] = sc.nextInt();\n\t\t\t}\n\n\t\t\tif (f_w[0] == 0 && f_w[1] == 0) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t System.out.println(findWays(f_w[0], f_w[1]));\n\t\t\t}\n\t\t}while(true);\n\t\tsc.close();\n\n\n\t}\n\n\tprivate static int findWays(int n, int x) {\n\t\tint cnt = 0;\n\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = i + 1; j <= n; j++) {\n\t\t\t\tfor (int k = j + 1; k <= n; k++) {\n\n\t\t\t\t\tif (i != j && j != k && k != i && i + j + k == x) {\n\t\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn cnt;\n\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { int[] f_w = new int[2]; Scanner sc = new Scanner(System.in); do { for (int i = 0; i < 2; i++) { f_w[i] = sc.nextInt(); } if (f_w[0] == 0 && f_w[1] == 0) { break; } else { System.out.println(findWays(f_w[0], f_w[1])); } }while(true); sc.close(); } private static int findWays(int n, int x) { int cnt = 0; for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) { for (int k = j + 1; k <= n; k++) { if (i != j && j != k && k != i && i + j + k == x) { cnt++; } } } } return cnt; } }