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, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 17, 0, 18, 13, 17, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 18, 13, 2, 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, 0, 18, 13, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 13, 29, 4, 13, 13, 13, 23, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 179, 14 ], [ 179, 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 ], [ 17, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 17, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 54, 56 ], [ 47, 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 ], [ 98, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 102, 104 ], [ 98, 105 ], [ 105, 106 ], [ 105, 107 ], [ 96, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 113, 117 ], [ 17, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 123, 124 ], [ 123, 125 ], [ 15, 126 ], [ 126, 127 ], [ 179, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 143, 144 ], [ 143, 145 ], [ 136, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 149, 151 ], [ 130, 152 ], [ 152, 153 ], [ 128, 154 ], [ 154, 155 ], [ 128, 156 ], [ 156, 157 ], [ 179, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 163, 165 ], [ 163, 166 ], [ 160, 167 ], [ 167, 168 ], [ 168, 169 ], [ 168, 170 ], [ 168, 171 ], [ 158, 172 ], [ 172, 173 ], [ 158, 174 ], [ 174, 175 ], [ 158, 176 ], [ 176, 177 ], [ 0, 178 ], [ 178, 179 ], [ 178, 180 ] ]
[ "import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport 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\tint n = sc.nextInt();\n\t\tint[] sum = new int[201];\n\t\tsum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tSystem.out.println(sum[n]);\n\t}\n\n\tprivate static int gcd(int a, int b) {\n//\t\t 辗转相减法\n while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }\n return b;\n\t}\n\n\n\tprivate static int gcd(int a, int b, int c) {\n\t\tint gcd1 = gcd(a,b);\n\t\treturn gcd(gcd1, c);\n\t}\n}", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Collections;", "Collections", "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\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] sum = new int[201];\n\t\tsum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tSystem.out.println(sum[n]);\n\t}\n\n\tprivate static int gcd(int a, int b) {\n//\t\t 辗转相减法\n while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }\n return b;\n\t}\n\n\n\tprivate static int gcd(int a, int b, int c) {\n\t\tint gcd1 = gcd(a,b);\n\t\treturn gcd(gcd1, c);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] sum = new int[201];\n\t\tsum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tSystem.out.println(sum[n]);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] sum = new int[201];\n\t\tsum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tSystem.out.println(sum[n]);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int[] sum = new int[201];", "sum", "new int[201]", "201", "sum[1] = 1", "sum[1]", "sum", "1", "1", "for (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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 = 2;", "int i = 2;", "i", "2", "i <= n", "i", "n", "i++", "i++", "i", "{\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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}", "sum[i]+= sum[i-1]", "sum[i]", "sum", "i", "sum[i-1]", "sum", "i-1", "i", "1", "for (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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 <= i", "j", "i", "j++", "j++", "j", "{\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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 = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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 = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= i", "k", "i", "k++", "k++", "k", "{\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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 l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "for (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "int l = 1;", "int l = 1;", "l", "1", "l <= i", "l", "i", "l++", "l++", "l", "{\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "if (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}", "j == i || k == i || l ==i", "j == i || k == i || l ==i", "j == i", "j", "i", "k == i", "k", "i", "l ==i", "l", "i", "{\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\n\t\t\t\t\t\t}", "sum[i] += gcd(j,k,l)", "sum[i]", "sum", "i", "gcd(j,k,l)", "gcd", "j", "k", "l", "System.out.println(sum[n])", "System.out.println", "System.out", "System", "System.out", "sum[n]", "sum", "n", "String[] args", "args", "private static int gcd(int a, int b) {\n//\t\t 辗转相减法\n while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }\n return b;\n\t}", "gcd", "{\n//\t\t 辗转相减法\n while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }\n return b;\n\t}", "while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }", "a!=b", "a", "b", "{\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }", "if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }", "a>b", "a", "b", "{\n a=a-b;\n }", "a=a-b", "a", "a-b", "a", "b", "{\n b=b-a;\n }", "b=b-a", "b", "b-a", "b", "a", "return b;", "b", "int a", "a", "int b", "b", "private static int gcd(int a, int b, int c) {\n\t\tint gcd1 = gcd(a,b);\n\t\treturn gcd(gcd1, c);\n\t}", "gcd", "{\n\t\tint gcd1 = gcd(a,b);\n\t\treturn gcd(gcd1, c);\n\t}", "int gcd1 = gcd(a,b);", "gcd1", "gcd(a,b)", "gcd", "a", "b", "return gcd(gcd1, c);", "gcd(gcd1, c)", "gcd", "gcd1", "c", "int a", "a", "int b", "b", "int c", "c", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] sum = new int[201];\n\t\tsum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tSystem.out.println(sum[n]);\n\t}\n\n\tprivate static int gcd(int a, int b) {\n//\t\t 辗转相减法\n while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }\n return b;\n\t}\n\n\n\tprivate static int gcd(int a, int b, int c) {\n\t\tint gcd1 = gcd(a,b);\n\t\treturn gcd(gcd1, c);\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] sum = new int[201];\n\t\tsum[1] = 1;\n\t\tfor (int i = 2; i <= n; i++) {\n\t\t\tsum[i]+= sum[i-1];\n\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\tfor (int k = 1; k <= i ; k++) {\n\t\t\t\t\tfor (int l = 1; l <= i; l++) {\n\t\t\t\t\t\tif (j == i || k == i || l ==i) {\n\t\t\t\t\t\t\tsum[i] += gcd(j,k,l);\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\tSystem.out.println(sum[n]);\n\t}\n\n\tprivate static int gcd(int a, int b) {\n//\t\t 辗转相减法\n while(a!=b) {\n if(a>b) {\n a=a-b;\n }else {\n b=b-a;\n }\n }\n return b;\n\t}\n\n\n\tprivate static int gcd(int a, int b, int c) {\n\t\tint gcd1 = gcd(a,b);\n\t\treturn gcd(gcd1, c);\n\t}\n}", "Main" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] sum = new int[201]; sum[1] = 1; for (int i = 2; i <= n; i++) { sum[i]+= sum[i-1]; for (int j = 1; j <= i ; j++) { for (int k = 1; k <= i ; k++) { for (int l = 1; l <= i; l++) { if (j == i || k == i || l ==i) { sum[i] += gcd(j,k,l); } } } } } System.out.println(sum[n]); } private static int gcd(int a, int b) { // 辗转相减法 while(a!=b) { if(a>b) { a=a-b; }else { b=b-a; } } return b; } private static int gcd(int a, int b, int c) { int gcd1 = gcd(a,b); return gcd(gcd1, c); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 101, 5 ], [ 101, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 6, 77 ], [ 77, 78 ], [ 101, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 82, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 79, 96 ], [ 96, 97 ], [ 79, 98 ], [ 98, 99 ], [ 0, 100 ], [ 100, 101 ], [ 100, 102 ] ]
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint k = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tfor(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tscan.close();\n\t}\n\n\tpublic static int Euqlid(int a,int b){\n\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);\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\n\t\tint k = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tfor(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tscan.close();\n\t}\n\n\tpublic static int Euqlid(int a,int b){\n\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint k = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tfor(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tscan.close();\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint k = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tfor(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tscan.close();\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "for(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i =1;", "int i =1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}", "for(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}", "int l=1;", "int l=1;", "l", "1", "l<=k", "l", "k", "l++", "l++", "l", "{\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}", "{\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}", "sum += Euqlid(i,Euqlid(j,l))", "sum", "Euqlid(i,Euqlid(j,l))", "Euqlid", "i", "Euqlid(j,l)", "Euqlid", "j", "l", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "scan.close()", "scan.close", "scan", "String[] args", "args", "public static int Euqlid(int a,int b){\n\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);\n\t}", "Euqlid", "{\n\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);\n\t}", "if(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);", "b == 0", "b", "0", "{\n\t\t\treturn a;\n\t\t}", "return a;", "a", "return Euqlid(b,a%b);", "Euqlid(b,a%b)", "Euqlid", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint k = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tfor(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tscan.close();\n\t}\n\n\tpublic static int Euqlid(int a,int b){\n\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint k = scan.nextInt();\n\t\tint sum = 0;\n\n\t\tfor(int i =1;i<=k;i++) {\n\t\t\tfor(int j=1;j<=k;j++) {\n\t\t\t\tfor(int l=1;l<=k;l++) {\n\n\t\t\tsum += Euqlid(i,Euqlid(j,l));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(sum);\n\t\tscan.close();\n\t}\n\n\tpublic static int Euqlid(int a,int b){\n\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}else\n\n\t\treturn Euqlid(b,a%b);\n\t}\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int k = scan.nextInt(); int sum = 0; for(int i =1;i<=k;i++) { for(int j=1;j<=k;j++) { for(int l=1;l<=k;l++) { sum += Euqlid(i,Euqlid(j,l)); } } } System.out.println(sum); scan.close(); } public static int Euqlid(int a,int b){ if(b == 0) { return a; }else return Euqlid(b,a%b); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 14, 2, 13, 17, 30, 29, 13, 30, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 122, 5 ], [ 122, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 27, 29 ], [ 20, 30 ], [ 30, 31 ], [ 31, 32 ], [ 20, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 8, 80 ], [ 80, 81 ], [ 81, 82 ], [ 6, 83 ], [ 83, 84 ], [ 122, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 96, 98 ], [ 92, 99 ], [ 99, 100 ], [ 99, 101 ], [ 87, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 106, 107 ], [ 107, 108 ], [ 102, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 85, 117 ], [ 117, 118 ], [ 85, 119 ], [ 119, 120 ], [ 0, 121 ], [ 121, 122 ], [ 121, 123 ] ]
[ "import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n\n int out = 0;\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }\n\n System.out.println(out);\n sc.close();\n }\n static int gcd(int a, int b){\n if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\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 int k = sc.nextInt();\n\n int out = 0;\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }\n\n System.out.println(out);\n sc.close();\n }\n static int gcd(int a, int b){\n if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\n }\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n\n int out = 0;\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }\n\n System.out.println(out);\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n\n int out = 0;\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }\n\n System.out.println(out);\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int out = 0;", "out", "0", "for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < k + 1", "i", "k + 1", "k", "1", "i++", "i++", "i", "{\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }", "{\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }", "for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j < k + 1", "j", "k + 1", "k", "1", "j++", "j++", "j", "{\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }", "{\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }", "for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }", "int h = 1;", "int h = 1;", "h", "1", "h < k + 1", "h", "k + 1", "k", "1", "h++", "h++", "h", "{\n out += gcd(i, gcd(j, h));\n }", "{\n out += gcd(i, gcd(j, h));\n }", "out += gcd(i, gcd(j, h))", "out", "gcd(i, gcd(j, h))", "gcd", "i", "gcd(j, h)", "gcd", "j", "h", "System.out.println(out)", "System.out.println", "System.out", "System", "System.out", "out", "sc.close()", "sc.close", "sc", "String[] args", "args", "static int gcd(int a, int b){\n if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\n }\n }", "gcd", "{\n if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\n }\n }", "if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }", "a < b", "a", "b", "{\n int tmp = a;\n a = b;\n b = tmp;\n }", "int tmp = a;", "tmp", "a", "a = b", "a", "b", "b = tmp", "b", "tmp", "if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\n }", "b == 0", "b", "0", "{\n return a;\n }", "return a;", "a", "{\n return gcd(b, a % b);\n }", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n\n int out = 0;\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }\n\n System.out.println(out);\n sc.close();\n }\n static int gcd(int a, int b){\n if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\n }\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n\n int out = 0;\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int h = 1; h < k + 1; h++){\n out += gcd(i, gcd(j, h));\n }\n }\n }\n\n System.out.println(out);\n sc.close();\n }\n static int gcd(int a, int b){\n if(a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n if(b == 0) {\n return a;\n } else {\n return gcd(b, a % b);\n }\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int out = 0; for(int i = 1; i < k + 1; i++){ for(int j = 1; j < k + 1; j++){ for(int h = 1; h < k + 1; h++){ out += gcd(i, gcd(j, h)); } } } System.out.println(out); sc.close(); } static int gcd(int a, int b){ if(a < b) { int tmp = a; a = b; b = tmp; } if(b == 0) { return a; } else { return gcd(b, a % b); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 2, 13, 4, 13, 4, 13, 2, 13, 17, 2, 13, 17, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 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 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 70, 71 ], [ 70, 72 ], [ 63, 73 ], [ 73, 74 ], [ 73, 75 ], [ 8, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 6, 82 ], [ 82, 83 ], [ 111, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 90, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 101, 103 ], [ 86, 104 ], [ 104, 105 ], [ 84, 106 ], [ 106, 107 ], [ 84, 108 ], [ 108, 109 ], [ 0, 110 ], [ 110, 111 ], [ 110, 112 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int a = s.nextInt();\n int sum = 0;\n for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int a, int b){\n int tmp;\n while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }\n return b;\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int a = s.nextInt();\n int sum = 0;\n for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int a, int b){\n int tmp;\n while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }\n return b;\n }\n}", "Main", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int a = s.nextInt();\n int sum = 0;\n for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner s = new Scanner(System.in);\n int a = s.nextInt();\n int sum = 0;\n for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }\n System.out.println(sum);\n }", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int a = s.nextInt();", "a", "s.nextInt()", "s.nextInt", "s", "int sum = 0;", "sum", "0", "for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }", "int i = 0;", "int i = 0;", "i", "0", "i < a", "i", "a", "i++", "i++", "i", "{\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }", "{\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }", "for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }", "int j = 0;", "int j = 0;", "j", "0", "j < a", "j", "a", "j++", "j++", "j", "{\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }", "{\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }", "for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }", "int k = 0;", "int k = 0;", "k", "0", "k < a", "k", "a", "k++", "k++", "k", "{\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }", "{\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }", "sum = sum + gcd(gcd(i+1,j+1),k+1)", "sum", "sum + gcd(gcd(i+1,j+1),k+1)", "sum", "gcd(gcd(i+1,j+1),k+1)", "gcd", "gcd(i+1,j+1)", "gcd", "i+1", "i", "1", "j+1", "j", "1", "k+1", "k", "1", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int a, int b){\n int tmp;\n while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }\n return b;\n }", "gcd", "{\n int tmp;\n while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }\n return b;\n }", "int tmp;", "tmp", "while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }", "(tmp = a % b) != 0", "(tmp = a % b)", "tmp", "a % b", "a", "b", "0", "{\n a = b;\n b = tmp;\n }", "a = b", "a", "b", "b = tmp", "b", "tmp", "return b;", "b", "int a", "a", "int b", "b", "public class Main{\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int a = s.nextInt();\n int sum = 0;\n for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int a, int b){\n int tmp;\n while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }\n return b;\n }\n}", "public class Main{\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int a = s.nextInt();\n int sum = 0;\n for(int i = 0; i < a; i++){\n for(int j = 0; j < a; j++){\n for(int k = 0; k < a; k++){\n sum = sum + gcd(gcd(i+1,j+1),k+1);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int a, int b){\n int tmp;\n while ((tmp = a % b) != 0) {\n a = b;\n b = tmp;\n }\n return b;\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner s = new Scanner(System.in); int a = s.nextInt(); int sum = 0; for(int i = 0; i < a; i++){ for(int j = 0; j < a; j++){ for(int k = 0; k < a; k++){ sum = sum + gcd(gcd(i+1,j+1),k+1); } } } System.out.println(sum); } public static int gcd(int a, int b){ int tmp; while ((tmp = a % b) != 0) { a = b; b = tmp; } return b; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 4, 13, 4, 13, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 38, 5, 13, 30, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 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 ], [ 122, 11 ], [ 122, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 15, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 22, 25 ], [ 25, 26 ], [ 25, 27 ], [ 12, 28 ], [ 28, 29 ], [ 12, 30 ], [ 30, 31 ], [ 122, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 38, 41 ], [ 36, 42 ], [ 32, 43 ], [ 43, 44 ], [ 32, 45 ], [ 45, 46 ], [ 32, 47 ], [ 47, 48 ], [ 122, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 52, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 56, 65 ], [ 65, 66 ], [ 65, 67 ], [ 56, 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 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 103, 104 ], [ 94, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 108, 111 ], [ 108, 112 ], [ 56, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 49, 119 ], [ 119, 120 ], [ 0, 121 ], [ 121, 122 ], [ 121, 123 ] ]
[ "/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n{ static int hcf(int a, int b) {\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);\n\t}\n\n static int hcf(int a, int b, int c) {\n\n\t\treturn hcf(hcf(a, b), c);\n\n\t}\n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.*;", "io.*", "java", "public class Main\n{ static int hcf(int a, int b) {\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);\n\t}\n\n static int hcf(int a, int b, int c) {\n\n\t\treturn hcf(hcf(a, b), c);\n\n\t}\n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}", "Main", "static int hcf(int a, int b) {\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);\n\t}", "hcf", "{\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);\n\t}", "if (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);", "b == 0", "b", "0", "return a;", "a", "return hcf(b, a % b);", "hcf(b, a % b)", "hcf", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "static int hcf(int a, int b, int c) {\n\n\t\treturn hcf(hcf(a, b), c);\n\n\t}", "hcf", "{\n\n\t\treturn hcf(hcf(a, b), c);\n\n\t}", "return hcf(hcf(a, b), c);", "hcf(hcf(a, b), c)", "hcf", "hcf(a, b)", "hcf", "a", "b", "c", "int a", "a", "int b", "b", "int c", "c", "public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}", "main", "{\n\ttry{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}", "try{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}", "catch(Exception e)\n\t\t {}", "Exception e", "{}", "{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "long sum=0;", "sum", "0", "for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }", "{\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }", "for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }", "int j=1;", "int j=1;", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }", "{\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }", "for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "sum+=hcf(i,j,k);", "sum+=hcf(i,j,k)", "sum", "hcf(i,j,k)", "hcf", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main\n{ static int hcf(int a, int b) {\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);\n\t}\n\n static int hcf(int a, int b, int c) {\n\n\t\treturn hcf(hcf(a, b), c);\n\n\t}\n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}", "public class Main\n{ static int hcf(int a, int b) {\n\t\tif (b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn hcf(b, a % b);\n\t}\n\n static int hcf(int a, int b, int c) {\n\n\t\treturn hcf(hcf(a, b), c);\n\n\t}\n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t Scanner sc=new Scanner(System.in);\n\t\t int n=sc.nextInt();\n\t\t long sum=0;\n\t\t for(int i=1;i<=n;i++)\n\t\t {\n\t\t for(int j=1;j<=n;j++)\n\t\t {\n\t\t for(int k=1;k<=n;k++)\n\t\t sum+=hcf(i,j,k);\n\t\t }\n\t\t }\n\t\t System.out.println(sum); \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}", "Main" ]
/* package codechef; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */ public class Main { static int hcf(int a, int b) { if (b == 0) return a; else return hcf(b, a % b); } static int hcf(int a, int b, int c) { return hcf(hcf(a, b), c); } public static void main (String[] args) throws java.lang.Exception { try{ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sum=0; for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { for(int k=1;k<=n;k++) sum+=hcf(i,j,k); } } System.out.println(sum); } catch(Exception e) {} } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 17, 41, 13, 17, 41, 13, 17, 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, 0, 18, 13, 17, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 17, 13, 0, 13, 4, 13, 18, 13, 17, 18, 13, 17, 0, 13, 4, 13, 13, 18, 13, 17, 0, 13, 4, 13, 13, 18, 13, 17, 0, 13, 13, 4, 18, 13, 13, 12, 13, 30, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 41, 13, 40, 17, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 12, 13, 30, 12, 13, 30, 12, 13, 30, 0, 13, 20, 0, 13, 20, 4, 13, 4, 13, 4, 18, 13, 12, 13, 30, 29, 2, 13, 4, 18, 13, 2, 2, 13, 13, 17, 23, 13, 23, 13, 12, 13, 30, 20, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 38, 5, 13, 30, 37, 20, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 283, 8 ], [ 283, 9 ], [ 9, 10 ], [ 9, 11 ], [ 283, 12 ], [ 12, 13 ], [ 283, 14 ], [ 14, 15 ], [ 283, 16 ], [ 16, 17 ], [ 283, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 20, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 48, 52 ], [ 47, 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 ], [ 83, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 83, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 83, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 109, 112 ], [ 112, 113 ], [ 112, 114 ], [ 83, 115 ], [ 115, 116 ], [ 115, 117 ], [ 20, 118 ], [ 118, 119 ], [ 119, 120 ], [ 118, 121 ], [ 283, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 125, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 129, 133 ], [ 133, 134 ], [ 133, 135 ], [ 129, 136 ], [ 136, 137 ], [ 136, 138 ], [ 124, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 124, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 143, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 150, 151 ], [ 150, 152 ], [ 147, 153 ], [ 153, 154 ], [ 153, 155 ], [ 147, 156 ], [ 156, 157 ], [ 156, 158 ], [ 124, 159 ], [ 159, 160 ], [ 122, 161 ], [ 161, 162 ], [ 122, 163 ], [ 163, 164 ], [ 283, 165 ], [ 165, 166 ], [ 165, 167 ], [ 283, 168 ], [ 168, 169 ], [ 168, 170 ], [ 283, 171 ], [ 171, 172 ], [ 171, 173 ], [ 283, 174 ], [ 174, 175 ], [ 174, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 180, 181 ], [ 180, 182 ], [ 176, 183 ], [ 183, 184 ], [ 176, 185 ], [ 185, 186 ], [ 176, 187 ], [ 187, 188 ], [ 188, 189 ], [ 283, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 197, 198 ], [ 196, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 199, 203 ], [ 190, 204 ], [ 204, 205 ], [ 190, 206 ], [ 206, 207 ], [ 283, 208 ], [ 208, 209 ], [ 208, 210 ], [ 210, 211 ], [ 208, 212 ], [ 212, 213 ], [ 283, 214 ], [ 214, 215 ], [ 214, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 218, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 217, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 230, 231 ], [ 231, 232 ], [ 227, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 216, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 283, 241 ], [ 241, 242 ], [ 241, 243 ], [ 243, 244 ], [ 244, 245 ], [ 245, 246 ], [ 245, 247 ], [ 247, 248 ], [ 248, 249 ], [ 244, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 253, 254 ], [ 283, 255 ], [ 255, 256 ], [ 255, 257 ], [ 257, 258 ], [ 258, 259 ], [ 259, 260 ], [ 260, 261 ], [ 259, 262 ], [ 262, 263 ], [ 283, 264 ], [ 264, 265 ], [ 264, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 268, 271 ], [ 271, 272 ], [ 283, 273 ], [ 273, 274 ], [ 273, 275 ], [ 275, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 277, 280 ], [ 280, 281 ], [ 0, 282 ], [ 282, 283 ], [ 282, 284 ] ]
[ "import java.io.*;\nimport java.util.*;\n \npublic class Main {\n \n\tvoid submit() {\n\t int N = nextInt();\n int[] param = new int[3];\n int g = 0;\n long sum = 0;\n\n for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }\n out.println(sum);\n }\n\n public static final int gcd(int a, int b) {\n //a > b にする(スワップ)\n if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n \n //ユークリッドの互除法\n int r = -1;\n while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }\n \n return a; //b には r=0 の値が入るため、a を返す\n }\n\n\tvoid preCalc() {\n \n\t}\n \n\tvoid stress() {\n \n\t}\n \n\tvoid test() {\n \n\t}\n \n\tMain() throws IOException {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(System.out);\n\t\tpreCalc();\n\t\tsubmit();\n\t\t//stress();\n\t\t//test();\n\t\tout.close();\n\t}\n \n\tstatic final Random rng = new Random();\n \n\tstatic int rand(int l, int r) {\n\t\treturn l + rng.nextInt(r - l + 1);\n\t}\n \n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main();\n\t}\n \n\tBufferedReader br;\n\tPrintWriter out;\n\tStringTokenizer st;\n \n\tString nextToken() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}\n \n\tString nextString() {\n\t\ttry {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}\n \n\tint nextInt() {\n\t\treturn Integer.parseInt(nextToken());\n\t}\n \n\tlong nextLong() {\n\t\treturn Long.parseLong(nextToken());\n\t}\n \n\tdouble nextDouble() {\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n \n\tvoid submit() {\n\t int N = nextInt();\n int[] param = new int[3];\n int g = 0;\n long sum = 0;\n\n for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }\n out.println(sum);\n }\n\n public static final int gcd(int a, int b) {\n //a > b にする(スワップ)\n if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n \n //ユークリッドの互除法\n int r = -1;\n while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }\n \n return a; //b には r=0 の値が入るため、a を返す\n }\n\n\tvoid preCalc() {\n \n\t}\n \n\tvoid stress() {\n \n\t}\n \n\tvoid test() {\n \n\t}\n \n\tMain() throws IOException {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(System.out);\n\t\tpreCalc();\n\t\tsubmit();\n\t\t//stress();\n\t\t//test();\n\t\tout.close();\n\t}\n \n\tstatic final Random rng = new Random();\n \n\tstatic int rand(int l, int r) {\n\t\treturn l + rng.nextInt(r - l + 1);\n\t}\n \n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main();\n\t}\n \n\tBufferedReader br;\n\tPrintWriter out;\n\tStringTokenizer st;\n \n\tString nextToken() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}\n \n\tString nextString() {\n\t\ttry {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}\n \n\tint nextInt() {\n\t\treturn Integer.parseInt(nextToken());\n\t}\n \n\tlong nextLong() {\n\t\treturn Long.parseLong(nextToken());\n\t}\n \n\tdouble nextDouble() {\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}", "Main", "static final Random rng = new Random();", "rng", "new Random()", "BufferedReader br;", "br", "PrintWriter out;", "out", "StringTokenizer st;", "st", "void submit() {\n\t int N = nextInt();\n int[] param = new int[3];\n int g = 0;\n long sum = 0;\n\n for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }\n out.println(sum);\n }", "submit", "{\n\t int N = nextInt();\n int[] param = new int[3];\n int g = 0;\n long sum = 0;\n\n for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }\n out.println(sum);\n }", "int N = nextInt();", "N", "nextInt()", "nextInt", "int[] param = new int[3];", "param", "new int[3]", "3", "int g = 0;", "g", "0", "long sum = 0;", "sum", "0", "for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=N", "i", "N", "i++", "i++", "i", "{\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }", "{\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }", "param[0] = i", "param[0]", "param", "0", "i", "for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=N", "j", "N", "j++", "j++", "j", "{\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }", "{\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }", "param[1] = j", "param[1]", "param", "1", "j", "for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }", "int k=1;", "int k=1;", "k", "1", "k<=N", "k", "N", "k++", "k++", "k", "{\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }", "{\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }", "param[2] = k", "param[2]", "param", "2", "k", "g = gcd(param[0], param[1])", "g", "gcd(param[0], param[1])", "gcd", "param[0]", "param", "0", "param[1]", "param", "1", "g = gcd(g, param[1])", "g", "gcd(g, param[1])", "gcd", "g", "param[1]", "param", "1", "g = gcd(g, param[2])", "g", "gcd(g, param[2])", "gcd", "g", "param[2]", "param", "2", "sum += g", "sum", "g", "out.println(sum)", "out.println", "out", "sum", "public static final int gcd(int a, int b) {\n //a > b にする(スワップ)\n if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n \n //ユークリッドの互除法\n int r = -1;\n while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }\n \n return a; //b には r=0 の値が入るため、a を返す\n }", "gcd", "{\n //a > b にする(スワップ)\n if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n \n //ユークリッドの互除法\n int r = -1;\n while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }\n \n return a; //b には r=0 の値が入るため、a を返す\n }", "if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }", "a < b", "a", "b", "{\n int tmp = a;\n a = b;\n b = tmp;\n }", "int tmp = a;", "tmp", "a", "a = b", "a", "b", "b = tmp", "b", "tmp", "int r = -1;", "r", "-1", "1", "while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }", "r != 0", "r", "0", "{\n r = a % b;\n a = b;\n b = r;\n }", "r = a % b", "r", "a % b", "a", "b", "a = b", "a", "b", "b = r", "b", "r", "return a; //b には r=0 の値が入るため、a を返す", "a", "int a", "a", "int b", "b", "void preCalc() {\n \n\t}", "preCalc", "{\n \n\t}", "void stress() {\n \n\t}", "stress", "{\n \n\t}", "void test() {\n \n\t}", "test", "{\n \n\t}", "Main() throws IOException {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(System.out);\n\t\tpreCalc();\n\t\tsubmit();\n\t\t//stress();\n\t\t//test();\n\t\tout.close();\n\t}", "Main", "{\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(System.out);\n\t\tpreCalc();\n\t\tsubmit();\n\t\t//stress();\n\t\t//test();\n\t\tout.close();\n\t}", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "out = new PrintWriter(System.out)", "out", "new PrintWriter(System.out)", "preCalc()", "preCalc", "submit()", "submit", "out.close()", "out.close", "out", "static int rand(int l, int r) {\n\t\treturn l + rng.nextInt(r - l + 1);\n\t}", "rand", "{\n\t\treturn l + rng.nextInt(r - l + 1);\n\t}", "return l + rng.nextInt(r - l + 1);", "l + rng.nextInt(r - l + 1)", "l", "rng.nextInt(r - l + 1)", "rng.nextInt", "rng", "r - l + 1", "r - l", "r", "l", "1", "int l", "l", "int r", "r", "public static void main(String[] args) throws IOException {\n\t\tnew Main();\n\t}", "main", "{\n\t\tnew Main();\n\t}", "new Main()", "String[] args", "args", "String nextToken() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}", "nextToken", "{\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}", "while (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}", "st == null || !st.hasMoreTokens()", "st == null", "st", "null", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "{\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}", "try {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "IOException e", "{\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t}", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "String nextString() {\n\t\ttry {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "nextString", "{\n\t\ttry {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "try {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}", "catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}", "IOException e", "{\n\t\t\tthrow new RuntimeException(e);\n\t\t}", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t\t\treturn br.readLine();\n\t\t}", "return br.readLine();", "br.readLine()", "br.readLine", "br", "int nextInt() {\n\t\treturn Integer.parseInt(nextToken());\n\t}", "nextInt", "{\n\t\treturn Integer.parseInt(nextToken());\n\t}", "return Integer.parseInt(nextToken());", "Integer.parseInt(nextToken())", "Integer.parseInt", "Integer", "nextToken()", "nextToken", "long nextLong() {\n\t\treturn Long.parseLong(nextToken());\n\t}", "nextLong", "{\n\t\treturn Long.parseLong(nextToken());\n\t}", "return Long.parseLong(nextToken());", "Long.parseLong(nextToken())", "Long.parseLong", "Long", "nextToken()", "nextToken", "double nextDouble() {\n\t\treturn Double.parseDouble(nextToken());\n\t}", "nextDouble", "{\n\t\treturn Double.parseDouble(nextToken());\n\t}", "return Double.parseDouble(nextToken());", "Double.parseDouble(nextToken())", "Double.parseDouble", "Double", "nextToken()", "nextToken", "public class Main {\n \n\tvoid submit() {\n\t int N = nextInt();\n int[] param = new int[3];\n int g = 0;\n long sum = 0;\n\n for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }\n out.println(sum);\n }\n\n public static final int gcd(int a, int b) {\n //a > b にする(スワップ)\n if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n \n //ユークリッドの互除法\n int r = -1;\n while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }\n \n return a; //b には r=0 の値が入るため、a を返す\n }\n\n\tvoid preCalc() {\n \n\t}\n \n\tvoid stress() {\n \n\t}\n \n\tvoid test() {\n \n\t}\n \n\tMain() throws IOException {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(System.out);\n\t\tpreCalc();\n\t\tsubmit();\n\t\t//stress();\n\t\t//test();\n\t\tout.close();\n\t}\n \n\tstatic final Random rng = new Random();\n \n\tstatic int rand(int l, int r) {\n\t\treturn l + rng.nextInt(r - l + 1);\n\t}\n \n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main();\n\t}\n \n\tBufferedReader br;\n\tPrintWriter out;\n\tStringTokenizer st;\n \n\tString nextToken() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}\n \n\tString nextString() {\n\t\ttry {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}\n \n\tint nextInt() {\n\t\treturn Integer.parseInt(nextToken());\n\t}\n \n\tlong nextLong() {\n\t\treturn Long.parseLong(nextToken());\n\t}\n \n\tdouble nextDouble() {\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}", "public class Main {\n \n\tvoid submit() {\n\t int N = nextInt();\n int[] param = new int[3];\n int g = 0;\n long sum = 0;\n\n for(int i=1; i<=N; i++){\n param[0] = i;\n for(int j=1; j<=N; j++){\n param[1] = j;\n for(int k=1; k<=N; k++){\n param[2] = k;\n g = gcd(param[0], param[1]);\n g = gcd(g, param[1]);\n g = gcd(g, param[2]);\n sum += g;\n }\n }\n }\n out.println(sum);\n }\n\n public static final int gcd(int a, int b) {\n //a > b にする(スワップ)\n if (a < b) {\n int tmp = a;\n a = b;\n b = tmp;\n }\n \n //ユークリッドの互除法\n int r = -1;\n while (r != 0) {\n r = a % b;\n a = b;\n b = r;\n }\n \n return a; //b には r=0 の値が入るため、a を返す\n }\n\n\tvoid preCalc() {\n \n\t}\n \n\tvoid stress() {\n \n\t}\n \n\tvoid test() {\n \n\t}\n \n\tMain() throws IOException {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\tout = new PrintWriter(System.out);\n\t\tpreCalc();\n\t\tsubmit();\n\t\t//stress();\n\t\t//test();\n\t\tout.close();\n\t}\n \n\tstatic final Random rng = new Random();\n \n\tstatic int rand(int l, int r) {\n\t\treturn l + rng.nextInt(r - l + 1);\n\t}\n \n\tpublic static void main(String[] args) throws IOException {\n\t\tnew Main();\n\t}\n \n\tBufferedReader br;\n\tPrintWriter out;\n\tStringTokenizer st;\n \n\tString nextToken() {\n\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\ttry {\n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\t\t}\n\t\treturn st.nextToken();\n\t}\n \n\tString nextString() {\n\t\ttry {\n\t\t\treturn br.readLine();\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}\n \n\tint nextInt() {\n\t\treturn Integer.parseInt(nextToken());\n\t}\n \n\tlong nextLong() {\n\t\treturn Long.parseLong(nextToken());\n\t}\n \n\tdouble nextDouble() {\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { void submit() { int N = nextInt(); int[] param = new int[3]; int g = 0; long sum = 0; for(int i=1; i<=N; i++){ param[0] = i; for(int j=1; j<=N; j++){ param[1] = j; for(int k=1; k<=N; k++){ param[2] = k; g = gcd(param[0], param[1]); g = gcd(g, param[1]); g = gcd(g, param[2]); sum += g; } } } out.println(sum); } public static final int gcd(int a, int b) { //a > b にする(スワップ) if (a < b) { int tmp = a; a = b; b = tmp; } //ユークリッドの互除法 int r = -1; while (r != 0) { r = a % b; a = b; b = r; } return a; //b には r=0 の値が入るため、a を返す } void preCalc() { } void stress() { } void test() { } Main() throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(System.out); preCalc(); submit(); //stress(); //test(); out.close(); } static final Random rng = new Random(); static int rand(int l, int r) { return l + rng.nextInt(r - l + 1); } public static void main(String[] args) throws IOException { new Main(); } BufferedReader br; PrintWriter out; StringTokenizer st; String nextToken() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return st.nextToken(); } String nextString() { try { return br.readLine(); } catch (IOException e) { throw new RuntimeException(e); } } int nextInt() { return Integer.parseInt(nextToken()); } long nextLong() { return Long.parseLong(nextToken()); } double nextDouble() { return Double.parseDouble(nextToken()); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 29, 4, 13, 4, 13, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 14, 2, 13, 17, 29, 13, 14, 2, 13, 13, 29, 4, 13, 13, 2, 13, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 18, 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, 0, 13, 4, 18, 13, 4, 18, 13, 4, 13, 13, 13, 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 ], [ 141, 8 ], [ 141, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 15, 18 ], [ 13, 19 ], [ 9, 20 ], [ 20, 21 ], [ 9, 22 ], [ 22, 23 ], [ 9, 24 ], [ 24, 25 ], [ 141, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 28, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 28, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 46, 49 ], [ 49, 50 ], [ 49, 51 ], [ 28, 52 ], [ 52, 53 ], [ 53, 54 ], [ 53, 55 ], [ 53, 56 ], [ 56, 57 ], [ 56, 58 ], [ 26, 59 ], [ 59, 60 ], [ 26, 61 ], [ 61, 62 ], [ 141, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 65, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 76, 79 ], [ 65, 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 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 111, 112 ], [ 111, 113 ], [ 106, 114 ], [ 114, 115 ], [ 115, 116 ], [ 106, 117 ], [ 118, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 124, 125 ], [ 125, 126 ], [ 124, 127 ], [ 127, 128 ], [ 127, 129 ], [ 127, 130 ], [ 127, 131 ], [ 65, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 132, 137 ], [ 63, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ] ]
[ "import java.util.*;\nimport java.math.BigInteger;\n\npublic class Main{\n\tpublic static int gcd(int a, int b, int c){\n \treturn calculateGcd(calculateGcd(a, b), c);\n\t}\n\n\tpublic static int calculateGcd(int a, int b) {\n \tif (a == 0) return b;\n \tif (b == 0) return a;\n if (a > b) return calculateGcd(b, a % b);\n return calculateGcd(a, b % a);\n \t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n BigInteger sum = BigInteger.valueOf(0);\n for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }\n System.out.println(sum);\n }\n}", "import java.util.*;", "util.*", "java", "import java.math.BigInteger;", "BigInteger", "java.math", "public class Main{\n\tpublic static int gcd(int a, int b, int c){\n \treturn calculateGcd(calculateGcd(a, b), c);\n\t}\n\n\tpublic static int calculateGcd(int a, int b) {\n \tif (a == 0) return b;\n \tif (b == 0) return a;\n if (a > b) return calculateGcd(b, a % b);\n return calculateGcd(a, b % a);\n \t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n BigInteger sum = BigInteger.valueOf(0);\n for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }\n System.out.println(sum);\n }\n}", "Main", "public static int gcd(int a, int b, int c){\n \treturn calculateGcd(calculateGcd(a, b), c);\n\t}", "gcd", "{\n \treturn calculateGcd(calculateGcd(a, b), c);\n\t}", "return calculateGcd(calculateGcd(a, b), c);", "calculateGcd(calculateGcd(a, b), c)", "calculateGcd", "calculateGcd(a, b)", "calculateGcd", "a", "b", "c", "int a", "a", "int b", "b", "int c", "c", "public static int calculateGcd(int a, int b) {\n \tif (a == 0) return b;\n \tif (b == 0) return a;\n if (a > b) return calculateGcd(b, a % b);\n return calculateGcd(a, b % a);\n \t}", "calculateGcd", "{\n \tif (a == 0) return b;\n \tif (b == 0) return a;\n if (a > b) return calculateGcd(b, a % b);\n return calculateGcd(a, b % a);\n \t}", "if (a == 0) return b;", "a == 0", "a", "0", "return b;", "b", "if (b == 0) return a;", "b == 0", "b", "0", "return a;", "a", "if (a > b) return calculateGcd(b, a % b);", "a > b", "a", "b", "return calculateGcd(b, a % b);", "calculateGcd(b, a % b)", "calculateGcd", "b", "a % b", "a", "b", "return calculateGcd(a, b % a);", "calculateGcd(a, b % a)", "calculateGcd", "a", "b % a", "b", "a", "int a", "a", "int b", "b", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n BigInteger sum = BigInteger.valueOf(0);\n for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n BigInteger sum = BigInteger.valueOf(0);\n for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a = sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "BigInteger sum = BigInteger.valueOf(0);", "sum", "BigInteger.valueOf(0)", "BigInteger.valueOf", "BigInteger", "0", "for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=a", "i", "a", "i++", "i++", "i", "{\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }", "{\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }", "for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=a", "j", "a", "j++", "j++", "j", "{\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }", "{\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }", "for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }", "int k=1;", "int k=1;", "k", "1", "k<=a", "k", "a", "k++", "k++", "k", "{\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }", "{\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }", "sum=sum.add(BigInteger.valueOf(gcd(i,j,k)))", "sum", "sum.add(BigInteger.valueOf(gcd(i,j,k)))", "sum.add", "sum", "BigInteger.valueOf(gcd(i,j,k))", "BigInteger.valueOf", "BigInteger", "gcd(i,j,k)", "gcd", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main{\n\tpublic static int gcd(int a, int b, int c){\n \treturn calculateGcd(calculateGcd(a, b), c);\n\t}\n\n\tpublic static int calculateGcd(int a, int b) {\n \tif (a == 0) return b;\n \tif (b == 0) return a;\n if (a > b) return calculateGcd(b, a % b);\n return calculateGcd(a, b % a);\n \t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n BigInteger sum = BigInteger.valueOf(0);\n for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }\n System.out.println(sum);\n }\n}", "public class Main{\n\tpublic static int gcd(int a, int b, int c){\n \treturn calculateGcd(calculateGcd(a, b), c);\n\t}\n\n\tpublic static int calculateGcd(int a, int b) {\n \tif (a == 0) return b;\n \tif (b == 0) return a;\n if (a > b) return calculateGcd(b, a % b);\n return calculateGcd(a, b % a);\n \t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n BigInteger sum = BigInteger.valueOf(0);\n for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\n sum=sum.add(BigInteger.valueOf(gcd(i,j,k)));\n }\n }\n }\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.*; import java.math.BigInteger; public class Main{ public static int gcd(int a, int b, int c){ return calculateGcd(calculateGcd(a, b), c); } public static int calculateGcd(int a, int b) { if (a == 0) return b; if (b == 0) return a; if (a > b) return calculateGcd(b, a % b); return calculateGcd(a, b % a); } public static void main(String[] args){ Scanner sc = new Scanner(System.in); int a = sc.nextInt(); BigInteger sum = BigInteger.valueOf(0); for(int i=1;i<=a;i++){ for(int j=1;j<=a;j++){ for(int k=1;k<=a;k++){ sum=sum.add(BigInteger.valueOf(gcd(i,j,k))); } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0, 13, 2, 13, 13, 30, 0, 13, 2, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 6, 72 ], [ 72, 73 ], [ 4, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 82, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 76, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 103, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 76, 119 ], [ 119, 120 ], [ 74, 121 ], [ 121, 122 ], [ 74, 123 ], [ 123, 124 ], [ 74, 125 ], [ 125, 126 ] ]
[ "import java.util.*;\n\n\nclass Main {\n public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか\n int ans = 0;\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 ans += GCD(i,j,k);\n }\n }\n }\n System.out.println(ans);\n }\n\n public static int GCD(int x, int y, int z) {\n \n while (x != y){\n if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }\n }\n \n while (x != z){\n if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }\n } \n return z;\n }\n\n\n}\n\n", "import java.util.*;", "util.*", "java", "class Main {\n public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか\n int ans = 0;\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 ans += GCD(i,j,k);\n }\n }\n }\n System.out.println(ans);\n }\n\n public static int GCD(int x, int y, int z) {\n \n while (x != y){\n if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }\n }\n \n while (x != z){\n if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }\n } \n return z;\n }\n\n\n}", "Main", "public static void main(String[] args) {\n\tScanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか\n int ans = 0;\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 ans += GCD(i,j,k);\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n\tScanner scanner = new Scanner(System.in);\n \n int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか\n int ans = 0;\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 ans += GCD(i,j,k);\n }\n }\n }\n System.out.println(ans);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int N = scanner.nextInt();", "N", "scanner.nextInt()", "scanner.nextInt", "scanner", "int ans = 0;", "ans", "0", "for (int i = 1; i <= N ; i++){\n for (int j = 1; j <= N; j++){\n for (int k = 1; k <= N; k++){\n ans += GCD(i,j,k);\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 ans += GCD(i,j,k);\n }\n }\n }", "{\n for (int j = 1; j <= N; j++){\n for (int k = 1; k <= N; k++){\n ans += GCD(i,j,k);\n }\n }\n }", "for (int j = 1; j <= N; j++){\n for (int k = 1; k <= N; k++){\n ans += GCD(i,j,k);\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 ans += GCD(i,j,k);\n }\n }", "{\n for (int k = 1; k <= N; k++){\n ans += GCD(i,j,k);\n }\n }", "for (int k = 1; k <= N; k++){\n ans += GCD(i,j,k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= N", "k", "N", "k++", "k++", "k", "{\n ans += GCD(i,j,k);\n }", "{\n ans += GCD(i,j,k);\n }", "ans += GCD(i,j,k)", "ans", "GCD(i,j,k)", "GCD", "i", "j", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public static int GCD(int x, int y, int z) {\n \n while (x != y){\n if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }\n }\n \n while (x != z){\n if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }\n } \n return z;\n }", "GCD", "{\n \n while (x != y){\n if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }\n }\n \n while (x != z){\n if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }\n } \n return z;\n }", "while (x != y){\n if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }\n }", "x != y", "x", "y", "{\n if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }\n }", "if (x > y){\n x = x-y;\n }else{\n y = y -x;\n }", "x > y", "x", "y", "{\n x = x-y;\n }", "x = x-y", "x", "x-y", "x", "y", "{\n y = y -x;\n }", "y = y -x", "y", "y -x", "y", "x", "while (x != z){\n if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }\n }", "x != z", "x", "z", "{\n if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }\n }", "if (x > z){\n x = x-z;\n }else{\n z = z -x;\n }", "x > z", "x", "z", "{\n x = x-z;\n }", "x = x-z", "x", "x-z", "x", "z", "{\n z = z -x;\n }", "z = z -x", "z", "z -x", "z", "x", "return z;", "z", "int x", "x", "int y", "y", "int z", "z" ]
import java.util.*; class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); //next(文字列), nextDouble, nextLine(1行)とか int ans = 0; for (int i = 1; i <= N ; i++){ for (int j = 1; j <= N; j++){ for (int k = 1; k <= N; k++){ ans += GCD(i,j,k); } } } System.out.println(ans); } public static int GCD(int x, int y, int z) { while (x != y){ if (x > y){ x = x-y; }else{ y = y -x; } } while (x != z){ if (x > z){ x = x-z; }else{ z = z -x; } } return z; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 29, 13, 14, 2, 13, 13, 29, 4, 13, 13, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 13, 29, 4, 13, 13, 13, 23, 13, 23, 13, 23, 13, 6, 13, 41, 13, 17, 41, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 14, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 14, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 29, 4, 18, 13, 29, 4, 18, 13, 17, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 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 ], [ 298, 17 ], [ 298, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 20, 29 ], [ 29, 30 ], [ 29, 31 ], [ 20, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 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 ], [ 58, 63 ], [ 63, 64 ], [ 63, 65 ], [ 58, 66 ], [ 66, 67 ], [ 67, 68 ], [ 58, 69 ], [ 70, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 73, 76 ], [ 73, 77 ], [ 20, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 18, 84 ], [ 84, 85 ], [ 298, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 89, 95 ], [ 95, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 97, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 107, 110 ], [ 110, 111 ], [ 110, 112 ], [ 86, 113 ], [ 113, 114 ], [ 86, 115 ], [ 115, 116 ], [ 298, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 122, 124 ], [ 122, 125 ], [ 119, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 127, 130 ], [ 117, 131 ], [ 131, 132 ], [ 117, 133 ], [ 133, 134 ], [ 117, 135 ], [ 135, 136 ], [ 298, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 139, 141 ], [ 137, 142 ], [ 142, 143 ], [ 142, 144 ], [ 137, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 148, 150 ], [ 147, 151 ], [ 151, 152 ], [ 151, 153 ], [ 145, 154 ], [ 154, 155 ], [ 137, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 159, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 173, 174 ], [ 169, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 158, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 137, 183 ], [ 183, 184 ], [ 183, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 187, 191 ], [ 191, 192 ], [ 192, 193 ], [ 193, 194 ], [ 186, 195 ], [ 195, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 199, 200 ], [ 200, 201 ], [ 196, 202 ], [ 202, 203 ], [ 203, 204 ], [ 204, 205 ], [ 205, 206 ], [ 185, 207 ], [ 207, 208 ], [ 208, 209 ], [ 209, 210 ], [ 208, 211 ], [ 137, 212 ], [ 212, 213 ], [ 212, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 217, 218 ], [ 216, 219 ], [ 219, 220 ], [ 137, 221 ], [ 221, 222 ], [ 221, 223 ], [ 223, 224 ], [ 224, 225 ], [ 225, 226 ], [ 226, 227 ], [ 225, 228 ], [ 228, 229 ], [ 137, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 235, 236 ], [ 234, 237 ], [ 237, 238 ], [ 137, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 242, 243 ], [ 242, 244 ], [ 241, 246 ], [ 246, 247 ], [ 247, 248 ], [ 248, 249 ], [ 248, 250 ], [ 246, 251 ], [ 251, 252 ], [ 251, 253 ], [ 246, 254 ], [ 254, 255 ], [ 255, 256 ], [ 246, 257 ], [ 257, 258 ], [ 258, 259 ], [ 259, 260 ], [ 259, 261 ], [ 258, 262 ], [ 262, 263 ], [ 241, 264 ], [ 264, 265 ], [ 239, 266 ], [ 266, 267 ], [ 137, 268 ], [ 268, 269 ], [ 268, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 270, 275 ], [ 275, 276 ], [ 276, 277 ], [ 277, 278 ], [ 277, 279 ], [ 275, 280 ], [ 280, 281 ], [ 280, 282 ], [ 275, 283 ], [ 283, 284 ], [ 284, 285 ], [ 275, 286 ], [ 286, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 287, 291 ], [ 291, 292 ], [ 270, 293 ], [ 293, 294 ], [ 268, 295 ], [ 295, 296 ], [ 0, 297 ], [ 297, 298 ], [ 297, 299 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong ans = 0l;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\t\n\tstatic int gcd2(int x, int y) {\n\t\tif(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);\n\t}\n\t\n\tstatic int gcd3(int x, int y, int z) {\n\t\tint w = gcd2(x, y);\n\t\treturn gcd2(w, z);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong ans = 0l;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\t\n\tstatic int gcd2(int x, int y) {\n\t\tif(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);\n\t}\n\t\n\tstatic int gcd3(int x, int y, int z) {\n\t\tint w = gcd2(x, y);\n\t\treturn gcd2(w, z);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong ans = 0l;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong ans = 0l;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "FastScanner sc = new FastScanner(System.in);", "sc", "new FastScanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0l;", "ans", "0l", "for(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "{\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}", "for(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}", "int l = 1;", "int l = 1;", "l", "1", "l <= k", "l", "k", "l++", "l++", "l", "{\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}", "{\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}", "ans += gcd3(i, j, l)", "ans", "gcd3(i, j, l)", "gcd3", "i", "j", "l", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "static int gcd2(int x, int y) {\n\t\tif(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);\n\t}", "gcd2", "{\n\t\tif(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);\n\t}", "if(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);", "x%y == 0", "x%y", "x", "y", "0", "return y;", "y", "if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);", "x < y", "x", "y", "return gcd2(y, x);", "gcd2(y, x)", "gcd2", "y", "x", "return gcd2(y, x%y);", "gcd2(y, x%y)", "gcd2", "y", "x%y", "x", "y", "int x", "x", "int y", "y", "static int gcd3(int x, int y, int z) {\n\t\tint w = gcd2(x, y);\n\t\treturn gcd2(w, z);\n\t}", "gcd3", "{\n\t\tint w = gcd2(x, y);\n\t\treturn gcd2(w, z);\n\t}", "int w = gcd2(x, y);", "w", "gcd2(x, y)", "gcd2", "x", "y", "return gcd2(w, z);", "gcd2(w, z)", "gcd2", "w", "z", "int x", "x", "int y", "y", "int z", "z", "static class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}", "FastScanner", "private BufferedReader reader = null;", "reader", "null", "private StringTokenizer tokenizer = null;", "tokenizer", "null", "public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }", "FastScanner", "{\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }", "reader = new BufferedReader(new InputStreamReader(in))", "reader", "new BufferedReader(new InputStreamReader(in))", "tokenizer = null", "tokenizer", "null", "InputStream in", "in", "public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }", "next", "{\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }", "if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "IOException e", "{\n\t throw new RuntimeException(e);\n\t }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }", "nextLine", "{\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }", "if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }", "try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }", "IOException e", "{\n\t throw new RuntimeException(e);\n\t }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n\t return reader.readLine();\n\t }", "return reader.readLine();", "reader.readLine()", "reader.readLine", "reader", "return tokenizer.nextToken(\"\\n\");", "tokenizer.nextToken(\"\\n\")", "tokenizer.nextToken", "tokenizer", "\"\\n\"", "public long nextLong() {\n\t return Long.parseLong(next());\n\t }", "nextLong", "{\n\t return Long.parseLong(next());\n\t }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public int nextInt() {\n\t return Integer.parseInt(next());\n\t }", "nextInt", "{\n\t return Integer.parseInt(next());\n\t }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }", "nextDouble", "{\n\t return Double.parseDouble(next());\n\t }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }", "nextIntArray", "{\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }", "int[] a = new int[n];", "a", "new int[n]", "n", "for (int i = 0; i < n; i++)\n\t a[i] = nextInt();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nextInt();", "a[i] = nextInt()", "a[i]", "a", "i", "nextInt()", "nextInt", "return a;", "a", "int n", "n", "public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }", "nextLongArray", "{\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }", "long[] a = new long[n];", "a", "new long[n]", "n", "for (int i = 0; i < n; i++)\n\t a[i] = nextLong();", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "a[i] = nextLong();", "a[i] = nextLong()", "a[i]", "a", "i", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong ans = 0l;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\t\n\tstatic int gcd2(int x, int y) {\n\t\tif(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);\n\t}\n\t\n\tstatic int gcd3(int x, int y, int z) {\n\t\tint w = gcd2(x, y);\n\t\treturn gcd2(w, z);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc = new FastScanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong ans = 0l;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd3(i, j, l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\t\n\tstatic int gcd2(int x, int y) {\n\t\tif(x%y == 0) return y;\n\t\telse if(x < y) return gcd2(y, x);\n\t\telse return gcd2(y, x%y);\n\t}\n\t\n\tstatic int gcd3(int x, int y, int z) {\n\t\tint w = gcd2(x, y);\n\t\treturn gcd2(w, z);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tprivate BufferedReader reader = null;\n\t private StringTokenizer tokenizer = null;\n\t public FastScanner(InputStream in) {\n\t reader = new BufferedReader(new InputStreamReader(in));\n\t tokenizer = null;\n\t }\n\n\t public String next() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t tokenizer = new StringTokenizer(reader.readLine());\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\t return tokenizer.nextToken();\n\t }\n\n\t public String nextLine() {\n\t if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t try {\n\t return reader.readLine();\n\t } catch (IOException e) {\n\t throw new RuntimeException(e);\n\t }\n\t }\n\n\t return tokenizer.nextToken(\"\\n\");\n\t }\n\n\t public long nextLong() {\n\t return Long.parseLong(next());\n\t }\n\n\t public int nextInt() {\n\t return Integer.parseInt(next());\n\t }\n\n\t public double nextDouble() {\n\t return Double.parseDouble(next());\n\t }\n\n\t public int[] nextIntArray(int n) {\n\t int[] a = new int[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextInt();\n\t return a;\n\t }\n\n\t public long[] nextLongArray(int n) {\n\t long[] a = new long[n];\n\t for (int i = 0; i < n; i++)\n\t a[i] = nextLong();\n\t return a;\n\t }\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastScanner sc = new FastScanner(System.in); int k = sc.nextInt(); long ans = 0l; for(int i = 1; i <= k; i++) { for(int j = 1; j <= k; j++) { for(int l = 1; l <= k; l++) { ans += gcd3(i, j, l); } } } System.out.println(ans); } static int gcd2(int x, int y) { if(x%y == 0) return y; else if(x < y) return gcd2(y, x); else return gcd2(y, x%y); } static int gcd3(int x, int y, int z) { int w = gcd2(x, y); return gcd2(w, z); } static class FastScanner { private BufferedReader reader = null; private StringTokenizer tokenizer = null; public FastScanner(InputStream in) { reader = new BufferedReader(new InputStreamReader(in)); tokenizer = null; } public String next() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public String nextLine() { if (tokenizer == null || !tokenizer.hasMoreTokens()) { try { return reader.readLine(); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken("\n"); } public long nextLong() { return Long.parseLong(next()); } public int nextInt() { return Integer.parseInt(next()); } public double nextDouble() { return Double.parseDouble(next()); } public int[] nextIntArray(int n) { int[] a = new int[n]; for (int i = 0; i < n; i++) a[i] = nextInt(); return a; } public long[] nextLongArray(int n) { long[] a = new long[n]; for (int i = 0; i < n; i++) a[i] = nextLong(); return a; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 106, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 78, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 78, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 95, 98 ], [ 98, 99 ], [ 98, 100 ], [ 76, 101 ], [ 101, 102 ], [ 76, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n int cnt = 0;\n\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }\n\n System.out.println(cnt);\n }\n\n static int gcd(int m, int n) {\n if (m < n) return gcd(n, m);\n if (n == 0) return m;\n return gcd(n, m % 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\n int K = sc.nextInt();\n int cnt = 0;\n\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }\n\n System.out.println(cnt);\n }\n\n static int gcd(int m, int n) {\n if (m < n) return gcd(n, m);\n if (n == 0) return m;\n return gcd(n, m % n);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n int cnt = 0;\n\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }\n\n System.out.println(cnt);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n int cnt = 0;\n\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }\n\n System.out.println(cnt);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int cnt = 0;", "cnt", "0", "for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= K", "a", "K", "a++", "a++", "a", "{\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }", "{\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }", "for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= K", "b", "K", "b++", "b++", "b", "{\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }", "{\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }", "for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= K", "c", "K", "c++", "c++", "c", "{\n cnt += gcd(gcd(a, b), c);\n }", "{\n cnt += gcd(gcd(a, b), c);\n }", "cnt += gcd(gcd(a, b), c)", "cnt", "gcd(gcd(a, b), c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "System.out.println(cnt)", "System.out.println", "System.out", "System", "System.out", "cnt", "String[] args", "args", "static int gcd(int m, int n) {\n if (m < n) return gcd(n, m);\n if (n == 0) return m;\n return gcd(n, m % n);\n }", "gcd", "{\n if (m < n) return gcd(n, m);\n if (n == 0) return m;\n return gcd(n, m % n);\n }", "if (m < n) return gcd(n, m);", "m < n", "m", "n", "return gcd(n, m);", "gcd(n, m)", "gcd", "n", "m", "if (n == 0) return m;", "n == 0", "n", "0", "return m;", "m", "return gcd(n, m % n);", "gcd(n, m % n)", "gcd", "n", "m % n", "m", "n", "int m", "m", "int n", "n", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n int cnt = 0;\n\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }\n\n System.out.println(cnt);\n }\n\n static int gcd(int m, int n) {\n if (m < n) return gcd(n, m);\n if (n == 0) return m;\n return gcd(n, m % n);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n int cnt = 0;\n\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n for (int c = 1; c <= K; c++) {\n cnt += gcd(gcd(a, b), c);\n }\n }\n }\n\n System.out.println(cnt);\n }\n\n static int gcd(int m, int n) {\n if (m < n) return gcd(n, m);\n if (n == 0) return m;\n return gcd(n, m % n);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int cnt = 0; for (int a = 1; a <= K; a++) { for (int b = 1; b <= K; b++) { for (int c = 1; c <= K; c++) { cnt += gcd(gcd(a, b), c); } } } System.out.println(cnt); } static int gcd(int m, int n) { if (m < n) return gcd(n, m); if (n == 0) return m; return gcd(n, m % n); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 13, 0, 13, 2, 13, 4, 13, 13, 13, 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 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 15, 17 ], [ 12, 18 ], [ 11, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 6, 28 ], [ 28, 29 ], [ 6, 30 ], [ 30, 31 ], [ 114, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 34, 43 ], [ 43, 44 ], [ 43, 45 ], [ 34, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 53, 54 ], [ 53, 55 ], [ 46, 56 ], [ 56, 57 ], [ 57, 58 ], [ 46, 59 ], [ 60, 60 ], [ 60, 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 ], [ 76, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 76, 86 ], [ 86, 87 ], [ 87, 88 ], [ 76, 89 ], [ 90, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 90, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 101, 104 ], [ 34, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 32, 111 ], [ 111, 112 ], [ 0, 113 ], [ 113, 114 ], [ 113, 115 ] ]
[ "import java.util.*;\npublic class Main{\n static long gcd (long a, long b) {\n\tlong r;\n\twhile((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}\n\treturn b;\n}\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int K=sc.nextInt();\n long x=0;\n for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }\n System.out.println(x);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n static long gcd (long a, long b) {\n\tlong r;\n\twhile((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}\n\treturn b;\n}\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int K=sc.nextInt();\n long x=0;\n for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }\n System.out.println(x);\n }\n}", "Main", "static long gcd (long a, long b) {\n\tlong r;\n\twhile((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}\n\treturn b;\n}", "gcd", "{\n\tlong r;\n\twhile((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}\n\treturn b;\n}", "long r;", "r", "while((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}", "(r = a%b)!=0", "(r = a%b)", "r", "a%b", "a", "b", "0", "{\n\t\ta = b;\n\t\tb = r;\n\t}", "a = b", "a", "b", "b = r", "b", "r", "return b;", "b", "long a", "a", "long b", "b", "public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int K=sc.nextInt();\n long x=0;\n for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }\n System.out.println(x);\n }", "main", "{\n Scanner sc =new Scanner(System.in);\n int K=sc.nextInt();\n long x=0;\n for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }\n System.out.println(x);\n }", "Scanner sc =new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K=sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "long x=0;", "x", "0", "for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<K+1", "i", "K+1", "K", "1", "i++", "i++", "i", "{\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }", "{\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }", "for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<K+1", "j", "K+1", "K", "1", "j++", "j++", "j", "{\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }", "{\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }", "for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }", "int k=1;", "int k=1;", "k", "1", "k<K+1", "k", "K+1", "K", "1", "k++", "k++", "k", "{\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }", "{\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }", "long t =gcd(j,k);", "t", "gcd(j,k)", "gcd", "j", "k", "x =x+gcd(i,t)", "x", "x+gcd(i,t)", "x", "gcd(i,t)", "gcd", "i", "t", "System.out.println(x)", "System.out.println", "System.out", "System", "System.out", "x", "String[] args", "args", "public class Main{\n static long gcd (long a, long b) {\n\tlong r;\n\twhile((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}\n\treturn b;\n}\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int K=sc.nextInt();\n long x=0;\n for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }\n System.out.println(x);\n }\n}", "public class Main{\n static long gcd (long a, long b) {\n\tlong r;\n\twhile((r = a%b)!=0) {\n\t\ta = b;\n\t\tb = r;\n\t}\n\treturn b;\n}\n public static void main(String[] args){\n Scanner sc =new Scanner(System.in);\n int K=sc.nextInt();\n long x=0;\n for(int i=1;i<K+1;i++){\n for(int j=1;j<K+1;j++){\n for(int k=1;k<K+1;k++){\n long t =gcd(j,k);\n x =x+gcd(i,t);\n }\n }\n }\n System.out.println(x);\n }\n}", "Main" ]
import java.util.*; public class Main{ static long gcd (long a, long b) { long r; while((r = a%b)!=0) { a = b; b = r; } return b; } public static void main(String[] args){ Scanner sc =new Scanner(System.in); int K=sc.nextInt(); long x=0; for(int i=1;i<K+1;i++){ for(int j=1;j<K+1;j++){ for(int k=1;k<K+1;k++){ long t =gcd(j,k); x =x+gcd(i,t); } } } System.out.println(x); } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 39, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 13, 2, 13, 13, 30, 0, 13, 2, 13, 17, 9, 41, 13, 2, 13, 17, 41, 13, 2, 13, 17, 41, 13, 2, 13, 17, 41, 13, 17, 11, 1, 41, 13, 17, 41, 13, 18, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 18, 13, 13, 17, 2, 2, 13, 18, 13, 13, 17, 2, 2, 13, 18, 13, 13, 17, 30, 9, 30, 0, 13, 18, 13, 13, 0, 13, 18, 13, 13, 0, 13, 18, 13, 13, 0, 13, 18, 13, 13, 40, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 199, 5 ], [ 199, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 8, 10 ], [ 8, 11 ], [ 8, 12 ], [ 8, 13 ], [ 8, 14 ], [ 8, 15 ], [ 8, 16 ], [ 8, 17 ], [ 8, 18 ], [ 8, 19 ], [ 8, 20 ], [ 8, 21 ], [ 8, 22 ], [ 8, 23 ], [ 8, 24 ], [ 8, 25 ], [ 8, 26 ], [ 8, 27 ], [ 8, 28 ], [ 8, 29 ], [ 8, 30 ], [ 8, 31 ], [ 8, 32 ], [ 8, 33 ], [ 199, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 43, 44 ], [ 36, 45 ], [ 45, 46 ], [ 45, 47 ], [ 36, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 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 ], [ 88, 92 ], [ 92, 93 ], [ 92, 94 ], [ 87, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 86, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 86, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 109, 111 ], [ 86, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 86, 117 ], [ 117, 118 ], [ 117, 119 ], [ 86, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 121, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 127, 129 ], [ 120, 130 ], [ 130, 131 ], [ 130, 132 ], [ 120, 133 ], [ 133, 134 ], [ 134, 135 ], [ 120, 136 ], [ 137, 137 ], [ 137, 138 ], [ 138, 139 ], [ 140, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 144, 145 ], [ 144, 146 ], [ 141, 147 ], [ 140, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 151, 153 ], [ 148, 154 ], [ 140, 155 ], [ 155, 156 ], [ 156, 157 ], [ 156, 158 ], [ 158, 159 ], [ 158, 160 ], [ 155, 161 ], [ 138, 162 ], [ 162, 163 ], [ 138, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 167, 169 ], [ 164, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 172, 174 ], [ 164, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 177, 179 ], [ 164, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 182, 184 ], [ 164, 185 ], [ 185, 186 ], [ 86, 187 ], [ 187, 188 ], [ 187, 189 ], [ 36, 190 ], [ 190, 191 ], [ 191, 192 ], [ 192, 193 ], [ 192, 194 ], [ 190, 195 ], [ 34, 196 ], [ 196, 197 ], [ 0, 198 ], [ 198, 199 ], [ 198, 200 ] ]
[ "\nimport java.util.Scanner;\n\npublic class Main {\n\n static int[] prime = {2,3,5,7,11,13,\n 17,19,23,29,31,\n 37,41,43,47,53,\n 59,61,67,71,73,\n 79,83,89,97};\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }\n System.out.println(ans);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n static int[] prime = {2,3,5,7,11,13,\n 17,19,23,29,31,\n 37,41,43,47,53,\n 59,61,67,71,73,\n 79,83,89,97};\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "static int[] prime = {2,3,5,7,11,13,\n 17,19,23,29,31,\n 37,41,43,47,53,\n 59,61,67,71,73,\n 79,83,89,97};", "prime", "{2,3,5,7,11,13,\n 17,19,23,29,31,\n 37,41,43,47,53,\n 59,61,67,71,73,\n 79,83,89,97}", "2", "3", "5", "7", "11", "13", "17", "19", "23", "29", "31", "37", "41", "43", "47", "53", "59", "61", "67", "71", "73", "79", "83", "89", "97", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }", "int a=0;", "int a=0;", "a", "0", "a<k", "a", "k", "a++", "a++", "a", "{\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }", "{\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }", "for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }", "int b=0;", "int b=0;", "b", "0", "b<k", "b", "k", "b++", "b++", "b", "{\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }", "{\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }", "for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }", "int c=0;", "int c=0;", "c", "0", "c<k", "c", "k", "c++", "c++", "c", "{\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }", "{\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }", "if(a == b && a == c){\n ans += a+1;\n continue;\n }", "a == b && a == c", "a == b", "a", "b", "a == c", "a", "c", "{\n ans += a+1;\n continue;\n }", "ans += a+1", "ans", "a+1", "a", "1", "continue;", "int A = a+1", "A", "a+1", "a", "1", "B = b+1", "B", "b+1", "b", "1", "C = c+1", "C", "c+1", "c", "1", "gcd = 1;", "gcd", "1", "for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }", "int x=0,y=prime.length;", "int x=0", "x", "0", "y=prime.length;", "y", "prime.length", "prime", "prime.length", "x<y", "x", "y", "x++", "x++", "x", "{\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }", "{\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }", "if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }", "A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0", "A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0", "A%prime[x] != 0", "A%prime[x]", "A", "prime[x]", "prime", "x", "0", "B%prime[x] != 0", "B%prime[x]", "B", "prime[x]", "prime", "x", "0", "C%prime[x] != 0", "C%prime[x]", "C", "prime[x]", "prime", "x", "0", "{ //割り切れないなら次の素数へ\n continue;\n }", "continue;", "{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }", "gcd *= prime[x]", "gcd", "prime[x]", "prime", "x", "A /= prime[x]", "A", "prime[x]", "prime", "x", "B /= prime[x]", "B", "prime[x]", "prime", "x", "C /= prime[x]", "C", "prime[x]", "prime", "x", "x--", "x", "ans += gcd", "ans", "gcd", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n\n static int[] prime = {2,3,5,7,11,13,\n 17,19,23,29,31,\n 37,41,43,47,53,\n 59,61,67,71,73,\n 79,83,89,97};\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n\n static int[] prime = {2,3,5,7,11,13,\n 17,19,23,29,31,\n 37,41,43,47,53,\n 59,61,67,71,73,\n 79,83,89,97};\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n for(int a=0;a<k;a++){\n for(int b=0;b<k;b++){\n for(int c=0;c<k;c++){\n if(a == b && a == c){\n ans += a+1;\n continue;\n }\n int A = a+1, B = b+1, C = c+1, gcd = 1;\n for(int x=0,y=prime.length;x<y;x++){\n if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ\n continue;\n }else{\n gcd *= prime[x];\n A /= prime[x];\n B /= prime[x];\n C /= prime[x];\n x--; //同じ素数でもう一度試す\n }\n }\n ans += gcd;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { static int[] prime = {2,3,5,7,11,13, 17,19,23,29,31, 37,41,43,47,53, 59,61,67,71,73, 79,83,89,97}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); long ans = 0; for(int a=0;a<k;a++){ for(int b=0;b<k;b++){ for(int c=0;c<k;c++){ if(a == b && a == c){ ans += a+1; continue; } int A = a+1, B = b+1, C = c+1, gcd = 1; for(int x=0,y=prime.length;x<y;x++){ if(A%prime[x] != 0 || B%prime[x] != 0 || C%prime[x] != 0){ //割り切れないなら次の素数へ continue; }else{ gcd *= prime[x]; A /= prime[x]; B /= prime[x]; C /= prime[x]; x--; //同じ素数でもう一度試す } } ans += gcd; } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 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 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 58, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 4, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 87, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 81, 99 ], [ 99, 100 ], [ 79, 101 ], [ 101, 102 ], [ 79, 103 ], [ 103, 104 ] ]
[ "import java.util.*;\nclass Main{\n\tpublic static void main(String[] args){\n \tScanner scanner = new Scanner(System.in);\n int n = (int) scanner.nextInt();\n int ans = 0;\n \tfor (int i = 1; i <= n; i++){\n for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }\n }\n System.out.println(ans);\n \n }\n \t\n \tstatic int gcd(int a, int b){\n \twhile(a != b){\n \tif (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }\n }\n return a;\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n\tpublic static void main(String[] args){\n \tScanner scanner = new Scanner(System.in);\n int n = (int) scanner.nextInt();\n int ans = 0;\n \tfor (int i = 1; i <= n; i++){\n for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }\n }\n System.out.println(ans);\n \n }\n \t\n \tstatic int gcd(int a, int b){\n \twhile(a != b){\n \tif (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }\n }\n return a;\n }\n}", "Main", "public static void main(String[] args){\n \tScanner scanner = new Scanner(System.in);\n int n = (int) scanner.nextInt();\n int ans = 0;\n \tfor (int i = 1; i <= n; i++){\n for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }\n }\n System.out.println(ans);\n \n }", "main", "{\n \tScanner scanner = new Scanner(System.in);\n int n = (int) scanner.nextInt();\n int ans = 0;\n \tfor (int i = 1; i <= n; i++){\n for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }\n }\n System.out.println(ans);\n \n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = (int) scanner.nextInt();", "n", "(int) scanner.nextInt()", "scanner.nextInt", "scanner", "int ans = 0;", "ans", "0", "for (int i = 1; i <= n; i++){\n for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\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 int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }\n }", "{\n for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }\n }", "for (int j = 1; j <= n; j++){\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\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 int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }", "{\n for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }\n }", "for (int k = 1; k <= n; k++){\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }", "{\n int c = gcd(i, j);\t\t\n ans+= gcd(k, c);\n }", "int c = gcd(i, j);", "c", "gcd(i, j)", "gcd", "i", "j", "ans+= gcd(k, c)", "ans", "gcd(k, c)", "gcd", "k", "c", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "static int gcd(int a, int b){\n \twhile(a != b){\n \tif (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }\n }\n return a;\n }", "gcd", "{\n \twhile(a != b){\n \tif (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }\n }\n return a;\n }", "while(a != b){\n \tif (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }\n }", "a != b", "a", "b", "{\n \tif (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }\n }", "if (a >= b){\n \ta-=b;\n }else{\n \tb-=a;\n }", "a >= b", "a", "b", "{\n \ta-=b;\n }", "a-=b", "a", "b", "{\n \tb-=a;\n }", "b-=a", "b", "a", "return a;", "a", "int a", "a", "int b", "b" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int n = (int) scanner.nextInt(); int ans = 0; for (int i = 1; i <= n; i++){ for (int j = 1; j <= n; j++){ for (int k = 1; k <= n; k++){ int c = gcd(i, j); ans+= gcd(k, c); } } } System.out.println(ans); } static int gcd(int a, int b){ while(a != b){ if (a >= b){ a-=b; }else{ b-=a; } } return a; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 4, 13, 13, 2, 13, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 96, 5 ], [ 96, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 96, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 80, 90 ], [ 76, 91 ], [ 91, 92 ], [ 76, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ] ]
[ "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\tint K = sc.nextInt();\n\t\tint result = 0;\n\t\tfor (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\treturn b > 0 ? gcd(b,a%b) : a;\n\t\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\tint K = sc.nextInt();\n\t\tint result = 0;\n\t\tfor (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\treturn b > 0 ? gcd(b,a%b) : a;\n\t\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tint result = 0;\n\t\tfor (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tint result = 0;\n\t\tfor (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int result = 0;", "result", "0", "for (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a <= K", "a", "K", "a++", "a++", "a", "{\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}", "int b = 1;", "int b = 1;", "b", "1", "b <= K", "b", "K", "b++", "b++", "b", "{\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}", "for (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}", "int c = 1;", "int c = 1;", "c", "1", "c <= K", "c", "K", "c++", "c++", "c", "{\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}", "{\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}", "result += gcd(gcd(a, b), c)", "result", "gcd(gcd(a, b), c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "public static int gcd(int a, int b){\n\t\treturn b > 0 ? gcd(b,a%b) : a;\n\t\t}", "gcd", "{\n\t\treturn b > 0 ? gcd(b,a%b) : a;\n\t\t}", "return b > 0 ? gcd(b,a%b) : a;", "b > 0 ? gcd(b,a%b) : a", "b > 0", "b", "0", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "a", "int a", "a", "int b", "b", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tint result = 0;\n\t\tfor (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\treturn b > 0 ? gcd(b,a%b) : a;\n\t\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tint result = 0;\n\t\tfor (int a = 1; a <= K; a++) {\n\t\t\tfor (int b = 1; b <= K; b++) {\n\t\t\t\tfor (int c = 1; c <= K; c++) {\n\t\t\t\t\tresult += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(result);\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\treturn b > 0 ? gcd(b,a%b) : a;\n\t\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int result = 0; for (int a = 1; a <= K; a++) { for (int b = 1; b <= K; b++) { for (int c = 1; c <= K; c++) { result += gcd(gcd(a, b), c); } } } System.out.println(result); } public static int gcd(int a, int b){ return b > 0 ? gcd(b,a%b) : a; } }
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 30, 29, 4, 13, 13, 2, 13, 13, 30, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 17, 23, 13, 12, 13, 30, 29, 4, 18, 13, 23, 13, 12, 13, 30, 29, 2, 13, 17, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 18, 13, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 342, 5 ], [ 342, 6 ], [ 6, 7 ], [ 6, 8 ], [ 342, 9 ], [ 9, 10 ], [ 9, 11 ], [ 342, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 14, 19 ], [ 19, 20 ], [ 19, 21 ], [ 14, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 66, 69 ], [ 14, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 12, 76 ], [ 76, 77 ], [ 342, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 81, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 81, 95 ], [ 95, 96 ], [ 96, 97 ], [ 78, 98 ], [ 98, 99 ], [ 78, 100 ], [ 100, 101 ], [ 342, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 102, 109 ], [ 109, 110 ], [ 342, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 111, 118 ], [ 118, 119 ], [ 342, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 124, 125 ], [ 125, 126 ], [ 342, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 131, 134 ], [ 134, 135 ], [ 135, 136 ], [ 342, 137 ], [ 137, 138 ], [ 137, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 141, 144 ], [ 144, 145 ], [ 145, 146 ], [ 342, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 151, 154 ], [ 154, 155 ], [ 155, 156 ], [ 342, 157 ], [ 157, 158 ], [ 157, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 161, 164 ], [ 157, 165 ], [ 165, 166 ], [ 342, 167 ], [ 167, 168 ], [ 167, 169 ], [ 169, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 167, 174 ], [ 174, 175 ], [ 342, 176 ], [ 176, 177 ], [ 176, 178 ], [ 178, 179 ], [ 179, 180 ], [ 180, 181 ], [ 180, 182 ], [ 176, 183 ], [ 183, 184 ], [ 342, 185 ], [ 185, 186 ], [ 185, 187 ], [ 187, 188 ], [ 188, 189 ], [ 188, 190 ], [ 190, 191 ], [ 190, 192 ], [ 187, 193 ], [ 193, 194 ], [ 193, 195 ], [ 195, 196 ], [ 195, 197 ], [ 187, 198 ], [ 198, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 198, 203 ], [ 203, 204 ], [ 203, 205 ], [ 198, 206 ], [ 206, 207 ], [ 207, 208 ], [ 198, 209 ], [ 210, 210 ], [ 210, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 213, 216 ], [ 213, 217 ], [ 217, 218 ], [ 217, 219 ], [ 187, 220 ], [ 220, 221 ], [ 185, 222 ], [ 222, 223 ], [ 342, 224 ], [ 224, 225 ], [ 224, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 229, 231 ], [ 226, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 234, 236 ], [ 226, 237 ], [ 237, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 237, 242 ], [ 242, 243 ], [ 242, 244 ], [ 237, 245 ], [ 245, 246 ], [ 246, 247 ], [ 237, 248 ], [ 249, 249 ], [ 249, 250 ], [ 250, 251 ], [ 250, 252 ], [ 252, 253 ], [ 253, 254 ], [ 252, 255 ], [ 252, 256 ], [ 256, 257 ], [ 256, 258 ], [ 226, 259 ], [ 259, 260 ], [ 224, 261 ], [ 261, 262 ], [ 342, 263 ], [ 263, 264 ], [ 263, 265 ], [ 265, 266 ], [ 266, 267 ], [ 266, 268 ], [ 268, 269 ], [ 268, 270 ], [ 265, 271 ], [ 271, 272 ], [ 271, 273 ], [ 273, 274 ], [ 273, 275 ], [ 265, 276 ], [ 276, 277 ], [ 277, 278 ], [ 278, 279 ], [ 278, 280 ], [ 276, 281 ], [ 281, 282 ], [ 281, 283 ], [ 276, 284 ], [ 284, 285 ], [ 285, 286 ], [ 276, 287 ], [ 288, 288 ], [ 288, 289 ], [ 289, 290 ], [ 289, 291 ], [ 291, 292 ], [ 292, 293 ], [ 291, 294 ], [ 291, 295 ], [ 295, 296 ], [ 295, 297 ], [ 265, 298 ], [ 298, 299 ], [ 263, 300 ], [ 300, 301 ], [ 342, 302 ], [ 302, 303 ], [ 302, 304 ], [ 304, 305 ], [ 305, 306 ], [ 305, 307 ], [ 307, 308 ], [ 307, 309 ], [ 304, 310 ], [ 310, 311 ], [ 310, 312 ], [ 312, 313 ], [ 312, 314 ], [ 304, 315 ], [ 315, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 315, 320 ], [ 320, 321 ], [ 320, 322 ], [ 315, 323 ], [ 323, 324 ], [ 324, 325 ], [ 315, 326 ], [ 327, 327 ], [ 327, 328 ], [ 328, 329 ], [ 328, 330 ], [ 330, 331 ], [ 331, 332 ], [ 330, 333 ], [ 330, 334 ], [ 334, 335 ], [ 334, 336 ], [ 304, 337 ], [ 337, 338 ], [ 302, 339 ], [ 339, 340 ], [ 0, 341 ], [ 341, 342 ], [ 341, 343 ] ]
[ "import java.util.*;\n\n//update 2020/1/1 23:01\n\npublic class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int k = nextInt();\n\n int ans = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }\n\n System.out.println(ans);\n\n }\n\n static int gcd(int a,int b){\n if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }\n }\n\n\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int k = nextInt();\n\n int ans = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }\n\n System.out.println(ans);\n\n }\n\n static int gcd(int a,int b){\n if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }\n }\n\n\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "Main", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "static StringBuilder sb = new StringBuilder();", "sb", "new StringBuilder()", "public static void main(String[] args) {\n\n int k = nextInt();\n\n int ans = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }\n\n System.out.println(ans);\n\n }", "main", "{\n\n int k = nextInt();\n\n int ans = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }\n\n System.out.println(ans);\n\n }", "int k = nextInt();", "k", "nextInt()", "nextInt", "int ans = 0;", "ans", "0", "for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }", "{\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }", "for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }", "{\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }", "for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }", "int c=1;", "int c=1;", "c", "1", "c<=k", "c", "k", "c++", "c++", "c", "{\n ans += gcd(i,gcd(j,c));\n }", "{\n ans += gcd(i,gcd(j,c));\n }", "ans += gcd(i,gcd(j,c))", "ans", "gcd(i,gcd(j,c))", "gcd", "i", "gcd(j,c)", "gcd", "j", "c", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "static int gcd(int a,int b){\n if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }\n }", "gcd", "{\n if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }\n }", "if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }", "a%b!=0", "a%b", "a", "b", "0", "{\n return gcd(b,a%b);\n }", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "{\n return b;\n }", "return b;", "b", "int a", "a", "int b", "b", "static String toSmall(String s){\n return s.toLowerCase();\n }", "toSmall", "{\n return s.toLowerCase();\n }", "return s.toLowerCase();", "s.toLowerCase()", "s.toLowerCase", "s", "String s", "s", "static String toBig(String s){\n return s.toUpperCase();\n }", "toBig", "{\n return s.toUpperCase();\n }", "return s.toUpperCase();", "s.toUpperCase()", "s.toUpperCase", "s", "String s", "s", "static String next(){\n return sc.next();\n }", "next", "{\n return sc.next();\n }", "return sc.next();", "sc.next()", "sc.next", "sc", "static int nextInt(){\n return Integer.parseInt(sc.next());\n }", "nextInt", "{\n return Integer.parseInt(sc.next());\n }", "return Integer.parseInt(sc.next());", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "static long nextLong(){\n return Long.parseLong(sc.next());\n }", "nextLong", "{\n return Long.parseLong(sc.next());\n }", "return Long.parseLong(sc.next());", "Long.parseLong(sc.next())", "Long.parseLong", "Long", "sc.next()", "sc.next", "sc", "static double nextDouble(){\n return Double.parseDouble(sc.next());\n }", "nextDouble", "{\n return Double.parseDouble(sc.next());\n }", "return Double.parseDouble(sc.next());", "Double.parseDouble(sc.next())", "Double.parseDouble", "Double", "sc.next()", "sc.next", "sc", "static String[] splitString(String s){\n return s.split(\"\");\n }", "splitString", "{\n return s.split(\"\");\n }", "return s.split(\"\");", "s.split(\"\")", "s.split", "s", "\"\"", "String s", "s", "static char[] splitChar(String s){\n return s.toCharArray();\n }", "splitChar", "{\n return s.toCharArray();\n }", "return s.toCharArray();", "s.toCharArray()", "s.toCharArray", "s", "String s", "s", "static int charToInt(char a){\n return a - 48;\n }", "charToInt", "{\n return a - 48;\n }", "return a - 48;", "a - 48", "a", "48", "char a", "a", "////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "max", "{\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "int max = a[0];", "max", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n max = Math.max(max,a[i]);\n }", "{\n max = Math.max(max,a[i]);\n }", "max = Math.max(max,a[i])", "max", "Math.max(max,a[i])", "Math.max", "Math", "max", "a[i]", "a", "i", "return max;", "max", "int[] a", "a", "public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "max", "{\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "long max = a[0];", "max", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n max = Math.max(max,a[i]);\n }", "{\n max = Math.max(max,a[i]);\n }", "max = Math.max(max,a[i])", "max", "Math.max(max,a[i])", "Math.max", "Math", "max", "a[i]", "a", "i", "return max;", "max", "long[] a", "a", "////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "min", "{\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "int min = a[0];", "min", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n min = Math.min(min,a[i]);\n }", "{\n min = Math.min(min,a[i]);\n }", "min = Math.min(min,a[i])", "min", "Math.min(min,a[i])", "Math.min", "Math", "min", "a[i]", "a", "i", "return min;", "min", "int[] a", "a", "public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "min", "{\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }", "int lng = a.length;", "lng", "a.length", "a", "a.length", "long min = a[0];", "min", "a[0]", "a", "0", "for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }", "int i=1;", "int i=1;", "i", "1", "i<lng", "i", "lng", "i++", "i++", "i", "{\n min = Math.min(min,a[i]);\n }", "{\n min = Math.min(min,a[i]);\n }", "min = Math.min(min,a[i])", "min", "Math.min(min,a[i])", "Math.min", "Math", "min", "a[i]", "a", "i", "return min;", "min", "long[] a", "a", "public class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int k = nextInt();\n\n int ans = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }\n\n System.out.println(ans);\n\n }\n\n static int gcd(int a,int b){\n if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }\n }\n\n\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "public class Main{\n\n static Scanner sc = new Scanner(System.in);\n static StringBuilder sb = new StringBuilder();\n\n public static void main(String[] args) {\n\n int k = nextInt();\n\n int ans = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int c=1;c<=k;c++){\n ans += gcd(i,gcd(j,c));\n }\n }\n }\n\n System.out.println(ans);\n\n }\n\n static int gcd(int a,int b){\n if(a%b!=0){\n return gcd(b,a%b);\n }\n else{\n return b;\n }\n }\n\n\n /*\n static String toSmall(String s){\n char c = s.charAt(0);\n //if(Character.isUpperCase(c)){\n if(c<=90){\n c += 32;\n }\n return String.valueOf(c);\n }\n static String toBig(String s){\n char c = s.charAt(0);\n //if(Character.isLowerCase(c)){\n if(c>=97){\n c -= 32;\n }\n return String.valueOf(c);\n }\n */\n\n static String toSmall(String s){\n return s.toLowerCase();\n }\n\n static String toBig(String s){\n return s.toUpperCase();\n }\n\n static String next(){\n return sc.next();\n }\n\n static int nextInt(){\n return Integer.parseInt(sc.next());\n }\n\n static long nextLong(){\n return Long.parseLong(sc.next());\n }\n\n static double nextDouble(){\n return Double.parseDouble(sc.next());\n }\n\n static String[] splitString(String s){\n return s.split(\"\");\n }\n\n static char[] splitChar(String s){\n return s.toCharArray();\n }\n\n static int charToInt(char a){\n return a - 48;\n }\n\n////////////////////////////////////////////\n public static int max(int[] a){\n int lng = a.length;\n int max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n public static long max(long[] a){\n int lng = a.length;\n long max = a[0];\n for(int i=1;i<lng;i++){\n max = Math.max(max,a[i]);\n }\n return max;\n }\n////////////////////////////////////////////\n\n////////////////////////////////////////////\n public static int min(int[] a){\n int lng = a.length;\n int min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n public static long min(long[] a){\n int lng = a.length;\n long min = a[0];\n for(int i=1;i<lng;i++){\n min = Math.min(min,a[i]);\n }\n return min;\n }\n////////////////////////////////////////////\n\n}", "Main" ]
import java.util.*; //update 2020/1/1 23:01 public class Main{ static Scanner sc = new Scanner(System.in); static StringBuilder sb = new StringBuilder(); public static void main(String[] args) { int k = nextInt(); int ans = 0; for(int i=1;i<=k;i++){ for(int j=1;j<=k;j++){ for(int c=1;c<=k;c++){ ans += gcd(i,gcd(j,c)); } } } System.out.println(ans); } static int gcd(int a,int b){ if(a%b!=0){ return gcd(b,a%b); } else{ return b; } } /* static String toSmall(String s){ char c = s.charAt(0); //if(Character.isUpperCase(c)){ if(c<=90){ c += 32; } return String.valueOf(c); } static String toBig(String s){ char c = s.charAt(0); //if(Character.isLowerCase(c)){ if(c>=97){ c -= 32; } return String.valueOf(c); } */ static String toSmall(String s){ return s.toLowerCase(); } static String toBig(String s){ return s.toUpperCase(); } static String next(){ return sc.next(); } static int nextInt(){ return Integer.parseInt(sc.next()); } static long nextLong(){ return Long.parseLong(sc.next()); } static double nextDouble(){ return Double.parseDouble(sc.next()); } static String[] splitString(String s){ return s.split(""); } static char[] splitChar(String s){ return s.toCharArray(); } static int charToInt(char a){ return a - 48; } //////////////////////////////////////////// public static int max(int[] a){ int lng = a.length; int max = a[0]; for(int i=1;i<lng;i++){ max = Math.max(max,a[i]); } return max; } public static long max(long[] a){ int lng = a.length; long max = a[0]; for(int i=1;i<lng;i++){ max = Math.max(max,a[i]); } return max; } //////////////////////////////////////////// //////////////////////////////////////////// public static int min(int[] a){ int lng = a.length; int min = a[0]; for(int i=1;i<lng;i++){ min = Math.min(min,a[i]); } return min; } public static long min(long[] a){ int lng = a.length; long min = a[0]; for(int i=1;i<lng;i++){ min = Math.min(min,a[i]); } return min; } //////////////////////////////////////////// }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 4, 13, 4, 13, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 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 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 14, 17 ], [ 9, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 22, 23 ], [ 18, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 25, 28 ], [ 28, 29 ], [ 28, 30 ], [ 6, 31 ], [ 31, 32 ], [ 6, 33 ], [ 33, 34 ], [ 4, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 41, 43 ], [ 41, 44 ], [ 39, 45 ], [ 35, 46 ], [ 46, 47 ], [ 35, 48 ], [ 48, 49 ], [ 35, 50 ], [ 50, 51 ], [ 4, 52 ], [ 52, 53 ], [ 52, 54 ], [ 54, 55 ], [ 55, 56 ], [ 55, 57 ], [ 54, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 54, 63 ], [ 63, 64 ], [ 63, 65 ], [ 54, 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 ], [ 105, 107 ], [ 107, 108 ], [ 107, 109 ], [ 107, 110 ], [ 107, 111 ], [ 54, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 52, 118 ], [ 118, 119 ] ]
[ "import java.util.*;\nclass Main{\n public static int gcd(int a, int b){\n if(b > a)\n return gcd(b,a);\n else if(b == 0)\n return a;\n else\n return gcd(b, a%b);\n }\n public static int gcd3(int a, int b, int c){\n return gcd(gcd(a, b), c);\n }\n \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n \n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }\n System.out.println(ans); \n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static int gcd(int a, int b){\n if(b > a)\n return gcd(b,a);\n else if(b == 0)\n return a;\n else\n return gcd(b, a%b);\n }\n public static int gcd3(int a, int b, int c){\n return gcd(gcd(a, b), c);\n }\n \n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n \n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }\n System.out.println(ans); \n }\n}", "Main", "public static int gcd(int a, int b){\n if(b > a)\n return gcd(b,a);\n else if(b == 0)\n return a;\n else\n return gcd(b, a%b);\n }", "gcd", "{\n if(b > a)\n return gcd(b,a);\n else if(b == 0)\n return a;\n else\n return gcd(b, a%b);\n }", "if(b > a)\n return gcd(b,a);\n else if(b == 0)\n return a;\n else\n return gcd(b, a%b);", "b > a", "b", "a", "return gcd(b,a);", "gcd(b,a)", "gcd", "b", "a", "if(b == 0)\n return a;\n else\n return gcd(b, a%b);", "b == 0", "b", "0", "return a;", "a", "return gcd(b, a%b);", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public static int gcd3(int a, int b, int c){\n return gcd(gcd(a, b), c);\n }", "gcd3", "{\n return gcd(gcd(a, b), c);\n }", "return gcd(gcd(a, b), c);", "gcd(gcd(a, b), c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "int a", "a", "int b", "b", "int c", "c", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n \n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }\n System.out.println(ans); \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n \n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }\n System.out.println(ans); \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }", "{\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }\n }", "for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }", "{\n for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }\n }", "for(int l=1;l<=k;l++){\n ans += gcd3(i,j,l);\n }", "int l=1;", "int l=1;", "l", "1", "l<=k", "l", "k", "l++", "l++", "l", "{\n ans += gcd3(i,j,l);\n }", "{\n ans += gcd3(i,j,l);\n }", "ans += gcd3(i,j,l)", "ans", "gcd3(i,j,l)", "gcd3", "i", "j", "l", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args" ]
import java.util.*; class Main{ public static int gcd(int a, int b){ if(b > a) return gcd(b,a); else if(b == 0) return a; else return gcd(b, a%b); } public static int gcd3(int a, int b, int c){ return gcd(gcd(a, b), c); } public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int ans = 0; for(int i=1;i<=k;i++){ for(int j=1;j<=k;j++){ for(int l=1;l<=k;l++){ ans += gcd3(i,j,l); } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 30, 29, 13, 29, 40, 17, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 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 ], [ 11, 12 ], [ 12, 13 ], [ 11, 14 ], [ 11, 15 ], [ 15, 16 ], [ 16, 17 ], [ 15, 18 ], [ 15, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 35, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 35, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 46, 50 ], [ 33, 51 ], [ 51, 52 ], [ 52, 53 ], [ 8, 54 ], [ 54, 55 ], [ 55, 56 ], [ 6, 57 ], [ 57, 58 ], [ 6, 59 ], [ 59, 60 ], [ 6, 61 ], [ 61, 62 ], [ 138, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 66, 68 ], [ 65, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 72, 73 ], [ 65, 74 ], [ 74, 75 ], [ 74, 76 ], [ 65, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 82, 83 ], [ 82, 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 ], [ 92, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 92, 102 ], [ 102, 103 ], [ 103, 104 ], [ 92, 105 ], [ 106, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 107, 117 ], [ 117, 118 ], [ 118, 119 ], [ 107, 120 ], [ 121, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 124, 126 ], [ 124, 127 ], [ 124, 128 ], [ 65, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 63, 135 ], [ 135, 136 ], [ 0, 137 ], [ 137, 138 ], [ 137, 139 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static int gcd(int a,int b,int c){\n int smallest = Math.min(a,Math.min(b, c));\n for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }\n return -1;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n int total = 0;\n for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }\n System.out.println(total);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main{\n public static int gcd(int a,int b,int c){\n int smallest = Math.min(a,Math.min(b, c));\n for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }\n return -1;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n int total = 0;\n for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }\n System.out.println(total);\n }\n}", "Main", "public static int gcd(int a,int b,int c){\n int smallest = Math.min(a,Math.min(b, c));\n for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }\n return -1;\n }", "gcd", "{\n int smallest = Math.min(a,Math.min(b, c));\n for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }\n return -1;\n }", "int smallest = Math.min(a,Math.min(b, c));", "smallest", "Math.min(a,Math.min(b, c))", "Math.min", "Math", "a", "Math.min(b, c)", "Math.min", "Math", "b", "c", "for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }", "int i = smallest;", "int i = smallest;", "i", "smallest", "i > 0", "i", "0", "i--", "i--", "i", "{\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }", "{\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }", "if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }", "a%i == 0 && b%i == 0 && c%i == 0", "a%i == 0 && b%i == 0 && c%i == 0", "a%i == 0", "a%i", "a", "i", "0", "b%i == 0", "b%i", "b", "i", "0", "c%i == 0", "c%i", "c", "i", "0", "{\n return i;\n }", "return i;", "i", "return -1;", "-1", "1", "int a", "a", "int b", "b", "int c", "c", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n int total = 0;\n for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }\n System.out.println(total);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n int total = 0;\n for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }\n System.out.println(total);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int number = sc.nextInt();", "number", "sc.nextInt()", "sc.nextInt", "sc", "int total = 0;", "total", "0", "for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < number+1", "i", "number+1", "number", "1", "i++", "i++", "i", "{\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }", "{\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }", "for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j < number+1", "j", "number+1", "number", "1", "j++", "j++", "j", "{\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }", "{\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }", "for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k < number+1", "k", "number+1", "number", "1", "k++", "k++", "k", "{\n total += gcd(i,j,k);\n }", "{\n total += gcd(i,j,k);\n }", "total += gcd(i,j,k)", "total", "gcd(i,j,k)", "gcd", "i", "j", "k", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String[] args", "args", "public class Main{\n public static int gcd(int a,int b,int c){\n int smallest = Math.min(a,Math.min(b, c));\n for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }\n return -1;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n int total = 0;\n for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }\n System.out.println(total);\n }\n}", "public class Main{\n public static int gcd(int a,int b,int c){\n int smallest = Math.min(a,Math.min(b, c));\n for(int i = smallest;i > 0;i--){\n if(a%i == 0 && b%i == 0 && c%i == 0){\n return i;\n }\n }\n return -1;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int number = sc.nextInt();\n int total = 0;\n for(int i = 1;i < number+1;i++){\n for(int j = 1;j < number+1;j++){\n for(int k = 1;k < number+1;k++){\n total += gcd(i,j,k);\n }\n }\n }\n System.out.println(total);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static int gcd(int a,int b,int c){ int smallest = Math.min(a,Math.min(b, c)); for(int i = smallest;i > 0;i--){ if(a%i == 0 && b%i == 0 && c%i == 0){ return i; } } return -1; } public static void main(String[] args){ Scanner sc = new Scanner(System.in); int number = sc.nextInt(); int total = 0; for(int i = 1;i < number+1;i++){ for(int j = 1;j < number+1;j++){ for(int k = 1;k < number+1;k++){ total += gcd(i,j,k); } } } System.out.println(total); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 20, 2, 13, 17, 2, 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, 41, 13, 39, 13, 13, 13, 4, 18, 13, 13, 0, 13, 4, 13, 18, 13, 17, 4, 13, 18, 13, 17, 18, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 18, 18, 13, 13, 13, 17, 29, 18, 18, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 141, 8 ], [ 141, 9 ], [ 9, 10 ], [ 141, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 13, 22 ], [ 22, 23 ], [ 22, 24 ], [ 25, 26 ], [ 25, 27 ], [ 28, 29 ], [ 28, 30 ], [ 13, 31 ], [ 31, 32 ], [ 31, 33 ], [ 13, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 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 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 75, 78 ], [ 72, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 72, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 87, 89 ], [ 85, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 95, 97 ], [ 13, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 11, 104 ], [ 104, 105 ], [ 141, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 110, 116 ], [ 109, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 108, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 108, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 130, 133 ], [ 133, 134 ], [ 133, 135 ], [ 106, 136 ], [ 136, 137 ], [ 106, 138 ], [ 138, 139 ], [ 0, 140 ], [ 140, 141 ], [ 140, 142 ] ]
[ "\nimport java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n static int[][] memo;\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int K = scanner.nextInt();\n memo = new int[K + 1][K + 1];\n\n int sum = 0;\n for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n// System.out.printf(\"%7d %7d%n\", a, b);\n if (memo[a][b] > 0) return memo[a][b];\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n static int[][] memo;\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int K = scanner.nextInt();\n memo = new int[K + 1][K + 1];\n\n int sum = 0;\n for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n// System.out.printf(\"%7d %7d%n\", a, b);\n if (memo[a][b] > 0) return memo[a][b];\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "Main", "static int[][] memo;", "memo", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int K = scanner.nextInt();\n memo = new int[K + 1][K + 1];\n\n int sum = 0;\n for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n\n int K = scanner.nextInt();\n memo = new int[K + 1][K + 1];\n\n int sum = 0;\n for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int K = scanner.nextInt();", "K", "scanner.nextInt()", "scanner.nextInt", "scanner", "memo = new int[K + 1][K + 1]", "memo", "new int[K + 1][K + 1]", "K + 1", "K", "1", "K + 1", "K", "1", "int sum = 0;", "sum", "0", "for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "{\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }", "{\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }", "for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }", "int j = 1 ;", "int j = 1 ;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "{\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }", "{\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }", "for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }", "int k = 1 ;", "int k = 1 ;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "{\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }", "{\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }", "int[] target = {i, j, k};", "target", "{i, j, k}", "i", "j", "k", "Arrays.sort(target)", "Arrays.sort", "Arrays", "target", "sum += gcd(target[2], gcd(target[1], target[0]))", "sum", "gcd(target[2], gcd(target[1], target[0]))", "gcd", "target[2]", "target", "2", "gcd(target[1], target[0])", "gcd", "target[1]", "target", "1", "target[0]", "target", "0", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int a, int b) {\n// System.out.printf(\"%7d %7d%n\", a, b);\n if (memo[a][b] > 0) return memo[a][b];\n if (b == 0) return a;\n return gcd(b, a % b);\n }", "gcd", "{\n// System.out.printf(\"%7d %7d%n\", a, b);\n if (memo[a][b] > 0) return memo[a][b];\n if (b == 0) return a;\n return gcd(b, a % b);\n }", "if (memo[a][b] > 0) return memo[a][b];", "memo[a][b] > 0", "memo[a][b]", "memo[a]", "memo", "a", "b", "0", "return memo[a][b];", "memo[a][b]", "memo[a]", "memo", "a", "b", "if (b == 0) return a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "public class Main {\n static int[][] memo;\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int K = scanner.nextInt();\n memo = new int[K + 1][K + 1];\n\n int sum = 0;\n for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n// System.out.printf(\"%7d %7d%n\", a, b);\n if (memo[a][b] > 0) return memo[a][b];\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "public class Main {\n static int[][] memo;\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n int K = scanner.nextInt();\n memo = new int[K + 1][K + 1];\n\n int sum = 0;\n for (int i = 1 ; i <= K ; i++) {\n for (int j = 1 ; j <= K ; j++) {\n for (int k = 1 ; k <= K ; k++) {\n int[] target = {i, j, k};\n Arrays.sort(target);\n// System.out.printf(\"%d %d %d%n\", target[0], target[1], target[2]);\n sum += gcd(target[2], gcd(target[1], target[0]));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n// System.out.printf(\"%7d %7d%n\", a, b);\n if (memo[a][b] > 0) return memo[a][b];\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { static int[][] memo; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int K = scanner.nextInt(); memo = new int[K + 1][K + 1]; int sum = 0; for (int i = 1 ; i <= K ; i++) { for (int j = 1 ; j <= K ; j++) { for (int k = 1 ; k <= K ; k++) { int[] target = {i, j, k}; Arrays.sort(target); // System.out.printf("%d %d %d%n", target[0], target[1], target[2]); sum += gcd(target[2], gcd(target[1], target[0])); } } } System.out.println(sum); } public static int gcd(int a, int b) { // System.out.printf("%7d %7d%n", a, b); if (memo[a][b] > 0) return memo[a][b]; if (b == 0) return a; return gcd(b, a % b); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 4, 13, 4, 13, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 2, 13, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 6, 72 ], [ 72, 73 ], [ 4, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 80, 82 ], [ 80, 83 ], [ 78, 84 ], [ 74, 85 ], [ 85, 86 ], [ 74, 87 ], [ 87, 88 ], [ 74, 89 ], [ 89, 90 ], [ 4, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 94, 98 ], [ 98, 99 ], [ 99, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 91, 108 ], [ 108, 109 ], [ 91, 110 ], [ 110, 111 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n long res = 0;\n for(int a = 1; a <= K; a ++) {\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }\n System.out.println(res);\n }\n private static int gcd(int a, int b, int c) {\n return gcd(gcd(a, b), c);\n }\n private static int gcd(int a, int b) {\n if( a == 0) {\n return b;\n }\n return gcd(b%a, a);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n long res = 0;\n for(int a = 1; a <= K; a ++) {\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }\n System.out.println(res);\n }\n private static int gcd(int a, int b, int c) {\n return gcd(gcd(a, b), c);\n }\n private static int gcd(int a, int b) {\n if( a == 0) {\n return b;\n }\n return gcd(b%a, a);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n long res = 0;\n for(int a = 1; a <= K; a ++) {\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }\n System.out.println(res);\n }", "main", "{\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n long res = 0;\n for(int a = 1; a <= K; a ++) {\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }\n System.out.println(res);\n }", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int K = s.nextInt();", "K", "s.nextInt()", "s.nextInt", "s", "long res = 0;", "res", "0", "for(int a = 1; a <= K; a ++) {\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= K", "a", "K", "a ++", "a ++", "a", "{\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }", "{\n for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }\n }", "for (int b = 1; b <= K; b++) {\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= K", "b", "K", "b++", "b++", "b", "{\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }", "{\n for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }\n }", "for(int c = 1; c <= K; c++) {\n res += gcd(a, b, c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= K", "c", "K", "c++", "c++", "c", "{\n res += gcd(a, b, c);\n }", "{\n res += gcd(a, b, c);\n }", "res += gcd(a, b, c)", "res", "gcd(a, b, c)", "gcd", "a", "b", "c", "System.out.println(res)", "System.out.println", "System.out", "System", "System.out", "res", "String[] args", "args", "private static int gcd(int a, int b, int c) {\n return gcd(gcd(a, b), c);\n }", "gcd", "{\n return gcd(gcd(a, b), c);\n }", "return gcd(gcd(a, b), c);", "gcd(gcd(a, b), c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "int a", "a", "int b", "b", "int c", "c", "private static int gcd(int a, int b) {\n if( a == 0) {\n return b;\n }\n return gcd(b%a, a);\n }", "gcd", "{\n if( a == 0) {\n return b;\n }\n return gcd(b%a, a);\n }", "if( a == 0) {\n return b;\n }", "a == 0", "a", "0", "{\n return b;\n }", "return b;", "b", "return gcd(b%a, a);", "gcd(b%a, a)", "gcd", "b%a", "b", "a", "a", "int a", "a", "int b", "b" ]
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int K = s.nextInt(); long res = 0; for(int a = 1; a <= K; a ++) { for (int b = 1; b <= K; b++) { for(int c = 1; c <= K; c++) { res += gcd(a, b, c); } } } System.out.println(res); } private static int gcd(int a, int b, int c) { return gcd(gcd(a, b), c); } private static int gcd(int a, int b) { if( a == 0) { return b; } return gcd(b%a, a); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 13, 41, 13, 4, 18, 13, 13, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 29, 13, 0, 13, 4, 13, 13, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 48, 51 ], [ 45, 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 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 121, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 84, 88 ], [ 81, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 91, 95 ], [ 81, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 81, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 106, 107 ], [ 81, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 110, 113 ], [ 81, 114 ], [ 114, 115 ], [ 79, 116 ], [ 116, 117 ], [ 79, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int x, int y){\n int big = Math.max(x,y);\n int small = Math.min(x,y);\n int surplus = big%small;\n if(surplus == 0){\n return small;\n }\n surplus = gcd(small,surplus);\n return surplus;\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 k = sc.nextInt();\n long sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int x, int y){\n int big = Math.max(x,y);\n int small = Math.min(x,y);\n int surplus = big%small;\n if(surplus == 0){\n return small;\n }\n surplus = gcd(small,surplus);\n return surplus;\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long sum = 0;", "sum", "0", "for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }", "{\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }", "for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }", "{\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }", "int sur_1 = gcd(a,b);", "sur_1", "gcd(a,b)", "gcd", "a", "b", "for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n sum += gcd(sur_1,c);\n }", "{\n sum += gcd(sur_1,c);\n }", "sum += gcd(sur_1,c)", "sum", "gcd(sur_1,c)", "gcd", "sur_1", "c", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int x, int y){\n int big = Math.max(x,y);\n int small = Math.min(x,y);\n int surplus = big%small;\n if(surplus == 0){\n return small;\n }\n surplus = gcd(small,surplus);\n return surplus;\n }", "gcd", "{\n int big = Math.max(x,y);\n int small = Math.min(x,y);\n int surplus = big%small;\n if(surplus == 0){\n return small;\n }\n surplus = gcd(small,surplus);\n return surplus;\n }", "int big = Math.max(x,y);", "big", "Math.max(x,y)", "Math.max", "Math", "x", "y", "int small = Math.min(x,y);", "small", "Math.min(x,y)", "Math.min", "Math", "x", "y", "int surplus = big%small;", "surplus", "big%small", "big", "small", "if(surplus == 0){\n return small;\n }", "surplus == 0", "surplus", "0", "{\n return small;\n }", "return small;", "small", "surplus = gcd(small,surplus)", "surplus", "gcd(small,surplus)", "gcd", "small", "surplus", "return surplus;", "surplus", "int x", "x", "int y", "y", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int x, int y){\n int big = Math.max(x,y);\n int small = Math.min(x,y);\n int surplus = big%small;\n if(surplus == 0){\n return small;\n }\n surplus = gcd(small,surplus);\n return surplus;\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n int sur_1 = gcd(a,b);\n for(int c = 1; c <= k; c++){\n sum += gcd(sur_1,c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int x, int y){\n int big = Math.max(x,y);\n int small = Math.min(x,y);\n int surplus = big%small;\n if(surplus == 0){\n return small;\n }\n surplus = gcd(small,surplus);\n return surplus;\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); long sum = 0; for(int a = 1; a <= k; a++){ for(int b = 1; b <= k; b++){ int sur_1 = gcd(a,b); for(int c = 1; c <= k; c++){ sum += gcd(sur_1,c); } } } System.out.println(sum); } public static int gcd(int x, int y){ int big = Math.max(x,y); int small = Math.min(x,y); int surplus = big%small; if(surplus == 0){ return small; } surplus = gcd(small,surplus); return surplus; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 0, 13, 2, 13, 17, 30, 0, 13, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 41, 13, 13, 41, 13, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 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 ], [ 150, 11 ], [ 150, 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 ], [ 14, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 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 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 73, 74 ], [ 73, 75 ], [ 73, 76 ], [ 64, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 77, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 77, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 91, 93 ], [ 90, 94 ], [ 94, 95 ], [ 94, 96 ], [ 89, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 89, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 14, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 109, 114 ], [ 12, 115 ], [ 115, 116 ], [ 150, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 122, 124 ], [ 119, 125 ], [ 125, 126 ], [ 125, 127 ], [ 119, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 132, 134 ], [ 129, 135 ], [ 128, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 140, 142 ], [ 119, 143 ], [ 143, 144 ], [ 117, 145 ], [ 145, 146 ], [ 117, 147 ], [ 147, 148 ], [ 0, 149 ], [ 149, 150 ], [ 149, 151 ] ]
[ "import java.util.Map.Entry;\nimport java.util.*;\n\nimport org.w3c.dom.css.Counter;\n\npublic class Main {\n//public class App {\n\n public static void main(String[] args){\n //スキャン\n Scanner s = new Scanner(System.in);\n // 入力\n long n = s.nextInt();\n long an = 0;\n for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }\n System.out.println(an);\n}\n public static long hogehoge(long a , long b){\n long tmp;\n long x =a;\n long y=b;\n while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }\n return y;\n }\n}\n\n", "import java.util.Map.Entry;", "Entry", "java.util.Map", "import java.util.*;", "util.*", "java", "import org.w3c.dom.css.Counter;", "Counter", "org.w3c.dom.css", "public class Main {\n//public class App {\n\n public static void main(String[] args){\n //スキャン\n Scanner s = new Scanner(System.in);\n // 入力\n long n = s.nextInt();\n long an = 0;\n for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }\n System.out.println(an);\n}\n public static long hogehoge(long a , long b){\n long tmp;\n long x =a;\n long y=b;\n while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "Main", "public static void main(String[] args){\n //スキャン\n Scanner s = new Scanner(System.in);\n // 入力\n long n = s.nextInt();\n long an = 0;\n for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }\n System.out.println(an);\n}", "main", "{\n //スキャン\n Scanner s = new Scanner(System.in);\n // 入力\n long n = s.nextInt();\n long an = 0;\n for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }\n System.out.println(an);\n}", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "long n = s.nextInt();", "n", "s.nextInt()", "s.nextInt", "s", "long an = 0;", "an", "0", "for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }", "long i = 1 ;", "long i = 1 ;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }", "{\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }", "for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }", "long i2 =1;", "long i2 =1;", "i2", "1", "i2 <= i", "i2", "i", "i2++", "i2++", "i2", "{\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }", "{\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }", "for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }", "long i3 =1;", "long i3 =1;", "i3", "1", "i3 <= i2", "i3", "i2", "i3++", "i3++", "i3", "{\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }", "{\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }", "long huge = hogehoge(i,i2);", "huge", "hogehoge(i,i2)", "hogehoge", "i", "i2", "huge = hogehoge(huge,i3)", "huge", "hogehoge(huge,i3)", "hogehoge", "huge", "i3", "if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }", "i == i2 && i2==i3", "i == i2", "i", "i2", "i2==i3", "i2", "i3", "{\n an += huge;\n }", "an += huge", "an", "huge", "if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }", "i ==i2 || i2 ==i3", "i ==i2", "i", "i2", "i2 ==i3", "i2", "i3", "{\n an += huge*3;\n }", "an += huge*3", "an", "huge*3", "huge", "3", "{\n an += huge *6;\n }", "an += huge *6", "an", "huge *6", "huge", "6", "System.out.println(an)", "System.out.println", "System.out", "System", "System.out", "an", "String[] args", "args", "public static long hogehoge(long a , long b){\n long tmp;\n long x =a;\n long y=b;\n while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }\n return y;\n }", "hogehoge", "{\n long tmp;\n long x =a;\n long y=b;\n while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }\n return y;\n }", "long tmp;", "tmp", "long x =a;", "x", "a", "long y=b;", "y", "b", "while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }", "(tmp = x % y) != 0", "(tmp = x % y)", "tmp", "x % y", "x", "y", "0", "{\n x = y;\n y = tmp;\n }", "x = y", "x", "y", "y = tmp", "y", "tmp", "return y;", "y", "long a", "a", "long b", "b", "public class Main {\n//public class App {\n\n public static void main(String[] args){\n //スキャン\n Scanner s = new Scanner(System.in);\n // 入力\n long n = s.nextInt();\n long an = 0;\n for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }\n System.out.println(an);\n}\n public static long hogehoge(long a , long b){\n long tmp;\n long x =a;\n long y=b;\n while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "public class Main {\n//public class App {\n\n public static void main(String[] args){\n //スキャン\n Scanner s = new Scanner(System.in);\n // 入力\n long n = s.nextInt();\n long an = 0;\n for(long i = 1 ;i<=n;i++){\n for(long i2 =1; i2 <= i;i2++){\n for(long i3 =1; i3 <= i2;i3++){\n long huge = hogehoge(i,i2);\n huge = hogehoge(huge,i3);\n if(i == i2 && i2==i3){\n an += huge;\n }else if(i ==i2 || i2 ==i3){\n an += huge*3;\n }else{\n an += huge *6;\n }\n\n }\n }\n }\n System.out.println(an);\n}\n public static long hogehoge(long a , long b){\n long tmp;\n long x =a;\n long y=b;\n while((tmp = x % y) != 0){\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "Main" ]
import java.util.Map.Entry; import java.util.*; import org.w3c.dom.css.Counter; public class Main { //public class App { public static void main(String[] args){ //スキャン Scanner s = new Scanner(System.in); // 入力 long n = s.nextInt(); long an = 0; for(long i = 1 ;i<=n;i++){ for(long i2 =1; i2 <= i;i2++){ for(long i3 =1; i3 <= i2;i3++){ long huge = hogehoge(i,i2); huge = hogehoge(huge,i3); if(i == i2 && i2==i3){ an += huge; }else if(i ==i2 || i2 ==i3){ an += huge*3; }else{ an += huge *6; } } } } System.out.println(an); } public static long hogehoge(long a , long b){ long tmp; long x =a; long y=b; while((tmp = x % y) != 0){ x = y; y = tmp; } return y; } }
[ 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, 18, 13, 13, 1, 40, 13, 30, 14, 2, 18, 13, 13, 13, 0, 13, 18, 13, 13, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 41, 13, 20, 2, 13, 17, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 40, 18, 13, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 13, 2, 13, 13, 1, 0, 13, 13, 30, 0, 18, 13, 13, 18, 13, 13, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 2, 18, 13, 13, 18, 13, 13, 18, 13, 13, 11, 1, 41, 13, 2, 17, 13, 2, 13, 13, 1, 0, 13, 13, 30, 0, 18, 13, 13, 18, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 2, 13, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 2, 13, 17, 13, 41, 13, 4, 13, 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 ], [ 241, 11 ], [ 241, 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 ], [ 31, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 32, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 14, 43 ], [ 43, 44 ], [ 43, 45 ], [ 46, 47 ], [ 46, 48 ], [ 14, 49 ], [ 49, 50 ], [ 49, 51 ], [ 52, 53 ], [ 52, 54 ], [ 14, 55 ], [ 55, 56 ], [ 55, 57 ], [ 58, 59 ], [ 58, 60 ], [ 14, 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 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 14, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 81, 86 ], [ 86, 87 ], [ 86, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 81, 92 ], [ 93, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 94, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 111, 113 ], [ 14, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 119, 120 ], [ 119, 121 ], [ 114, 122 ], [ 122, 123 ], [ 123, 124 ], [ 114, 125 ], [ 126, 126 ], [ 126, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 132, 132 ], [ 132, 133 ], [ 133, 134 ], [ 133, 135 ], [ 132, 136 ], [ 136, 137 ], [ 136, 138 ], [ 132, 139 ], [ 139, 140 ], [ 139, 141 ], [ 126, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 146, 148 ], [ 142, 149 ], [ 149, 150 ], [ 149, 151 ], [ 142, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 142, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 161, 162 ], [ 161, 163 ], [ 14, 164 ], [ 164, 165 ], [ 164, 166 ], [ 14, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 167, 172 ], [ 172, 173 ], [ 172, 174 ], [ 167, 175 ], [ 175, 176 ], [ 176, 177 ], [ 167, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 183, 185 ], [ 14, 186 ], [ 186, 187 ], [ 12, 188 ], [ 188, 189 ], [ 241, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 193, 195 ], [ 192, 196 ], [ 196, 197 ], [ 196, 198 ], [ 198, 199 ], [ 199, 200 ], [ 198, 201 ], [ 201, 202 ], [ 202, 203 ], [ 192, 204 ], [ 204, 205 ], [ 204, 206 ], [ 192, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 208, 213 ], [ 213, 214 ], [ 213, 215 ], [ 208, 216 ], [ 216, 217 ], [ 217, 218 ], [ 208, 219 ], [ 219, 220 ], [ 220, 221 ], [ 221, 222 ], [ 221, 223 ], [ 223, 224 ], [ 223, 225 ], [ 220, 226 ], [ 192, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 229, 231 ], [ 192, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 232, 237 ], [ 190, 238 ], [ 238, 239 ], [ 0, 240 ], [ 240, 241 ], [ 240, 242 ] ]
[ "import java.io.*;\nimport java.lang.*;\nimport java.util.*;\npublic class Main{\n public static long sumGCD(long[] arr){\n long max=0;\n for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];\n long[] c=new long[(int)max+1];\n long[] d=new long[(int)max+1];\n long[] e=new long[(int)max+1];\n for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;\n for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }\n for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }\n long sum=0;\n for(int i=1;i<=max;i++) sum+=(i*e[i]);\n return sum;\n }\n public static void main(String[] args) throws IOException{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n long[] arr=new long[n];\n for(int i=1;i<=n;i++) arr[i-1]=i;\n long ans=sumGCD(arr);\n System.out.println(ans);\n }\n}", "import java.io.*;", "io.*", "java", "import java.lang.*;", "lang.*", "java", "import java.util.*;", "util.*", "java", "public class Main{\n public static long sumGCD(long[] arr){\n long max=0;\n for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];\n long[] c=new long[(int)max+1];\n long[] d=new long[(int)max+1];\n long[] e=new long[(int)max+1];\n for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;\n for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }\n for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }\n long sum=0;\n for(int i=1;i<=max;i++) sum+=(i*e[i]);\n return sum;\n }\n public static void main(String[] args) throws IOException{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n long[] arr=new long[n];\n for(int i=1;i<=n;i++) arr[i-1]=i;\n long ans=sumGCD(arr);\n System.out.println(ans);\n }\n}", "Main", "public static long sumGCD(long[] arr){\n long max=0;\n for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];\n long[] c=new long[(int)max+1];\n long[] d=new long[(int)max+1];\n long[] e=new long[(int)max+1];\n for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;\n for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }\n for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }\n long sum=0;\n for(int i=1;i<=max;i++) sum+=(i*e[i]);\n return sum;\n }", "sumGCD", "{\n long max=0;\n for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];\n long[] c=new long[(int)max+1];\n long[] d=new long[(int)max+1];\n long[] e=new long[(int)max+1];\n for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;\n for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }\n for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }\n long sum=0;\n for(int i=1;i<=max;i++) sum+=(i*e[i]);\n return sum;\n }", "long max=0;", "max", "0", "for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];", "int i=0;", "int i=0;", "i", "0", "i<arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "if(arr[i]>max) max=arr[i];", "if(arr[i]>max) max=arr[i];", "arr[i]>max", "arr[i]", "arr", "i", "max", "max=arr[i]", "max", "arr[i]", "arr", "i", "long[] c=new long[(int)max+1];", "c", "new long[(int)max+1]", "(int)max+1", "(int)max", "1", "long[] d=new long[(int)max+1];", "d", "new long[(int)max+1]", "(int)max+1", "(int)max", "1", "long[] e=new long[(int)max+1];", "e", "new long[(int)max+1]", "(int)max+1", "(int)max", "1", "for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;", "int i=0;", "int i=0;", "i", "0", "i<arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "c[(int)arr[i]]++;", "c[(int)arr[i]]++", "c[(int)arr[i]]", "c", "(int)arr[i]", "arr", "i", "for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }", "int i=1;", "int i=1;", "i", "1", "i<=max", "i", "max", "i++", "i++", "i", "{\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }", "{\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }", "for(int j=i;j<=max;j+=i) d[i]+=c[j];", "int j=i;", "int j=i;", "j", "i", "j<=max", "j", "max", "j+=i", "j+=i", "j", "i", "d[i]+=c[j];", "d[i]+=c[j]", "d[i]", "d", "i", "c[j]", "c", "j", "for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }", "int i=(int)max;", "int i=(int)max;", "i", "(int)max", "i>=1", "i", "1", "i--", "i--", "i", "{\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }", "{\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }", "e[i] = d[i]*d[i]*d[i]", "e[i]", "e", "i", "d[i]*d[i]*d[i]", "d[i]*d[i]*d[i]", "d[i]", "d", "i", "d[i]", "d", "i", "d[i]", "d", "i", "for(int j=2*i;j<=max;j+=i) e[i] -= e[j];", "int j=2*i;", "int j=2*i;", "j", "2*i", "2", "i", "j<=max", "j", "max", "j+=i", "j+=i", "j", "i", "e[i] -= e[j];", "e[i] -= e[j]", "e[i]", "e", "i", "e[j]", "e", "j", "long sum=0;", "sum", "0", "for(int i=1;i<=max;i++) sum+=(i*e[i]);", "int i=1;", "int i=1;", "i", "1", "i<=max", "i", "max", "i++", "i++", "i", "sum+=(i*e[i]);", "sum+=(i*e[i])", "sum", "(i*e[i])", "i", "e[i]", "e", "i", "return sum;", "sum", "long[] arr", "arr", "public static void main(String[] args) throws IOException{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n long[] arr=new long[n];\n for(int i=1;i<=n;i++) arr[i-1]=i;\n long ans=sumGCD(arr);\n System.out.println(ans);\n }", "main", "{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n long[] arr=new long[n];\n for(int i=1;i<=n;i++) arr[i-1]=i;\n long ans=sumGCD(arr);\n System.out.println(ans);\n }", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int n=Integer.parseInt(br.readLine());", "n", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "long[] arr=new long[n];", "arr", "new long[n]", "n", "for(int i=1;i<=n;i++) arr[i-1]=i;", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "arr[i-1]=i;", "arr[i-1]=i", "arr[i-1]", "arr", "i-1", "i", "1", "i", "long ans=sumGCD(arr);", "ans", "sumGCD(arr)", "sumGCD", "arr", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main{\n public static long sumGCD(long[] arr){\n long max=0;\n for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];\n long[] c=new long[(int)max+1];\n long[] d=new long[(int)max+1];\n long[] e=new long[(int)max+1];\n for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;\n for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }\n for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }\n long sum=0;\n for(int i=1;i<=max;i++) sum+=(i*e[i]);\n return sum;\n }\n public static void main(String[] args) throws IOException{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n long[] arr=new long[n];\n for(int i=1;i<=n;i++) arr[i-1]=i;\n long ans=sumGCD(arr);\n System.out.println(ans);\n }\n}", "public class Main{\n public static long sumGCD(long[] arr){\n long max=0;\n for(int i=0;i<arr.length;i++)\n if(arr[i]>max) max=arr[i];\n long[] c=new long[(int)max+1];\n long[] d=new long[(int)max+1];\n long[] e=new long[(int)max+1];\n for(int i=0;i<arr.length;i++) c[(int)arr[i]]++;\n for(int i=1;i<=max;i++){\n for(int j=i;j<=max;j+=i) d[i]+=c[j];\n }\n for(int i=(int)max;i>=1;i--){\n e[i] = d[i]*d[i]*d[i];\n for(int j=2*i;j<=max;j+=i) e[i] -= e[j];\n }\n long sum=0;\n for(int i=1;i<=max;i++) sum+=(i*e[i]);\n return sum;\n }\n public static void main(String[] args) throws IOException{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.parseInt(br.readLine());\n long[] arr=new long[n];\n for(int i=1;i<=n;i++) arr[i-1]=i;\n long ans=sumGCD(arr);\n System.out.println(ans);\n }\n}", "Main" ]
import java.io.*; import java.lang.*; import java.util.*; public class Main{ public static long sumGCD(long[] arr){ long max=0; for(int i=0;i<arr.length;i++) if(arr[i]>max) max=arr[i]; long[] c=new long[(int)max+1]; long[] d=new long[(int)max+1]; long[] e=new long[(int)max+1]; for(int i=0;i<arr.length;i++) c[(int)arr[i]]++; for(int i=1;i<=max;i++){ for(int j=i;j<=max;j+=i) d[i]+=c[j]; } for(int i=(int)max;i>=1;i--){ e[i] = d[i]*d[i]*d[i]; for(int j=2*i;j<=max;j+=i) e[i] -= e[j]; } long sum=0; for(int i=1;i<=max;i++) sum+=(i*e[i]); return sum; } public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.parseInt(br.readLine()); long[] arr=new long[n]; for(int i=1;i<=n;i++) arr[i-1]=i; long ans=sumGCD(arr); System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 13, 14, 2, 13, 13, 0, 13, 13, 14, 2, 13, 13, 0, 13, 13, 11, 1, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 30, 0, 13, 2, 13, 13, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 123, 5 ], [ 123, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 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 ], [ 65, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 69, 71 ], [ 68, 72 ], [ 72, 73 ], [ 72, 74 ], [ 64, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 75, 79 ], [ 79, 80 ], [ 79, 81 ], [ 64, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 82, 87 ], [ 88, 88 ], [ 88, 89 ], [ 89, 90 ], [ 91, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 91, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 91, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 89, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 107, 113 ], [ 8, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 114, 119 ], [ 6, 120 ], [ 120, 121 ], [ 0, 122 ], [ 122, 123 ], [ 122, 124 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner stdIn= new Scanner(System.in);\n int x = stdIn.nextInt();\n int a,b,c;\n long y=0;\n for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }\n System.out.println(y);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner stdIn= new Scanner(System.in);\n int x = stdIn.nextInt();\n int a,b,c;\n long y=0;\n for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }\n System.out.println(y);\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n Scanner stdIn= new Scanner(System.in);\n int x = stdIn.nextInt();\n int a,b,c;\n long y=0;\n for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }\n System.out.println(y);\n }", "main", "{\n Scanner stdIn= new Scanner(System.in);\n int x = stdIn.nextInt();\n int a,b,c;\n long y=0;\n for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }\n System.out.println(y);\n }", "Scanner stdIn= new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int x = stdIn.nextInt();", "x", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "int a", "a", "b", "b", "c;", "c", "long y=0;", "y", "0", "for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }", "a=1;", "a=1", "a", "1", "a<=x", "a", "x", "a++", "a++", "a", "{\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }", "{\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }", "for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }", "b=1;", "b=1", "b", "1", "b<=x", "b", "x", "b++", "b++", "b", "{\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }", "{\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }", "for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }", "c=1;", "c=1", "c", "1", "c<=x", "c", "x", "c++", "c++", "c", "{\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }", "{\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }", "int min=a;", "min", "a", "if(min>b)min=b;", "min>b", "min", "b", "min=b", "min", "b", "if(min>c)min=c;", "min>c", "min", "c", "min=c", "min", "c", "for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }", ";", "min--", "min--", "min", "{\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }", "{\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }", "if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }", "a%min==0&&b%min==0&&c%min==0", "a%min==0&&b%min==0&&c%min==0", "a%min==0", "a%min", "a", "min", "0", "b%min==0", "b%min", "b", "min", "0", "c%min==0", "c%min", "c", "min", "0", "{\n y=y+min;\n break;\n }", "y=y+min", "y", "y+min", "y", "min", "break;", "System.out.println(y)", "System.out.println", "System.out", "System", "System.out", "y", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner stdIn= new Scanner(System.in);\n int x = stdIn.nextInt();\n int a,b,c;\n long y=0;\n for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }\n System.out.println(y);\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n Scanner stdIn= new Scanner(System.in);\n int x = stdIn.nextInt();\n int a,b,c;\n long y=0;\n for(a=1;a<=x;a++){\n for(b=1;b<=x;b++){\n for(c=1;c<=x;c++){\n int min=a;\n if(min>b)min=b;\n if(min>c)min=c;\n for(;;min--){\n if(a%min==0&&b%min==0&&c%min==0){\n y=y+min;\n break;\n }\n }\n }\n }\n }\n System.out.println(y);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner stdIn= new Scanner(System.in); int x = stdIn.nextInt(); int a,b,c; long y=0; for(a=1;a<=x;a++){ for(b=1;b<=x;b++){ for(c=1;c<=x;c++){ int min=a; if(min>b)min=b; if(min>c)min=c; for(;;min--){ if(a%min==0&&b%min==0&&c%min==0){ y=y+min; break; } } } } } System.out.println(y); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 13, 41, 13, 4, 13, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 6, 72 ], [ 72, 73 ], [ 118, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 79, 82 ], [ 76, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 76, 89 ], [ 89, 90 ], [ 74, 91 ], [ 91, 92 ], [ 74, 93 ], [ 93, 94 ], [ 74, 95 ], [ 95, 96 ], [ 118, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 100, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 107, 110 ], [ 110, 111 ], [ 110, 112 ], [ 97, 113 ], [ 113, 114 ], [ 97, 115 ], [ 115, 116 ], [ 0, 117 ], [ 117, 118 ], [ 117, 119 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n long ans=0;\n\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }\n System.out.println(ans);\n }\n\n private static long helper(int i, int j, int k) {\n\n long temp=gcd(i,j);\n long ans=gcd(temp,k);\n return ans;\n }\n\n private static long gcd(long a, long b) {\n if(b==0) return a;\n else\n return gcd(b,a%b);\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 int k=sc.nextInt();\n long ans=0;\n\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }\n System.out.println(ans);\n }\n\n private static long helper(int i, int j, int k) {\n\n long temp=gcd(i,j);\n long ans=gcd(temp,k);\n return ans;\n }\n\n private static long gcd(long a, long b) {\n if(b==0) return a;\n else\n return gcd(b,a%b);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n long ans=0;\n\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n long ans=0;\n\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k=sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long ans=0;", "ans", "0", "for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }", "{\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }", "for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }", "{\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }", "for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }", "int l=1;", "int l=1;", "l", "1", "l<=k", "l", "k", "l++", "l++", "l", "{\n ans+=helper(i,j,l);\n }", "{\n ans+=helper(i,j,l);\n }", "ans+=helper(i,j,l)", "ans", "helper(i,j,l)", "helper", "i", "j", "l", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "private static long helper(int i, int j, int k) {\n\n long temp=gcd(i,j);\n long ans=gcd(temp,k);\n return ans;\n }", "helper", "{\n\n long temp=gcd(i,j);\n long ans=gcd(temp,k);\n return ans;\n }", "long temp=gcd(i,j);", "temp", "gcd(i,j)", "gcd", "i", "j", "long ans=gcd(temp,k);", "ans", "gcd(temp,k)", "gcd", "temp", "k", "return ans;", "ans", "int i", "i", "int j", "j", "int k", "k", "private static long gcd(long a, long b) {\n if(b==0) return a;\n else\n return gcd(b,a%b);\n }", "gcd", "{\n if(b==0) return a;\n else\n return gcd(b,a%b);\n }", "if(b==0) return a;\n else\n return gcd(b,a%b);", "b==0", "b", "0", "return a;", "a", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "long a", "a", "long b", "b", "public class Main {\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n long ans=0;\n\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }\n System.out.println(ans);\n }\n\n private static long helper(int i, int j, int k) {\n\n long temp=gcd(i,j);\n long ans=gcd(temp,k);\n return ans;\n }\n\n private static long gcd(long a, long b) {\n if(b==0) return a;\n else\n return gcd(b,a%b);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n long ans=0;\n\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n ans+=helper(i,j,l);\n }\n }\n }\n System.out.println(ans);\n }\n\n private static long helper(int i, int j, int k) {\n\n long temp=gcd(i,j);\n long ans=gcd(temp,k);\n return ans;\n }\n\n private static long gcd(long a, long b) {\n if(b==0) return a;\n else\n return gcd(b,a%b);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int k=sc.nextInt(); long ans=0; for(int i=1;i<=k;i++){ for(int j=1;j<=k;j++){ for(int l=1;l<=k;l++){ ans+=helper(i,j,l); } } } System.out.println(ans); } private static long helper(int i, int j, int k) { long temp=gcd(i,j); long ans=gcd(temp,k); return ans; } private static long gcd(long a, long b) { if(b==0) return a; else return gcd(b,a%b); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 0, 13, 2, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 42, 2, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 2, 13, 13, 0, 13, 13, 29, 13, 23, 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 ], [ 11, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 11, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 38, 38 ], [ 38, 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 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 72, 73 ], [ 72, 74 ], [ 72, 75 ], [ 11, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 9, 82 ], [ 82, 83 ], [ 7, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 90, 91 ], [ 90, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 92, 96 ], [ 86, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 99, 102 ], [ 99, 103 ], [ 86, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 104, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 110, 119 ], [ 119, 120 ], [ 119, 121 ], [ 86, 122 ], [ 122, 123 ], [ 84, 124 ], [ 124, 125 ], [ 84, 126 ], [ 126, 127 ] ]
[ "import java.util.Scanner;\nimport java.lang.Math;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n sc.close();\n\n int M = 0;\n for(int i = 1;i<=N;i++){\n for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }\n }\n System.out.print(M);\n }\n\n public static int gcd(int a,int b){\n int c = a;\n a = Math.min(a,b);\n b = Math.max(c,b);\n\n while(b%a != 0){\n c = a;\n a = b%a;\n b = c;\n }\n return a;\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n sc.close();\n\n int M = 0;\n for(int i = 1;i<=N;i++){\n for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }\n }\n System.out.print(M);\n }\n\n public static int gcd(int a,int b){\n int c = a;\n a = Math.min(a,b);\n b = Math.max(c,b);\n\n while(b%a != 0){\n c = a;\n a = b%a;\n b = c;\n }\n return a;\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n sc.close();\n\n int M = 0;\n for(int i = 1;i<=N;i++){\n for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }\n }\n System.out.print(M);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n sc.close();\n\n int M = 0;\n for(int i = 1;i<=N;i++){\n for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }\n }\n System.out.print(M);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "int M = 0;", "M", "0", "for(int i = 1;i<=N;i++){\n for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\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 // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }\n }", "{\n for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }\n }", "for(int j = 1;j<=N;j++){\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j<=N", "j", "N", "j++", "j++", "j", "{\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }", "{\n // M = M + gcd(i,j);\n for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }\n }", "for(int k = 1;k<=N;k++){\n M = M + gcd(i,gcd(j,k));\n }", "int k = 1;", "int k = 1;", "k", "1", "k<=N", "k", "N", "k++", "k++", "k", "{\n M = M + gcd(i,gcd(j,k));\n }", "{\n M = M + gcd(i,gcd(j,k));\n }", "M = M + gcd(i,gcd(j,k))", "M", "M + gcd(i,gcd(j,k))", "M", "gcd(i,gcd(j,k))", "gcd", "i", "gcd(j,k)", "gcd", "j", "k", "System.out.print(M)", "System.out.print", "System.out", "System", "System.out", "M", "String[] args", "args", "public static int gcd(int a,int b){\n int c = a;\n a = Math.min(a,b);\n b = Math.max(c,b);\n\n while(b%a != 0){\n c = a;\n a = b%a;\n b = c;\n }\n return a;\n }", "gcd", "{\n int c = a;\n a = Math.min(a,b);\n b = Math.max(c,b);\n\n while(b%a != 0){\n c = a;\n a = b%a;\n b = c;\n }\n return a;\n }", "int c = a;", "c", "a", "a = Math.min(a,b)", "a", "Math.min(a,b)", "Math.min", "Math", "a", "b", "b = Math.max(c,b)", "b", "Math.max(c,b)", "Math.max", "Math", "c", "b", "while(b%a != 0){\n c = a;\n a = b%a;\n b = c;\n }", "b%a != 0", "b%a", "b", "a", "0", "{\n c = a;\n a = b%a;\n b = c;\n }", "c = a", "c", "a", "a = b%a", "a", "b%a", "b", "a", "b = c", "b", "c", "return a;", "a", "int a", "a", "int b", "b" ]
import java.util.Scanner; import java.lang.Math; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); sc.close(); int M = 0; for(int i = 1;i<=N;i++){ for(int j = 1;j<=N;j++){ // M = M + gcd(i,j); for(int k = 1;k<=N;k++){ M = M + gcd(i,gcd(j,k)); } } } System.out.print(M); } public static int gcd(int a,int b){ int c = a; a = Math.min(a,b); b = Math.max(c,b); while(b%a != 0){ c = a; a = b%a; b = c; } return a; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 4, 18, 13, 17, 13, 13, 4, 18, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 4, 18, 13, 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, 41, 13, 39, 13, 13, 13, 0, 13, 4, 13, 13, 4, 18, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 0, 13, 4, 13, 18, 13, 13, 13, 29, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 20, 17, 0, 18, 36, 13, 17, 0, 18, 36, 13, 17, 23, 13, 12, 13, 30, 14, 2, 13, 13, 29, 17, 30, 0, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 13, 14, 2, 13, 17, 29, 17, 29, 17, 12, 13, 30, 14, 4, 13, 29, 18, 13, 40, 13, 29, 40, 17, 12, 13, 30, 29, 2, 2, 17, 13, 2, 13, 17, 23, 13, 12, 13, 30, 42, 2, 4, 13, 40, 4, 13, 18, 13, 13, 30, 40, 13, 12, 13, 30, 4, 13, 29, 4, 13, 12, 13, 30, 14, 40, 4, 13, 37, 20, 41, 13, 17, 41, 13, 17, 41, 13, 4, 13, 14, 2, 13, 17, 30, 0, 13, 17, 0, 13, 4, 13, 14, 2, 2, 13, 17, 2, 17, 13, 37, 20, 42, 17, 30, 14, 2, 2, 17, 13, 2, 13, 17, 30, 0, 13, 17, 0, 13, 2, 13, 17, 14, 2, 2, 13, 40, 17, 40, 4, 13, 13, 30, 29, 8, 13, 40, 13, 13, 30, 37, 20, 0, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 390, 23 ], [ 390, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 29, 31 ], [ 26, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 26, 37 ], [ 37, 38 ], [ 37, 39 ], [ 26, 40 ], [ 40, 41 ], [ 40, 42 ], [ 26, 43 ], [ 43, 44 ], [ 43, 45 ], [ 26, 46 ], [ 46, 47 ], [ 47, 48 ], [ 46, 49 ], [ 46, 50 ], [ 46, 51 ], [ 26, 52 ], [ 52, 53 ], [ 53, 54 ], [ 24, 55 ], [ 55, 56 ], [ 390, 57 ], [ 57, 58 ], [ 57, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 65, 66 ], [ 61, 67 ], [ 67, 68 ], [ 67, 69 ], [ 61, 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 ], [ 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 ], [ 109, 111 ], [ 111, 112 ], [ 111, 113 ], [ 111, 114 ], [ 108, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 61, 120 ], [ 120, 121 ], [ 121, 122 ], [ 120, 123 ], [ 59, 124 ], [ 124, 125 ], [ 59, 126 ], [ 126, 127 ], [ 59, 128 ], [ 128, 129 ], [ 57, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 133, 134 ], [ 134, 135 ], [ 134, 136 ], [ 133, 137 ], [ 137, 138 ], [ 132, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 130, 146 ], [ 146, 147 ], [ 130, 148 ], [ 148, 149 ], [ 57, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 155, 157 ], [ 152, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 158, 163 ], [ 163, 164 ], [ 163, 165 ], [ 158, 166 ], [ 166, 167 ], [ 167, 168 ], [ 158, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 174, 176 ], [ 172, 177 ], [ 152, 178 ], [ 178, 179 ], [ 150, 180 ], [ 180, 181 ], [ 390, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 182, 186 ], [ 186, 187 ], [ 182, 188 ], [ 188, 189 ], [ 182, 190 ], [ 190, 191 ], [ 182, 192 ], [ 192, 193 ], [ 192, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 196, 198 ], [ 195, 199 ], [ 194, 200 ], [ 200, 201 ], [ 201, 202 ], [ 201, 203 ], [ 200, 204 ], [ 194, 206 ], [ 206, 207 ], [ 207, 208 ], [ 207, 209 ], [ 206, 210 ], [ 194, 211 ], [ 211, 212 ], [ 212, 213 ], [ 212, 214 ], [ 211, 215 ], [ 192, 216 ], [ 216, 217 ], [ 182, 218 ], [ 218, 219 ], [ 218, 220 ], [ 220, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 221, 225 ], [ 225, 226 ], [ 221, 227 ], [ 227, 228 ], [ 228, 229 ], [ 228, 230 ], [ 227, 231 ], [ 231, 232 ], [ 232, 233 ], [ 232, 234 ], [ 234, 235 ], [ 235, 236 ], [ 236, 237 ], [ 231, 238 ], [ 238, 239 ], [ 239, 240 ], [ 239, 241 ], [ 241, 242 ], [ 242, 243 ], [ 241, 244 ], [ 227, 245 ], [ 245, 246 ], [ 246, 247 ], [ 246, 248 ], [ 245, 249 ], [ 249, 250 ], [ 220, 251 ], [ 251, 252 ], [ 182, 253 ], [ 253, 254 ], [ 253, 255 ], [ 255, 256 ], [ 256, 257 ], [ 257, 258 ], [ 256, 259 ], [ 259, 260 ], [ 260, 261 ], [ 260, 262 ], [ 262, 263 ], [ 255, 264 ], [ 264, 265 ], [ 265, 266 ], [ 182, 267 ], [ 267, 268 ], [ 267, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 272, 273 ], [ 272, 274 ], [ 271, 275 ], [ 275, 276 ], [ 275, 277 ], [ 267, 278 ], [ 278, 279 ], [ 182, 280 ], [ 280, 281 ], [ 280, 282 ], [ 282, 283 ], [ 283, 284 ], [ 284, 285 ], [ 285, 286 ], [ 284, 287 ], [ 287, 288 ], [ 288, 289 ], [ 288, 290 ], [ 290, 291 ], [ 290, 292 ], [ 283, 293 ], [ 293, 294 ], [ 294, 295 ], [ 182, 296 ], [ 296, 297 ], [ 296, 298 ], [ 298, 299 ], [ 299, 300 ], [ 298, 301 ], [ 301, 302 ], [ 302, 303 ], [ 182, 304 ], [ 304, 305 ], [ 304, 306 ], [ 306, 307 ], [ 307, 308 ], [ 308, 309 ], [ 309, 310 ], [ 307, 311 ], [ 311, 312 ], [ 306, 313 ], [ 313, 314 ], [ 313, 315 ], [ 306, 316 ], [ 316, 317 ], [ 316, 318 ], [ 306, 319 ], [ 319, 320 ], [ 319, 321 ], [ 321, 322 ], [ 306, 323 ], [ 323, 324 ], [ 324, 325 ], [ 324, 326 ], [ 323, 327 ], [ 327, 328 ], [ 328, 329 ], [ 328, 330 ], [ 327, 331 ], [ 331, 332 ], [ 331, 333 ], [ 333, 334 ], [ 306, 335 ], [ 335, 336 ], [ 336, 337 ], [ 337, 338 ], [ 337, 339 ], [ 336, 340 ], [ 340, 341 ], [ 340, 342 ], [ 335, 343 ], [ 343, 344 ], [ 306, 345 ], [ 345, 346 ], [ 345, 347 ], [ 347, 348 ], [ 348, 349 ], [ 349, 350 ], [ 350, 351 ], [ 350, 352 ], [ 349, 353 ], [ 353, 354 ], [ 353, 355 ], [ 348, 356 ], [ 356, 357 ], [ 357, 358 ], [ 357, 359 ], [ 356, 360 ], [ 360, 361 ], [ 360, 362 ], [ 362, 363 ], [ 362, 364 ], [ 348, 365 ], [ 365, 366 ], [ 366, 367 ], [ 367, 368 ], [ 367, 369 ], [ 369, 370 ], [ 366, 371 ], [ 371, 372 ], [ 372, 373 ], [ 372, 374 ], [ 365, 375 ], [ 375, 376 ], [ 376, 377 ], [ 377, 378 ], [ 377, 379 ], [ 379, 380 ], [ 377, 381 ], [ 365, 382 ], [ 382, 383 ], [ 383, 384 ], [ 347, 385 ], [ 385, 386 ], [ 385, 387 ], [ 387, 388 ], [ 0, 389 ], [ 389, 390 ], [ 389, 391 ] ]
[ "import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.IOException;\nimport java.util.NoSuchElementException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CSumOfGcdOfTuplesEasy {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n static int gcd(int[] array) {\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }\n\n }\n\n static class Scanner {\n private final InputStream in;\n private final byte[] buffer;\n private int ptr;\n private int buflen;\n\n public Scanner(InputStream in) {\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }\n\n private byte readByte() {\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }\n\n private boolean isPrintableChar(byte c) {\n return '!' <= c && c <= '~';\n }\n\n private void skipUnprintable() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }\n\n public boolean hasNext() {\n skipUnprintable();\n return hasNextByte();\n }\n\n public int nextInt() {\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n }\n}\n", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.util.NoSuchElementException;", "NoSuchElementException", "java.util", "import java.io.InputStream;", "InputStream", "java.io", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CSumOfGcdOfTuplesEasy {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n static int gcd(int[] array) {\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }\n\n }\n\n static class Scanner {\n private final InputStream in;\n private final byte[] buffer;\n private int ptr;\n private int buflen;\n\n public Scanner(InputStream in) {\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }\n\n private byte readByte() {\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }\n\n private boolean isPrintableChar(byte c) {\n return '!' <= c && c <= '~';\n }\n\n private void skipUnprintable() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }\n\n public boolean hasNext() {\n skipUnprintable();\n return hasNextByte();\n }\n\n public int nextInt() {\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n }\n}", "Main", "public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();\n solver.solve(1, in, out);\n out.close();\n }", "main", "{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();\n solver.solve(1, in, out);\n out.close();\n }", "InputStream inputStream = System.in;", "inputStream", "System.in", "System", "System.in", "OutputStream outputStream = System.out;", "outputStream", "System.out", "System", "System.out", "Scanner in = new Scanner(inputStream);", "in", "new Scanner(inputStream)", "PrintWriter out = new PrintWriter(outputStream);", "out", "new PrintWriter(outputStream)", "CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();", "solver", "new CSumOfGcdOfTuplesEasy()", "solver.solve(1, in, out)", "solver.solve", "solver", "1", "in", "out", "out.close()", "out.close", "out", "String[] args", "args", "static class CSumOfGcdOfTuplesEasy {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n static int gcd(int[] array) {\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }\n\n }", "CSumOfGcdOfTuplesEasy", "public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }", "solve", "{\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "int total = 0;", "total", "0", "for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n int[] array = {i, j, k};\n total += gcd(array);\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }", "{\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }", "for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n int[] array = {i, j, k};\n total += gcd(array);\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }", "{\n for (int k = 1; k <= n; k++) {\n int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }", "for (int k = 1; k <= n; k++) {\n int[] array = {i, j, k};\n total += gcd(array);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n int[] array = {i, j, k};\n total += gcd(array);\n }", "{\n int[] array = {i, j, k};\n total += gcd(array);\n }", "int[] array = {i, j, k};", "array", "{i, j, k}", "i", "j", "k", "total += gcd(array)", "total", "gcd(array)", "gcd", "array", "out.println(total)", "out.println", "out", "total", "int testNumber", "testNumber", "Scanner in", "in", "PrintWriter out", "out", "static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }", "gcd", "{\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }", "if (a == 0)\n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "int a", "a", "int b", "b", "static int gcd(int[] array) {\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }", "gcd", "{\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }", "int result = array[0];", "result", "array[0]", "array", "0", "for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);", "int i = 1;", "int i = 1;", "i", "1", "i < 3", "i", "3", "i++", "i++", "i", "result = gcd(array[i], result);", "result = gcd(array[i], result)", "result", "gcd(array[i], result)", "gcd", "array[i]", "array", "i", "result", "return result;", "result", "int[] array", "array", "static class Scanner {\n private final InputStream in;\n private final byte[] buffer;\n private int ptr;\n private int buflen;\n\n public Scanner(InputStream in) {\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }\n\n private byte readByte() {\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }\n\n private boolean isPrintableChar(byte c) {\n return '!' <= c && c <= '~';\n }\n\n private void skipUnprintable() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }\n\n public boolean hasNext() {\n skipUnprintable();\n return hasNextByte();\n }\n\n public int nextInt() {\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n }", "Scanner", "private final InputStream in;", "in", "private final byte[] buffer;", "buffer", "private int ptr;", "ptr", "private int buflen;", "buflen", "public Scanner(InputStream in) {\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }", "Scanner", "{\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }", "this.in = in", "this.in", "this", "this.in", "in", "this.buffer = new byte[1024]", "this.buffer", "this", "this.buffer", "new byte[1024]", "1024", "this.ptr = 0", "this.ptr", "this", "this.ptr", "0", "this.buflen = 0", "this.buflen", "this", "this.buflen", "0", "InputStream in", "in", "private boolean hasNextByte() {\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }", "hasNextByte", "{\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }", "if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }", "ptr < buflen", "ptr", "buflen", "return true;", "true", "{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }", "ptr = 0", "ptr", "0", "try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n buflen = in.read(buffer);\n }", "buflen = in.read(buffer)", "buflen", "in.read(buffer)", "in.read", "in", "buffer", "if (buflen <= 0) return false;", "buflen <= 0", "buflen", "0", "return false;", "false", "return true;", "true", "private byte readByte() {\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }", "readByte", "{\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }", "if (hasNextByte()) return buffer[ptr++];", "hasNextByte()", "hasNextByte", "return buffer[ptr++];", "buffer[ptr++]", "buffer", "ptr++", "ptr", "return -1;", "-1", "1", "private boolean isPrintableChar(byte c) {\n return '!' <= c && c <= '~';\n }", "isPrintableChar", "{\n return '!' <= c && c <= '~';\n }", "return '!' <= c && c <= '~';", "'!' <= c && c <= '~'", "'!' <= c", "'!'", "c", "c <= '~'", "c", "'~'", "byte c", "c", "private void skipUnprintable() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }", "skipUnprintable", "{\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }", "while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }", "hasNextByte() && !isPrintableChar(buffer[ptr])", "hasNextByte()", "hasNextByte", "!isPrintableChar(buffer[ptr])", "isPrintableChar(buffer[ptr])", "isPrintableChar", "buffer[ptr]", "buffer", "ptr", "{\n ptr++;\n }", "ptr++", "ptr", "public boolean hasNext() {\n skipUnprintable();\n return hasNextByte();\n }", "hasNext", "{\n skipUnprintable();\n return hasNextByte();\n }", "skipUnprintable()", "skipUnprintable", "return hasNextByte();", "hasNextByte()", "hasNextByte", "public int nextInt() {\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }", "nextInt", "{\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }", "if (!hasNext()) throw new NoSuchElementException();", "!hasNext()", "hasNext()", "hasNext", "throw new NoSuchElementException();", "new NoSuchElementException()", "int n = 0;", "n", "0", "boolean minus = false;", "minus", "false", "byte b = readByte();", "b", "readByte()", "readByte", "if (b == '-') {\n minus = true;\n b = readByte();\n }", "b == '-'", "b", "'-'", "{\n minus = true;\n b = readByte();\n }", "minus = true", "minus", "true", "b = readByte()", "b", "readByte()", "readByte", "if (b < '0' || '9' < b) throw new NumberFormatException();", "b < '0' || '9' < b", "b < '0'", "b", "'0'", "'9' < b", "'9'", "b", "throw new NumberFormatException();", "new NumberFormatException()", "while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }", "true", "{\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }", "if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }", "'0' <= b && b <= '9'", "'0' <= b", "'0'", "b", "b <= '9'", "b", "'9'", "{\n n *= 10;\n n += b - '0';\n }", "n *= 10", "n", "10", "n += b - '0'", "n", "b - '0'", "b", "'0'", "if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }", "b == -1 || !isPrintableChar(b)", "b == -1", "b", "-1", "1", "!isPrintableChar(b)", "isPrintableChar(b)", "isPrintableChar", "b", "{\n return minus ? -n : n;\n }", "return minus ? -n : n;", "minus ? -n : n", "minus", "-n", "n", "n", "{\n throw new NumberFormatException();\n }", "throw new NumberFormatException();", "new NumberFormatException()", "b = readByte()", "b", "readByte()", "readByte", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CSumOfGcdOfTuplesEasy {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n static int gcd(int[] array) {\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }\n\n }\n\n static class Scanner {\n private final InputStream in;\n private final byte[] buffer;\n private int ptr;\n private int buflen;\n\n public Scanner(InputStream in) {\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }\n\n private byte readByte() {\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }\n\n private boolean isPrintableChar(byte c) {\n return '!' <= c && c <= '~';\n }\n\n private void skipUnprintable() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }\n\n public boolean hasNext() {\n skipUnprintable();\n return hasNextByte();\n }\n\n public int nextInt() {\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n }\n}", "public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class CSumOfGcdOfTuplesEasy {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n int n = in.nextInt();\n int total = 0;\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 int[] array = {i, j, k};\n total += gcd(array);\n }\n\n }\n\n }\n\n out.println(total);\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n static int gcd(int[] array) {\n int result = array[0];\n for (int i = 1; i < 3; i++)\n result = gcd(array[i], result);\n\n return result;\n }\n\n }\n\n static class Scanner {\n private final InputStream in;\n private final byte[] buffer;\n private int ptr;\n private int buflen;\n\n public Scanner(InputStream in) {\n this.in = in;\n this.buffer = new byte[1024];\n this.ptr = 0;\n this.buflen = 0;\n }\n\n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n else {\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) return false;\n }\n return true;\n }\n\n private byte readByte() {\n if (hasNextByte()) return buffer[ptr++];\n return -1;\n }\n\n private boolean isPrintableChar(byte c) {\n return '!' <= c && c <= '~';\n }\n\n private void skipUnprintable() {\n while (hasNextByte() && !isPrintableChar(buffer[ptr])) {\n ptr++;\n }\n }\n\n public boolean hasNext() {\n skipUnprintable();\n return hasNextByte();\n }\n\n public int nextInt() {\n if (!hasNext()) throw new NoSuchElementException();\n int n = 0;\n boolean minus = false;\n byte b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) throw new NumberFormatException();\n while (true) {\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n } else if (b == -1 || !isPrintableChar(b)) {\n return minus ? -n : n;\n } else {\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n }\n}", "Main" ]
import java.io.OutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.io.IOException; import java.util.NoSuchElementException; import java.io.InputStream; /** * Built using CHelper plug-in * Actual solution is at the top */ public class Main { public static void main(String[] args) { InputStream inputStream = System.in; OutputStream outputStream = System.out; Scanner in = new Scanner(inputStream); PrintWriter out = new PrintWriter(outputStream); CSumOfGcdOfTuplesEasy solver = new CSumOfGcdOfTuplesEasy(); solver.solve(1, in, out); out.close(); } static class CSumOfGcdOfTuplesEasy { public void solve(int testNumber, Scanner in, PrintWriter out) { int n = in.nextInt(); int total = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { int[] array = {i, j, k}; total += gcd(array); } } } out.println(total); } static int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } static int gcd(int[] array) { int result = array[0]; for (int i = 1; i < 3; i++) result = gcd(array[i], result); return result; } } static class Scanner { private final InputStream in; private final byte[] buffer; private int ptr; private int buflen; public Scanner(InputStream in) { this.in = in; this.buffer = new byte[1024]; this.ptr = 0; this.buflen = 0; } private boolean hasNextByte() { if (ptr < buflen) return true; else { ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) return false; } return true; } private byte readByte() { if (hasNextByte()) return buffer[ptr++]; return -1; } private boolean isPrintableChar(byte c) { return '!' <= c && c <= '~'; } private void skipUnprintable() { while (hasNextByte() && !isPrintableChar(buffer[ptr])) { ptr++; } } public boolean hasNext() { skipUnprintable(); return hasNextByte(); } public int nextInt() { if (!hasNext()) throw new NoSuchElementException(); int n = 0; boolean minus = false; byte b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) throw new NumberFormatException(); while (true) { if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; } else if (b == -1 || !isPrintableChar(b)) { return minus ? -n : n; } else { throw new NumberFormatException(); } b = readByte(); } } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 20, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 18, 13, 13, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 128, 5 ], [ 128, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 8, 65 ], [ 65, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 65, 70 ], [ 6, 71 ], [ 71, 72 ], [ 128, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 76, 80 ], [ 80, 81 ], [ 75, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 73, 89 ], [ 89, 90 ], [ 73, 91 ], [ 91, 92 ], [ 128, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 101, 106 ], [ 106, 107 ], [ 106, 108 ], [ 101, 109 ], [ 109, 110 ], [ 110, 111 ], [ 101, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 117, 119 ], [ 115, 120 ], [ 95, 121 ], [ 121, 122 ], [ 93, 123 ], [ 123, 124 ], [ 93, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.util.*;\npublic class Main\n{\n\t\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n long sum = 0;\n for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }\n System.out.println(sum);\n }\n \n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n \n // Function to find gcd of array of \n // numbers \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n } \n}", "import java.util.*;", "util.*", "java", "public class Main\n{\n\t\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n long sum = 0;\n for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }\n System.out.println(sum);\n }\n \n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n \n // Function to find gcd of array of \n // numbers \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n } \n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n long sum = 0;\n for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n long sum = 0;\n for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }\n System.out.println(sum);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int n = scan.nextInt();", "n", "scan.nextInt()", "scan.nextInt", "scan", "long sum = 0;", "sum", "0", "for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "{\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }", "{\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }", "for (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}", "{\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}", "for (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}", "{\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}", "sum += findGCD(new int[] {i, j, k} , 3)", "sum", "findGCD(new int[] {i, j, k} , 3)", "findGCD", "new int[] {i, j, k}", "3", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "gcd", "{ \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "if (a == 0) \n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "int a", "a", "int b", "b", "// Function to find gcd of array of \n // numbers \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n }", "findGCD", "{ \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n }", "int result = arr[0];", "result", "arr[0]", "arr", "0", "for (int i = 1; i < n; i++) \n result = gcd(arr[i], result);", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "result = gcd(arr[i], result);", "result = gcd(arr[i], result)", "result", "gcd(arr[i], result)", "gcd", "arr[i]", "arr", "i", "result", "return result;", "result", "int arr[]", "arr", "int n", "n", "public class Main\n{\n\t\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n long sum = 0;\n for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }\n System.out.println(sum);\n }\n \n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n \n // Function to find gcd of array of \n // numbers \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n } \n}", "public class Main\n{\n\t\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n long sum = 0;\n for (int i = 1; i <= n; i++) {\n \tfor (int j = 1; j <= n; j++) {\n \t\tfor (int k = 1; k <= n; k++) {\n \t\t\tsum += findGCD(new int[] {i, j, k} , 3);\n \t\t}\n \t}\n }\n System.out.println(sum);\n }\n \n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n \n // Function to find gcd of array of \n // numbers \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n } \n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int n = scan.nextInt(); long sum = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { sum += findGCD(new int[] {i, j, k} , 3); } } } System.out.println(sum); } static int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } // Function to find gcd of array of // numbers static int findGCD(int arr[], int n) { int result = arr[0]; for (int i = 1; i < n; i++) result = gcd(arr[i], result); return result; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 13, 41, 13, 13, 41, 13, 13, 41, 13, 17, 42, 2, 2, 13, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 30, 0, 13, 2, 13, 13, 42, 2, 2, 13, 13, 17, 30, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 30, 0, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 137, 5 ], [ 137, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 58, 62 ], [ 62, 63 ], [ 62, 64 ], [ 58, 65 ], [ 65, 66 ], [ 65, 67 ], [ 58, 68 ], [ 68, 69 ], [ 68, 70 ], [ 58, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 72, 76 ], [ 71, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 86, 88 ], [ 82, 89 ], [ 89, 90 ], [ 89, 91 ], [ 78, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 58, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 98, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 113, 115 ], [ 109, 116 ], [ 116, 117 ], [ 116, 118 ], [ 105, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 122, 124 ], [ 58, 125 ], [ 125, 126 ], [ 125, 127 ], [ 8, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 6, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "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 = sc.nextInt();\n int ans = 0;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }\n System.out.println(ans);\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 = sc.nextInt();\n int ans = 0;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for (int i=1;i<=n;i++) {\n for (int j=1;j<=n;j++) {\n for (int k=1;k<=n;k++) {\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }", "{\n for (int j=1;j<=n;j++) {\n for (int k=1;k<=n;k++) {\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }", "for (int j=1;j<=n;j++) {\n for (int k=1;k<=n;k++) {\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }", "{\n for (int k=1;k<=n;k++) {\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }", "for (int k=1;k<=n;k++) {\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }", "{\n int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }", "int a=i;", "a", "i", "int b=j;", "b", "j", "int c=k;", "c", "k", "int d=0;", "d", "0", "while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }", "a%b>0", "a%b", "a", "b", "0", "{\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }", "if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }", "a<b", "a", "b", "{\n d=b;\n b=a;\n a=d;\n }", "d=b", "d", "b", "b=a", "b", "a", "a=d", "a", "d", "{\n a=a%b;\n }", "a=a%b", "a", "a%b", "a", "b", "while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }", "b%c>0", "b%c", "b", "c", "0", "{\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }", "if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }", "b<c", "b", "c", "{\n d=c;\n c=b;\n b=d;\n }", "d=c", "d", "c", "c=b", "c", "b", "b=d", "b", "d", "{\n b=b%c;\n }", "b=b%c", "b", "b%c", "b", "c", "ans+=c", "ans", "c", "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 int n = sc.nextInt();\n int ans = 0;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 int a=i;\n int b=j;\n int c=k;\n int d=0;\n while (a%b>0) {\n if (a<b) {\n d=b;\n b=a;\n a=d;\n } else {\n a=a%b;\n }\n }\n while (b%c>0) {\n if (b<c) {\n d=c;\n c=b;\n b=d;\n } else {\n b=b%c;\n }\n }\n ans+=c;\n }\n }\n }\n System.out.println(ans);\n }\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 ans = 0; for (int i=1;i<=n;i++) { for (int j=1;j<=n;j++) { for (int k=1;k<=n;k++) { int a=i; int b=j; int c=k; int d=0; while (a%b>0) { if (a<b) { d=b; b=a; a=d; } else { a=a%b; } } while (b%c>0) { if (b<c) { d=c; c=b; b=d; } else { b=b%c; } } ans+=c; } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 8, 2, 4, 18, 13, 13, 13, 4, 18, 13, 13, 13, 13, 4, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 0, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 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 ], [ 7, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 19, 23 ], [ 18, 24 ], [ 24, 25 ], [ 25, 26 ], [ 24, 27 ], [ 24, 28 ], [ 17, 29 ], [ 17, 30 ], [ 30, 31 ], [ 31, 32 ], [ 30, 33 ], [ 30, 34 ], [ 14, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 50, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 50, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 50, 61 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 61, 65 ], [ 48, 66 ], [ 66, 67 ], [ 66, 68 ], [ 14, 69 ], [ 69, 70 ], [ 12, 71 ], [ 71, 72 ], [ 12, 73 ], [ 73, 74 ], [ 12, 75 ], [ 75, 76 ], [ 7, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 85, 88 ], [ 88, 89 ], [ 89, 90 ], [ 79, 91 ], [ 91, 92 ], [ 91, 93 ], [ 79, 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 ], [ 109, 110 ], [ 109, 111 ], [ 107, 112 ], [ 112, 113 ], [ 112, 114 ], [ 107, 115 ], [ 115, 116 ], [ 116, 117 ], [ 107, 118 ], [ 119, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 120, 125 ], [ 125, 126 ], [ 125, 127 ], [ 120, 128 ], [ 128, 129 ], [ 129, 130 ], [ 120, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 134, 136 ], [ 134, 137 ], [ 134, 138 ], [ 79, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 77, 145 ], [ 145, 146 ] ]
[ "import java.io.*;\nimport java.util.*;\nclass Main\n{\n\n static int gcd=1;\n static int get_GCD(int a, int b, int c){\n int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c);\n for(int i=1;i<=minimum;i++)\n {\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }\n return gcd;\n }\n public static void main(String []args)throws IOException\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.valueOf(br.readLine());\n int sum=0;\n for(int i=1;i<=n;i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }\n }\n System.out.println(sum); \n \n }\n }", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "class Main\n{\n\n static int gcd=1;\n static int get_GCD(int a, int b, int c){\n int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c);\n for(int i=1;i<=minimum;i++)\n {\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }\n return gcd;\n }\n public static void main(String []args)throws IOException\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.valueOf(br.readLine());\n int sum=0;\n for(int i=1;i<=n;i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }\n }\n System.out.println(sum); \n \n }\n }", "Main", "static int gcd=1;", "gcd", "1", "static int get_GCD(int a, int b, int c){\n int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c);\n for(int i=1;i<=minimum;i++)\n {\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }\n return gcd;\n }", "get_GCD", "{\n int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c);\n for(int i=1;i<=minimum;i++)\n {\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }\n return gcd;\n }", "int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c);", "minimum", "(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c)", "(Math.min(a,b)==Math.min(a,c))", "Math.min(a,b)", "Math.min", "Math", "a", "b", "Math.min(a,c)", "Math.min", "Math", "a", "c", "a", "Math.min(b,c)", "Math.min", "Math", "b", "c", "for(int i=1;i<=minimum;i++)\n {\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }", "int i=1;", "int i=1;", "i", "1", "i<=minimum", "i", "minimum", "i++", "i++", "i", "{\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }", "{\n if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;\n }", "if (a%i==0 && b%i==0 && c%i==0)\n gcd=i;", "a%i==0 && b%i==0 && c%i==0", "a%i==0 && b%i==0 && c%i==0", "a%i==0", "a%i", "a", "i", "0", "b%i==0", "b%i", "b", "i", "0", "c%i==0", "c%i", "c", "i", "0", "gcd=i", "gcd", "i", "return gcd;", "gcd", "int a", "a", "int b", "b", "int c", "c", "public static void main(String []args)throws IOException\n {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.valueOf(br.readLine());\n int sum=0;\n for(int i=1;i<=n;i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }\n }\n System.out.println(sum); \n \n }", "main", "{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int n=Integer.valueOf(br.readLine());\n int sum=0;\n for(int i=1;i<=n;i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }\n }\n System.out.println(sum); \n \n }", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int n=Integer.valueOf(br.readLine());", "n", "Integer.valueOf(br.readLine())", "Integer.valueOf", "Integer", "br.readLine()", "br.readLine", "br", "int sum=0;", "sum", "0", "for(int i=1;i<=n;i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\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 {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }\n }", "{\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }\n }", "for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\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 sum+=get_GCD(i,j,k);\n }", "{\n for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);\n }", "for(int k=1;k<=n;k++)\n sum+=get_GCD(i,j,k);", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "sum+=get_GCD(i,j,k);", "sum+=get_GCD(i,j,k)", "sum", "get_GCD(i,j,k)", "get_GCD", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String []args", "args" ]
import java.io.*; import java.util.*; class Main { static int gcd=1; static int get_GCD(int a, int b, int c){ int minimum=(Math.min(a,b)==Math.min(a,c))? a: Math.min(b,c); for(int i=1;i<=minimum;i++) { if (a%i==0 && b%i==0 && c%i==0) gcd=i; } return gcd; } public static void main(String []args)throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int n=Integer.valueOf(br.readLine()); int sum=0; for(int i=1;i<=n;i++) { for(int j=1;j<=n;j++) { for(int k=1;k<=n;k++) sum+=get_GCD(i,j,k); } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 104, 5 ], [ 104, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 104, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 85, 91 ], [ 91, 92 ], [ 91, 93 ], [ 85, 94 ], [ 94, 95 ], [ 94, 96 ], [ 78, 97 ], [ 97, 98 ], [ 76, 99 ], [ 99, 100 ], [ 76, 101 ], [ 101, 102 ], [ 0, 103 ], [ 103, 104 ], [ 103, 105 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\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 int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }", "{\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }", "for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }", "{\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }", "for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n sum += gcd(gcd(a, b),c);\n }", "{\n sum += gcd(gcd(a, b),c);\n }", "sum += gcd(gcd(a, b),c)", "sum", "gcd(gcd(a, b),c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }", "gcd", "{\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }", "int r;", "r", "while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }", "n > 0", "n", "0", "{\n r = m % n;\n m = n;\n n = r;\n }", "r = m % n", "r", "m % n", "m", "n", "m = n", "m", "n", "n = r", "n", "r", "return m;", "m", "int m", "m", "int n", "n", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b),c);\n }\n }\n }\n System.out.println(sum);\n }\n public static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); int k = scan.nextInt(); int sum = 0; for(int a = 1; a <= k; a++){ for(int b = 1; b <= k; b++){ for(int c = 1; c <= k; c++){ sum += gcd(gcd(a, b),c); } } } System.out.println(sum); } public static int gcd(int m, int n) { int r; while (n > 0) { r = m % n; m = n; n = r; } return m; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 13, 29, 13, 23, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 103, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 82, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 78, 96 ], [ 96, 97 ], [ 76, 98 ], [ 98, 99 ], [ 76, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint ans = 0;\n\n\t\tfor(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tstatic int gcd(int a,int b) {\n\t\tint temp;\n\t\twhile((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\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\n\t\tint K = scan.nextInt();\n\t\tint ans = 0;\n\n\t\tfor(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tstatic int gcd(int a,int b) {\n\t\tint temp;\n\t\twhile((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint ans = 0;\n\n\t\tfor(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint ans = 0;\n\n\t\tfor(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int K = scan.nextInt();", "K", "scan.nextInt()", "scan.nextInt", "scan", "int ans = 0;", "ans", "0", "for(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "{\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "{\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}", "for(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "{\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}", "{\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}", "ans += gcd(i,gcd(j,k))", "ans", "gcd(i,gcd(j,k))", "gcd", "i", "gcd(j,k)", "gcd", "j", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "static int gcd(int a,int b) {\n\t\tint temp;\n\t\twhile((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}", "gcd", "{\n\t\tint temp;\n\t\twhile((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}", "int temp;", "temp", "while((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}", "(temp = a % b) != 0", "(temp = a % b)", "temp", "a % b", "a", "b", "0", "{\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}", "a = b", "a", "b", "b = temp", "b", "temp", "return b;", "b", "int a", "a", "int b", "b", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint ans = 0;\n\n\t\tfor(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tstatic int gcd(int a,int b) {\n\t\tint temp;\n\t\twhile((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint ans = 0;\n\n\t\tfor(int i = 1;i <= K;i++) {\n\t\t\tfor(int j = 1;j <= K;j++) {\n\t\t\t\tfor(int k = 1;k <= K;k++) {\n\t\t\t\t\tans += gcd(i,gcd(j,k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tstatic int gcd(int a,int b) {\n\t\tint temp;\n\t\twhile((temp = a % b) != 0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\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 K = scan.nextInt(); int ans = 0; for(int i = 1;i <= K;i++) { for(int j = 1;j <= K;j++) { for(int k = 1;k <= K;k++) { ans += gcd(i,gcd(j,k)); } } } System.out.println(ans); } static int gcd(int a,int b) { int temp; while((temp = a % b) != 0) { a = b; b = temp; } return b; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 13, 29, 4, 13, 13, 13, 23, 13, 23, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 6, 72 ], [ 72, 73 ], [ 116, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 77, 81 ], [ 81, 82 ], [ 82, 83 ], [ 76, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 88, 89 ], [ 88, 90 ], [ 74, 91 ], [ 91, 92 ], [ 74, 93 ], [ 93, 94 ], [ 116, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 100, 103 ], [ 97, 104 ], [ 104, 105 ], [ 105, 106 ], [ 105, 107 ], [ 105, 108 ], [ 95, 109 ], [ 109, 110 ], [ 95, 111 ], [ 111, 112 ], [ 95, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "import java.util.Scanner;\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n long sum = 0;\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 sum += gcd3(i,j,k);\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b){\n if(b == 0){return a;}\n return gcd(b, a%b);\n }\n\n public static int gcd3(int x, int y, int z){\n int xy = gcd(x,y);\n return gcd(xy,z);\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 int n = scanner.nextInt();\n long sum = 0;\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 sum += gcd3(i,j,k);\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b){\n if(b == 0){return a;}\n return gcd(b, a%b);\n }\n\n public static int gcd3(int x, int y, int z){\n int xy = gcd(x,y);\n return gcd(xy,z);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n long sum = 0;\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 sum += gcd3(i,j,k);\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n long sum = 0;\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 sum += gcd3(i,j,k);\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int n = scanner.nextInt();", "n", "scanner.nextInt()", "scanner.nextInt", "scanner", "long sum = 0;", "sum", "0", "for(int i = 1; i <= n; i++){\n for(int j = 1; j <= n; j++){\n for(int k = 1; k <= n; k++){\n sum += gcd3(i,j,k);\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 sum += gcd3(i,j,k);\n }\n }\n }", "{\n for(int j = 1; j <= n; j++){\n for(int k = 1; k <= n; k++){\n sum += gcd3(i,j,k);\n }\n }\n }", "for(int j = 1; j <= n; j++){\n for(int k = 1; k <= n; k++){\n sum += gcd3(i,j,k);\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 sum += gcd3(i,j,k);\n }\n }", "{\n for(int k = 1; k <= n; k++){\n sum += gcd3(i,j,k);\n }\n }", "for(int k = 1; k <= n; k++){\n sum += gcd3(i,j,k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n sum += gcd3(i,j,k);\n }", "{\n sum += gcd3(i,j,k);\n }", "sum += gcd3(i,j,k)", "sum", "gcd3(i,j,k)", "gcd3", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int a, int b){\n if(b == 0){return a;}\n return gcd(b, a%b);\n }", "gcd", "{\n if(b == 0){return a;}\n return gcd(b, a%b);\n }", "if(b == 0){return a;}", "b == 0", "b", "0", "{return a;}", "return a;", "a", "return gcd(b, a%b);", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public static int gcd3(int x, int y, int z){\n int xy = gcd(x,y);\n return gcd(xy,z);\n }", "gcd3", "{\n int xy = gcd(x,y);\n return gcd(xy,z);\n }", "int xy = gcd(x,y);", "xy", "gcd(x,y)", "gcd", "x", "y", "return gcd(xy,z);", "gcd(xy,z)", "gcd", "xy", "z", "int x", "x", "int y", "y", "int z", "z", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n long sum = 0;\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 sum += gcd3(i,j,k);\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b){\n if(b == 0){return a;}\n return gcd(b, a%b);\n }\n\n public static int gcd3(int x, int y, int z){\n int xy = gcd(x,y);\n return gcd(xy,z);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n long sum = 0;\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 sum += gcd3(i,j,k);\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b){\n if(b == 0){return a;}\n return gcd(b, a%b);\n }\n\n public static int gcd3(int x, int y, int z){\n int xy = gcd(x,y);\n return gcd(xy,z);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); long sum = 0; for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ for(int k = 1; k <= n; k++){ sum += gcd3(i,j,k); } } } System.out.println(sum); } public static int gcd(int a, int b){ if(b == 0){return a;} return gcd(b, a%b); } public static int gcd3(int x, int y, int z){ int xy = gcd(x,y); return gcd(xy,z); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 2, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 100, 5 ], [ 100, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 66, 67 ], [ 66, 68 ], [ 66, 69 ], [ 8, 70 ], [ 70, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 70, 75 ], [ 6, 76 ], [ 76, 77 ], [ 100, 78 ], [ 78, 79 ], [ 78, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 80, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 92, 93 ], [ 92, 94 ], [ 78, 95 ], [ 95, 96 ], [ 78, 97 ], [ 97, 98 ], [ 0, 99 ], [ 99, 100 ], [ 99, 101 ] ]
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong K = in.nextLong();\n\t\tlong sum = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\t\n\tpublic static int gcd(int x, int y) {\n\t\tif(y == 0) {\n\t\t\treturn x;\n\t\t}\n\t\treturn gcd(y, x%y);\n\t}\n\t\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong K = in.nextLong();\n\t\tlong sum = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\t\n\tpublic static int gcd(int x, int y) {\n\t\tif(y == 0) {\n\t\t\treturn x;\n\t\t}\n\t\treturn gcd(y, x%y);\n\t}\n\t\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong K = in.nextLong();\n\t\tlong sum = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tlong K = in.nextLong();\n\t\tlong sum = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "long K = in.nextLong();", "K", "in.nextLong()", "in.nextLong", "in", "long sum = 0;", "sum", "0", "for(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=K", "i", "K", "i++", "i++", "i", "{\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}", "int j=1;", "int j=1;", "j", "1", "j<=K", "j", "K", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}", "for(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}", "int k=1;", "int k=1;", "k", "1", "k<=K", "k", "K", "k++", "k++", "k", "{\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}", "{\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}", "sum = sum + gcd(k, gcd(i,j))", "sum", "sum + gcd(k, gcd(i,j))", "sum", "gcd(k, gcd(i,j))", "gcd", "k", "gcd(i,j)", "gcd", "i", "j", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int x, int y) {\n\t\tif(y == 0) {\n\t\t\treturn x;\n\t\t}\n\t\treturn gcd(y, x%y);\n\t}", "gcd", "{\n\t\tif(y == 0) {\n\t\t\treturn x;\n\t\t}\n\t\treturn gcd(y, x%y);\n\t}", "if(y == 0) {\n\t\t\treturn x;\n\t\t}", "y == 0", "y", "0", "{\n\t\t\treturn x;\n\t\t}", "return x;", "x", "return gcd(y, x%y);", "gcd(y, x%y)", "gcd", "y", "x%y", "x", "y", "int x", "x", "int y", "y", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong K = in.nextLong();\n\t\tlong sum = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\t\n\tpublic static int gcd(int x, int y) {\n\t\tif(y == 0) {\n\t\t\treturn x;\n\t\t}\n\t\treturn gcd(y, x%y);\n\t}\n\t\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong K = in.nextLong();\n\t\tlong sum = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tsum = sum + gcd(k, gcd(i,j));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t\t\n\t}\n\t\n\tpublic static int gcd(int x, int y) {\n\t\tif(y == 0) {\n\t\t\treturn x;\n\t\t}\n\t\treturn gcd(y, x%y);\n\t}\n\t\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); long K = in.nextLong(); long sum = 0; for(int i=1; i<=K; i++) { for(int j=1; j<=K; j++) { for(int k=1; k<=K; k++) { sum = sum + gcd(k, gcd(i,j)); } } } System.out.println(sum); } public static int gcd(int x, int y) { if(y == 0) { return x; } return gcd(y, x%y); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 17, 23, 13, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 37, 20, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 29, 4, 18, 13, 29, 17, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 30, 0, 13, 4, 18, 13, 14, 2, 13, 17, 30, 29, 17, 0, 13, 20, 29, 17, 12, 13, 30, 29, 20, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 28, 29 ], [ 28, 30 ], [ 0, 31 ], [ 250, 32 ], [ 250, 33 ], [ 33, 34 ], [ 33, 35 ], [ 250, 36 ], [ 36, 37 ], [ 36, 38 ], [ 250, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 41, 47 ], [ 47, 48 ], [ 47, 49 ], [ 41, 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 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 94, 97 ], [ 41, 98 ], [ 98, 99 ], [ 99, 100 ], [ 98, 101 ], [ 41, 102 ], [ 102, 103 ], [ 103, 104 ], [ 39, 105 ], [ 105, 106 ], [ 250, 107 ], [ 107, 108 ], [ 107, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 109, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 118, 121 ], [ 121, 122 ], [ 121, 123 ], [ 107, 124 ], [ 124, 125 ], [ 107, 126 ], [ 126, 127 ], [ 250, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 128, 132 ], [ 132, 133 ], [ 128, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 140, 142 ], [ 134, 143 ], [ 143, 144 ], [ 128, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 148, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 159, 161 ], [ 161, 162 ], [ 162, 163 ], [ 158, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 147, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 128, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 176, 179 ], [ 179, 180 ], [ 128, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 188, 189 ], [ 128, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 194, 197 ], [ 197, 198 ], [ 128, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 205, 206 ], [ 206, 207 ], [ 207, 208 ], [ 202, 209 ], [ 209, 210 ], [ 210, 211 ], [ 211, 212 ], [ 212, 213 ], [ 201, 214 ], [ 214, 215 ], [ 128, 216 ], [ 216, 217 ], [ 216, 218 ], [ 218, 219 ], [ 219, 220 ], [ 219, 221 ], [ 218, 222 ], [ 222, 223 ], [ 223, 224 ], [ 223, 225 ], [ 222, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 230, 231 ], [ 218, 232 ], [ 232, 233 ], [ 233, 234 ], [ 233, 235 ], [ 232, 236 ], [ 236, 237 ], [ 237, 238 ], [ 218, 239 ], [ 239, 240 ], [ 239, 241 ], [ 218, 242 ], [ 242, 243 ], [ 128, 244 ], [ 244, 245 ], [ 244, 246 ], [ 246, 247 ], [ 247, 248 ], [ 0, 249 ], [ 249, 250 ], [ 249, 251 ] ]
[ "import java.io.*;\nimport java.lang.*;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.io.IOException;\nimport java.util.StringTokenizer;\nimport java.math.BigInteger;\n\npublic class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n long sum = 0;\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }\n out.print(sum);\n out.close();\n }\n static long gcd(long a, long b){\n \tif(b==0){\n \t return a;\n \t}\n return gcd(b, a%b);\n }\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }\n\n public boolean hasNext() {\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }\n\n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n }\n}\n", "import java.io.*;", "io.*", "java", "import java.lang.*;", "lang.*", "java", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.OutputStream;", "OutputStream", "java.io", "import java.io.PrintWriter;", "PrintWriter", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "import java.math.BigInteger;", "BigInteger", "java.math", "public class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n long sum = 0;\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }\n out.print(sum);\n out.close();\n }\n static long gcd(long a, long b){\n \tif(b==0){\n \t return a;\n \t}\n return gcd(b, a%b);\n }\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }\n\n public boolean hasNext() {\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }\n\n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n }\n}", "Main", "static InputReader in = new InputReader(System.in);", "in", "new InputReader(System.in)", "static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "public static void main(String[] args) {\n int n = in.nextInt();\n long sum = 0;\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }\n out.print(sum);\n out.close();\n }", "main", "{\n int n = in.nextInt();\n long sum = 0;\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }\n out.print(sum);\n out.close();\n }", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "long sum = 0;", "sum", "0", "for(int i = 1; i<=n; i++){\n for(int j = 1; j<=n; j++){\n for(int k = 1; k<=n; k++){\n sum+=gcd(i,(gcd(j,k)));\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }", "{\n for(int j = 1; j<=n; j++){\n for(int k = 1; k<=n; k++){\n sum+=gcd(i,(gcd(j,k)));\n }\n }\n }", "for(int j = 1; j<=n; j++){\n for(int k = 1; k<=n; k++){\n sum+=gcd(i,(gcd(j,k)));\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 sum+=gcd(i,(gcd(j,k)));\n }\n }", "{\n for(int k = 1; k<=n; k++){\n sum+=gcd(i,(gcd(j,k)));\n }\n }", "for(int k = 1; k<=n; k++){\n sum+=gcd(i,(gcd(j,k)));\n }", "int k = 1;", "int k = 1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n sum+=gcd(i,(gcd(j,k)));\n }", "{\n sum+=gcd(i,(gcd(j,k)));\n }", "sum+=gcd(i,(gcd(j,k)))", "sum", "gcd(i,(gcd(j,k)))", "gcd", "i", "(gcd(j,k))", "gcd", "j", "k", "out.print(sum)", "out.print", "out", "sum", "out.close()", "out.close", "out", "String[] args", "args", "static long gcd(long a, long b){\n \tif(b==0){\n \t return a;\n \t}\n return gcd(b, a%b);\n }", "gcd", "{\n \tif(b==0){\n \t return a;\n \t}\n return gcd(b, a%b);\n }", "if(b==0){\n \t return a;\n \t}", "b==0", "b", "0", "{\n \t return a;\n \t}", "return a;", "a", "return gcd(b, a%b);", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "long a", "a", "long b", "b", "static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }\n\n public boolean hasNext() {\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }\n\n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n }", "InputReader", "public BufferedReader reader;", "reader", "public StringTokenizer tokenizer;", "tokenizer", "public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "InputReader", "{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }", "reader = new BufferedReader(new InputStreamReader(stream), 32768)", "reader", "new BufferedReader(new InputStreamReader(stream), 32768)", "tokenizer = null", "tokenizer", "null", "InputStream stream", "stream", "public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "next", "{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }", "while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "tokenizer == null || !tokenizer.hasMoreTokens()", "tokenizer == null", "tokenizer", "null", "!tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens()", "tokenizer.hasMoreTokens", "tokenizer", "{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n throw new RuntimeException(e);\n }", "IOException e", "{\n throw new RuntimeException(e);\n }", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n tokenizer = new StringTokenizer(reader.readLine());\n }", "tokenizer = new StringTokenizer(reader.readLine())", "tokenizer", "new StringTokenizer(reader.readLine())", "return tokenizer.nextToken();", "tokenizer.nextToken()", "tokenizer.nextToken", "tokenizer", "public int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public String nextLine() {\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "nextLine", "{\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }", "catch (Exception e) {\n e.printStackTrace();\n }", "Exception e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n return reader.readLine();\n }", "return reader.readLine();", "reader.readLine()", "reader.readLine", "reader", "return null;", "null", "public boolean hasNext() {\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }", "hasNext", "{\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }", "String next = null;", "next", "null", "try {\n next = reader.readLine();\n } catch (Exception e) {\n }", "catch (Exception e) {\n }", "Exception e", "{\n }", "{\n next = reader.readLine();\n }", "next = reader.readLine()", "next", "reader.readLine()", "reader.readLine", "reader", "if (next == null) {\n return false;\n }", "next == null", "next", "null", "{\n return false;\n }", "return false;", "false", "tokenizer = new StringTokenizer(next)", "tokenizer", "new StringTokenizer(next)", "return true;", "true", "public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }", "nextBigInteger", "{\n return new BigInteger(next());\n }", "return new BigInteger(next());", "new BigInteger(next())", "public class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n long sum = 0;\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }\n out.print(sum);\n out.close();\n }\n static long gcd(long a, long b){\n \tif(b==0){\n \t return a;\n \t}\n return gcd(b, a%b);\n }\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }\n\n public boolean hasNext() {\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }\n\n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n }\n}", "public class Main {\n static InputReader in = new InputReader(System.in);\n static PrintWriter out = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int n = in.nextInt();\n long sum = 0;\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 sum+=gcd(i,(gcd(j,k)));\n }\n }\n }\n out.print(sum);\n out.close();\n }\n static long gcd(long a, long b){\n \tif(b==0){\n \t return a;\n \t}\n return gcd(b, a%b);\n }\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }\n\n public boolean hasNext() {\n String next = null;\n try {\n next = reader.readLine();\n } catch (Exception e) {\n }\n if (next == null) {\n return false;\n }\n tokenizer = new StringTokenizer(next);\n return true;\n }\n\n public BigInteger nextBigInteger() {\n return new BigInteger(next());\n }\n }\n}", "Main" ]
import java.io.*; import java.lang.*; import java.io.InputStream; import java.io.InputStreamReader; import java.io.BufferedReader; import java.io.OutputStream; import java.io.PrintWriter; import java.io.IOException; import java.util.StringTokenizer; import java.math.BigInteger; public class Main { static InputReader in = new InputReader(System.in); static PrintWriter out = new PrintWriter(System.out); public static void main(String[] args) { int n = in.nextInt(); long sum = 0; for(int i = 1; i<=n; i++){ for(int j = 1; j<=n; j++){ for(int k = 1; k<=n; k++){ sum+=gcd(i,(gcd(j,k))); } } } out.print(sum); out.close(); } static long gcd(long a, long b){ if(b==0){ return a; } return gcd(b, a%b); } static class InputReader { public BufferedReader reader; public StringTokenizer tokenizer; public InputReader(InputStream stream) { reader = new BufferedReader(new InputStreamReader(stream), 32768); tokenizer = null; } public String next() { while (tokenizer == null || !tokenizer.hasMoreTokens()) { try { tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } return tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String nextLine() { try { return reader.readLine(); } catch (Exception e) { e.printStackTrace(); } return null; } public boolean hasNext() { String next = null; try { next = reader.readLine(); } catch (Exception e) { } if (next == null) { return false; } tokenizer = new StringTokenizer(next); return true; } public BigInteger nextBigInteger() { return new BigInteger(next()); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 9, 14, 2, 2, 13, 13, 2, 2, 13, 13, 17, 30, 0, 13, 13, 3, 29, 13, 23, 13, 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 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 51, 53 ], [ 51, 54 ], [ 48, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 67, 74 ], [ 74, 75 ], [ 74, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 6, 83 ], [ 83, 84 ], [ 134, 85 ], [ 85, 86 ], [ 85, 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 ], [ 105, 109 ], [ 104, 110 ], [ 110, 111 ], [ 103, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 117, 121 ], [ 112, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 87, 127 ], [ 127, 128 ], [ 85, 129 ], [ 129, 130 ], [ 85, 131 ], [ 131, 132 ], [ 0, 133 ], [ 133, 134 ], [ 133, 135 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n sc.close();\n\n long sum = 0;\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }\n System.out.println(sum);\n }\n\n public static long getDualGcb(long m, long n) {\n long ret = 0;\n for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }\n return ret;\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 int K = sc.nextInt();\n sc.close();\n\n long sum = 0;\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }\n System.out.println(sum);\n }\n\n public static long getDualGcb(long m, long n) {\n long ret = 0;\n for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }\n return ret;\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n sc.close();\n\n long sum = 0;\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n sc.close();\n\n long sum = 0;\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "long sum = 0;", "sum", "0", "for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= K", "a", "K", "a++", "a++", "a", "{\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }", "{\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }", "for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= K", "b", "K", "b++", "b++", "b", "{\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }", "{\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }", "long tmp = getDualGcb(a, b);", "tmp", "getDualGcb(a, b)", "getDualGcb", "a", "b", "for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= K", "c", "K", "c++", "c++", "c", "{\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }", "{\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }", "long tmp2 = getDualGcb(tmp, c);", "tmp2", "getDualGcb(tmp, c)", "getDualGcb", "tmp", "c", "sum += tmp2", "sum", "tmp2", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static long getDualGcb(long m, long n) {\n long ret = 0;\n for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }\n return ret;\n }", "getDualGcb", "{\n long ret = 0;\n for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }\n return ret;\n }", "long ret = 0;", "ret", "0", "for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }", "long i = m;", "long i = m;", "i", "m", "i >= 1", "i", "1", "i--", "i--", "i", "{\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }", "{\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }", "if (m % i != 0) {\n continue;\n }", "m % i != 0", "m % i", "m", "i", "0", "{\n continue;\n }", "continue;", "if (n >= i && n % i == 0) {\n ret = i;\n break;\n }", "n >= i && n % i == 0", "n >= i", "n", "i", "n % i == 0", "n % i", "n", "i", "0", "{\n ret = i;\n break;\n }", "ret = i", "ret", "i", "break;", "return ret;", "ret", "long m", "m", "long n", "n", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n sc.close();\n\n long sum = 0;\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }\n System.out.println(sum);\n }\n\n public static long getDualGcb(long m, long n) {\n long ret = 0;\n for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }\n return ret;\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n sc.close();\n\n long sum = 0;\n for (int a = 1; a <= K; a++) {\n for (int b = 1; b <= K; b++) {\n long tmp = getDualGcb(a, b);\n for (int c = 1; c <= K; c++) {\n long tmp2 = getDualGcb(tmp, c);\n sum += tmp2;\n }\n }\n }\n System.out.println(sum);\n }\n\n public static long getDualGcb(long m, long n) {\n long ret = 0;\n for (long i = m; i >= 1; i--) {\n if (m % i != 0) {\n continue;\n }\n if (n >= i && n % i == 0) {\n ret = i;\n break;\n }\n }\n return ret;\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); sc.close(); long sum = 0; for (int a = 1; a <= K; a++) { for (int b = 1; b <= K; b++) { long tmp = getDualGcb(a, b); for (int c = 1; c <= K; c++) { long tmp2 = getDualGcb(tmp, c); sum += tmp2; } } } System.out.println(sum); } public static long getDualGcb(long m, long n) { long ret = 0; for (long i = m; i >= 1; i--) { if (m % i != 0) { continue; } if (n >= i && n % i == 0) { ret = i; break; } } return ret; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 0, 13, 20, 2, 13, 17, 2, 13, 17, 28, 13, 13, 30, 4, 18, 13, 13, 40, 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, 41, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 18, 18, 13, 13, 13, 40, 17, 29, 18, 18, 13, 13, 13, 41, 13, 4, 18, 13, 13, 13, 41, 13, 4, 18, 13, 13, 13, 42, 2, 13, 17, 30, 41, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 0, 18, 18, 13, 13, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 164, 8 ], [ 164, 9 ], [ 9, 10 ], [ 164, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 13, 22 ], [ 22, 23 ], [ 22, 24 ], [ 13, 25 ], [ 25, 26 ], [ 25, 27 ], [ 28, 29 ], [ 28, 30 ], [ 31, 32 ], [ 31, 33 ], [ 13, 34 ], [ 34, 35 ], [ 34, 36 ], [ 34, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 38, 42 ], [ 42, 43 ], [ 13, 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 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 82, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 13, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 11, 101 ], [ 101, 102 ], [ 164, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 107, 113 ], [ 113, 114 ], [ 106, 115 ], [ 115, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 105, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 123, 126 ], [ 123, 127 ], [ 105, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 131, 132 ], [ 130, 133 ], [ 130, 134 ], [ 105, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 142, 144 ], [ 139, 145 ], [ 145, 146 ], [ 145, 147 ], [ 139, 148 ], [ 148, 149 ], [ 148, 150 ], [ 105, 151 ], [ 151, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 152, 158 ], [ 103, 159 ], [ 159, 160 ], [ 103, 161 ], [ 161, 162 ], [ 0, 163 ], [ 163, 164 ], [ 163, 165 ] ]
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n static int[][] memo;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n memo = new int[k + 1][k + 1];\n for(int[] m : memo) Arrays.fill(m, -1);\n for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }\n System.out.println(ans);\n }\n\n static int gcd(int a, int b) {\n if(memo[a][b] != -1) return memo[a][b];\n int l = Math.max(a, b);\n int m = Math.min(a, b);\n while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }\n return memo[a][b] = l;\n }\n}", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n static int[][] memo;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n memo = new int[k + 1][k + 1];\n for(int[] m : memo) Arrays.fill(m, -1);\n for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }\n System.out.println(ans);\n }\n\n static int gcd(int a, int b) {\n if(memo[a][b] != -1) return memo[a][b];\n int l = Math.max(a, b);\n int m = Math.min(a, b);\n while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }\n return memo[a][b] = l;\n }\n}", "Main", "static int[][] memo;", "memo", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n memo = new int[k + 1][k + 1];\n for(int[] m : memo) Arrays.fill(m, -1);\n for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n memo = new int[k + 1][k + 1];\n for(int[] m : memo) Arrays.fill(m, -1);\n for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }\n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "memo = new int[k + 1][k + 1]", "memo", "new int[k + 1][k + 1]", "k + 1", "k", "1", "k + 1", "k", "1", "for(int[] m : memo) Arrays.fill(m, -1);", "int[] m", "memo", "Arrays.fill(m, -1);", "Arrays.fill(m, -1)", "Arrays.fill", "Arrays", "m", "-1", "1", "for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }", "{\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }", "for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }", "{\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }", "for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n int d = gcd(a, b);\n ans += gcd(d, c);\n }", "{\n int d = gcd(a, b);\n ans += gcd(d, c);\n }", "int d = gcd(a, b);", "d", "gcd(a, b)", "gcd", "a", "b", "ans += gcd(d, c)", "ans", "gcd(d, c)", "gcd", "d", "c", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "static int gcd(int a, int b) {\n if(memo[a][b] != -1) return memo[a][b];\n int l = Math.max(a, b);\n int m = Math.min(a, b);\n while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }\n return memo[a][b] = l;\n }", "gcd", "{\n if(memo[a][b] != -1) return memo[a][b];\n int l = Math.max(a, b);\n int m = Math.min(a, b);\n while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }\n return memo[a][b] = l;\n }", "if(memo[a][b] != -1) return memo[a][b];", "memo[a][b] != -1", "memo[a][b]", "memo[a]", "memo", "a", "b", "-1", "1", "return memo[a][b];", "memo[a][b]", "memo[a]", "memo", "a", "b", "int l = Math.max(a, b);", "l", "Math.max(a, b)", "Math.max", "Math", "a", "b", "int m = Math.min(a, b);", "m", "Math.min(a, b)", "Math.min", "Math", "a", "b", "while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }", "m > 0", "m", "0", "{\n int t = l % m;\n l = m;\n m = t;\n }", "int t = l % m;", "t", "l % m", "l", "m", "l = m", "l", "m", "m = t", "m", "t", "return memo[a][b] = l;", "memo[a][b] = l", "memo[a][b]", "memo[a]", "memo", "a", "b", "l", "int a", "a", "int b", "b", "public class Main {\n static int[][] memo;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n memo = new int[k + 1][k + 1];\n for(int[] m : memo) Arrays.fill(m, -1);\n for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }\n System.out.println(ans);\n }\n\n static int gcd(int a, int b) {\n if(memo[a][b] != -1) return memo[a][b];\n int l = Math.max(a, b);\n int m = Math.min(a, b);\n while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }\n return memo[a][b] = l;\n }\n}", "public class Main {\n static int[][] memo;\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int ans = 0;\n memo = new int[k + 1][k + 1];\n for(int[] m : memo) Arrays.fill(m, -1);\n for(int a = 1; a <= k; a++) {\n for(int b = 1; b <= k; b++) {\n for(int c = 1; c <= k; c++) {\n int d = gcd(a, b);\n ans += gcd(d, c);\n }\n }\n }\n System.out.println(ans);\n }\n\n static int gcd(int a, int b) {\n if(memo[a][b] != -1) return memo[a][b];\n int l = Math.max(a, b);\n int m = Math.min(a, b);\n while(m > 0) {\n int t = l % m;\n l = m;\n m = t;\n }\n return memo[a][b] = l;\n }\n}", "Main" ]
import java.util.Arrays; import java.util.Scanner; public class Main { static int[][] memo; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int ans = 0; memo = new int[k + 1][k + 1]; for(int[] m : memo) Arrays.fill(m, -1); for(int a = 1; a <= k; a++) { for(int b = 1; b <= k; b++) { for(int c = 1; c <= k; c++) { int d = gcd(a, b); ans += gcd(d, c); } } } System.out.println(ans); } static int gcd(int a, int b) { if(memo[a][b] != -1) return memo[a][b]; int l = Math.max(a, b); int m = Math.min(a, b); while(m > 0) { int t = l % m; l = m; m = t; } return memo[a][b] = l; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 9, 14, 2, 2, 13, 13, 17, 30, 9, 29, 13, 29, 17, 23, 13, 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 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 48, 51 ], [ 45, 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 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 131, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 81, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 106, 112 ], [ 112, 113 ], [ 105, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 114, 120 ], [ 120, 121 ], [ 105, 122 ], [ 122, 123 ], [ 81, 124 ], [ 124, 125 ], [ 79, 126 ], [ 126, 127 ], [ 79, 128 ], [ 128, 129 ], [ 0, 130 ], [ 130, 131 ], [ 130, 132 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong answer = 0;\n\t\tfor(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n\n\tprivate static int getMaxKoyakusu(int a, int b) {\n\t\tint base = a;\n\t\tif(base > b) {\n\t\t\tbase =b;\n\t\t}\n\n\t\tfor(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}\n\n\t\treturn 1;\n\n\t}\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong answer = 0;\n\t\tfor(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n\n\tprivate static int getMaxKoyakusu(int a, int b) {\n\t\tint base = a;\n\t\tif(base > b) {\n\t\t\tbase =b;\n\t\t}\n\n\t\tfor(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}\n\n\t\treturn 1;\n\n\t}\n}", "Main", "public static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong answer = 0;\n\t\tfor(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}", "main", "{\n\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong answer = 0;\n\t\tfor(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long answer = 0;", "answer", "0", "for(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a <=k", "a", "k", "a++", "a++", "a", "{\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}", "int b = 1;", "int b = 1;", "b", "1", "b <=k", "b", "k", "b++", "b++", "b", "{\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}", "int tmp = getMaxKoyakusu(a,b);", "tmp", "getMaxKoyakusu(a,b)", "getMaxKoyakusu", "a", "b", "for(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}", "int c = 1;", "int c = 1;", "c", "1", "c <=k", "c", "k", "c++", "c++", "c", "{\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}", "{\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}", "answer+= getMaxKoyakusu(tmp,c)", "answer", "getMaxKoyakusu(tmp,c)", "getMaxKoyakusu", "tmp", "c", "System.out.println(answer)", "System.out.println", "System.out", "System", "System.out", "answer", "String[] args", "args", "private static int getMaxKoyakusu(int a, int b) {\n\t\tint base = a;\n\t\tif(base > b) {\n\t\t\tbase =b;\n\t\t}\n\n\t\tfor(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}\n\n\t\treturn 1;\n\n\t}", "getMaxKoyakusu", "{\n\t\tint base = a;\n\t\tif(base > b) {\n\t\t\tbase =b;\n\t\t}\n\n\t\tfor(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}\n\n\t\treturn 1;\n\n\t}", "int base = a;", "base", "a", "if(base > b) {\n\t\t\tbase =b;\n\t\t}", "base > b", "base", "b", "{\n\t\t\tbase =b;\n\t\t}", "base =b", "base", "b", "for(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}", "int i =base;", "int i =base;", "i", "base", "i >=1", "i", "1", "i--", "i--", "i", "{\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}", "{\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}", "if(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}", "a % i !=0", "a % i", "a", "i", "0", "{\n\t\t\t\tcontinue;\n\t\t\t}", "continue;", "if(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}", "b % i !=0", "b % i", "b", "i", "0", "{\n\t\t\t\tcontinue;\n\t\t\t}", "continue;", "return i;", "i", "return 1;", "1", "int a", "a", "int b", "b", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong answer = 0;\n\t\tfor(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n\n\tprivate static int getMaxKoyakusu(int a, int b) {\n\t\tint base = a;\n\t\tif(base > b) {\n\t\t\tbase =b;\n\t\t}\n\n\t\tfor(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}\n\n\t\treturn 1;\n\n\t}\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint k = sc.nextInt();\n\t\tlong answer = 0;\n\t\tfor(int a = 1;a <=k;a++) {\n\t\t\tfor(int b = 1;b <=k;b++) {\n\t\t\t\tint tmp = getMaxKoyakusu(a,b);\n\t\t\t\tfor(int c = 1;c <=k;c++) {\n\t\t\t\t\tanswer+= getMaxKoyakusu(tmp,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(answer);\n\t}\n\n\tprivate static int getMaxKoyakusu(int a, int b) {\n\t\tint base = a;\n\t\tif(base > b) {\n\t\t\tbase =b;\n\t\t}\n\n\t\tfor(int i =base;i >=1;i--) {\n\t\t\tif(a % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(b % i !=0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn i;\n\t\t}\n\n\t\treturn 1;\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 k = sc.nextInt(); long answer = 0; for(int a = 1;a <=k;a++) { for(int b = 1;b <=k;b++) { int tmp = getMaxKoyakusu(a,b); for(int c = 1;c <=k;c++) { answer+= getMaxKoyakusu(tmp,c); } } } System.out.println(answer); } private static int getMaxKoyakusu(int a, int b) { int base = a; if(base > b) { base =b; } for(int i =base;i >=1;i--) { if(a % i !=0) { continue; } if(b % i !=0) { continue; } return i; } return 1; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 4, 18, 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, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 41, 13, 4, 18, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 41, 13, 39, 13, 13, 13, 4, 18, 13, 13, 0, 18, 36, 13, 18, 13, 17, 0, 18, 36, 13, 18, 13, 17, 0, 18, 36, 13, 18, 13, 17, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 36, 13, 29, 17, 14, 2, 2, 13, 17, 2, 4, 13, 4, 18, 13, 29, 17, 41, 13, 13, 29, 2, 2, 2, 13, 18, 13, 13, 2, 13, 18, 13, 13, 2, 13, 18, 13, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 13, 13, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 241, 14 ], [ 241, 15 ], [ 15, 16 ], [ 15, 17 ], [ 241, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 24, 26 ], [ 20, 27 ], [ 27, 28 ], [ 27, 29 ], [ 29, 30 ], [ 30, 31 ], [ 20, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 34, 37 ], [ 20, 38 ], [ 38, 39 ], [ 38, 40 ], [ 20, 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 ], [ 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 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 79, 88 ], [ 88, 89 ], [ 88, 90 ], [ 20, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 91, 96 ], [ 18, 97 ], [ 97, 98 ], [ 241, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 103, 108 ], [ 108, 109 ], [ 108, 110 ], [ 108, 111 ], [ 111, 112 ], [ 111, 113 ], [ 99, 114 ], [ 114, 115 ], [ 99, 116 ], [ 116, 117 ], [ 241, 118 ], [ 118, 119 ], [ 118, 120 ], [ 120, 121 ], [ 118, 122 ], [ 122, 123 ], [ 118, 124 ], [ 124, 125 ], [ 118, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 131, 134 ], [ 128, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 128, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 139, 143 ], [ 143, 144 ], [ 143, 145 ], [ 128, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 150, 151 ], [ 150, 152 ], [ 128, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 157, 159 ], [ 126, 160 ], [ 160, 161 ], [ 126, 162 ], [ 162, 163 ], [ 126, 164 ], [ 164, 165 ], [ 118, 166 ], [ 166, 167 ], [ 166, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 169, 173 ], [ 173, 174 ], [ 168, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 177, 179 ], [ 176, 180 ], [ 180, 181 ], [ 181, 182 ], [ 180, 183 ], [ 183, 184 ], [ 184, 185 ], [ 175, 186 ], [ 186, 187 ], [ 168, 188 ], [ 188, 189 ], [ 188, 190 ], [ 168, 191 ], [ 191, 192 ], [ 193, 193 ], [ 193, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 196, 198 ], [ 193, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 201, 203 ], [ 193, 204 ], [ 204, 205 ], [ 204, 206 ], [ 206, 207 ], [ 206, 208 ], [ 166, 209 ], [ 209, 210 ], [ 118, 211 ], [ 211, 212 ], [ 211, 213 ], [ 213, 214 ], [ 214, 215 ], [ 215, 216 ], [ 216, 217 ], [ 215, 218 ], [ 215, 219 ], [ 215, 220 ], [ 118, 221 ], [ 221, 222 ], [ 221, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 226, 227 ], [ 227, 228 ], [ 226, 229 ], [ 226, 230 ], [ 223, 231 ], [ 231, 232 ], [ 231, 233 ], [ 233, 234 ], [ 234, 235 ], [ 233, 236 ], [ 233, 237 ], [ 223, 238 ], [ 238, 239 ], [ 0, 240 ], [ 240, 241 ], [ 240, 242 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\n\npublic class Main {\n private static int MOD = 1000000007;\n\n\n public static void main(String[] args) throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String str = br.readLine();\n int k = Integer.parseInt(str);\n\n long total = 0;\n for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }\n System.out.println(total);\n }\n\n\n static class San {\n public int a, b, c;\n\n public San(int a, int b, int c) {\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(a, b, c);\n }\n\n public int gcd() {\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }\n }\n\n public static final int gcd(final int a, final int b) {\n return (b == 0) ? a : gcd(b, a % b);\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.*;", "util.*", "java", "public class Main {\n private static int MOD = 1000000007;\n\n\n public static void main(String[] args) throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String str = br.readLine();\n int k = Integer.parseInt(str);\n\n long total = 0;\n for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }\n System.out.println(total);\n }\n\n\n static class San {\n public int a, b, c;\n\n public San(int a, int b, int c) {\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(a, b, c);\n }\n\n public int gcd() {\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }\n }\n\n public static final int gcd(final int a, final int b) {\n return (b == 0) ? a : gcd(b, a % b);\n }\n}", "Main", "private static int MOD = 1000000007;", "MOD", "1000000007", "public static void main(String[] args) throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String str = br.readLine();\n int k = Integer.parseInt(str);\n\n long total = 0;\n for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }\n System.out.println(total);\n }", "main", "{\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String str = br.readLine();\n int k = Integer.parseInt(str);\n\n long total = 0;\n for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }\n System.out.println(total);\n }", "InputStreamReader isr = new InputStreamReader(System.in);", "isr", "new InputStreamReader(System.in)", "BufferedReader br = new BufferedReader(isr);", "br", "new BufferedReader(isr)", "String str = br.readLine();", "str", "br.readLine()", "br.readLine", "br", "int k = Integer.parseInt(str);", "k", "Integer.parseInt(str)", "Integer.parseInt", "Integer", "str", "long total = 0;", "total", "0", "for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }", "{\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }", "for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }", "int i1 = 1;", "int i1 = 1;", "i1", "1", "i1 <= k", "i1", "k", "i1++", "i1++", "i1", "{\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }", "{\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }", "for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }", "int i2 = 1;", "int i2 = 1;", "i2", "1", "i2 <= k", "i2", "k", "i2++", "i2++", "i2", "{\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }", "{\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }", "San s = new San(i, i1, i2);", "s", "new San(i, i1, i2)", "int result = s.gcd();", "result", "s.gcd()", "s.gcd", "s", "total += result", "total", "result", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String[] args", "args", "public static final int gcd(final int a, final int b) {\n return (b == 0) ? a : gcd(b, a % b);\n }", "gcd", "{\n return (b == 0) ? a : gcd(b, a % b);\n }", "return (b == 0) ? a : gcd(b, a % b);", "(b == 0) ? a : gcd(b, a % b)", "(b == 0)", "b", "0", "a", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "final int a", "a", "final int b", "b", "static class San {\n public int a, b, c;\n\n public San(int a, int b, int c) {\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(a, b, c);\n }\n\n public int gcd() {\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }\n }", "San", "public int a", "a", "b", "b", "c;", "c", "public San(int a, int b, int c) {\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }", "San", "{\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }", "int[] is = {a, b, c};", "is", "{a, b, c}", "a", "b", "c", "Arrays.sort(is)", "Arrays.sort", "Arrays", "is", "this.a = is[0]", "this.a", "this", "this.a", "is[0]", "is", "0", "this.b = is[1]", "this.b", "this", "this.b", "is[1]", "is", "1", "this.c = is[2]", "this.c", "this", "this.c", "is[2]", "is", "2", "int a", "a", "int b", "b", "int c", "c", "@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }", "equals", "{\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }", "if (this == o) return true;", "this == o", "this", "o", "return true;", "true", "if (o == null || getClass() != o.getClass()) return false;", "o == null || getClass() != o.getClass()", "o == null", "o", "null", "getClass() != o.getClass()", "getClass()", "getClass", "o.getClass()", "o.getClass", "o", "return false;", "false", "San san = (San) o;", "san", "(San) o", "return a == san.a &&\n b == san.b &&\n c == san.c;", "a == san.a &&\n b == san.b &&\n c == san.c", "a == san.a &&\n b == san.b &&\n c == san.c", "a == san.a", "a", "san.a", "san", "san.a", "b == san.b", "b", "san.b", "san", "san.b", "c == san.c", "c", "san.c", "san", "san.c", "Object o", "o", "@Override\n public int hashCode() {\n return Objects.hash(a, b, c);\n }", "hashCode", "{\n return Objects.hash(a, b, c);\n }", "return Objects.hash(a, b, c);", "Objects.hash(a, b, c)", "Objects.hash", "Objects", "a", "b", "c", "public int gcd() {\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }", "gcd", "{\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }", "int g = Main.gcd(a, b);", "g", "Main.gcd(a, b)", "Main.gcd", "Main", "a", "b", "g = Main.gcd(g, c)", "g", "Main.gcd(g, c)", "Main.gcd", "Main", "g", "c", "return g;", "g", "public class Main {\n private static int MOD = 1000000007;\n\n\n public static void main(String[] args) throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String str = br.readLine();\n int k = Integer.parseInt(str);\n\n long total = 0;\n for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }\n System.out.println(total);\n }\n\n\n static class San {\n public int a, b, c;\n\n public San(int a, int b, int c) {\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(a, b, c);\n }\n\n public int gcd() {\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }\n }\n\n public static final int gcd(final int a, final int b) {\n return (b == 0) ? a : gcd(b, a % b);\n }\n}", "public class Main {\n private static int MOD = 1000000007;\n\n\n public static void main(String[] args) throws IOException {\n InputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n String str = br.readLine();\n int k = Integer.parseInt(str);\n\n long total = 0;\n for (int i = 1; i <= k; i++) {\n for (int i1 = 1; i1 <= k; i1++) {\n for (int i2 = 1; i2 <= k; i2++) {\n San s = new San(i, i1, i2);\n int result = s.gcd();\n total += result;\n }\n }\n }\n System.out.println(total);\n }\n\n\n static class San {\n public int a, b, c;\n\n public San(int a, int b, int c) {\n int[] is = {a, b, c};\n Arrays.sort(is);\n this.a = is[0];\n this.b = is[1];\n this.c = is[2];\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n San san = (San) o;\n return a == san.a &&\n b == san.b &&\n c == san.c;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(a, b, c);\n }\n\n public int gcd() {\n int g = Main.gcd(a, b);\n g = Main.gcd(g, c);\n return g;\n }\n }\n\n public static final int gcd(final int a, final int b) {\n return (b == 0) ? a : gcd(b, a % b);\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { private static int MOD = 1000000007; public static void main(String[] args) throws IOException { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String str = br.readLine(); int k = Integer.parseInt(str); long total = 0; for (int i = 1; i <= k; i++) { for (int i1 = 1; i1 <= k; i1++) { for (int i2 = 1; i2 <= k; i2++) { San s = new San(i, i1, i2); int result = s.gcd(); total += result; } } } System.out.println(total); } static class San { public int a, b, c; public San(int a, int b, int c) { int[] is = {a, b, c}; Arrays.sort(is); this.a = is[0]; this.b = is[1]; this.c = is[2]; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; San san = (San) o; return a == san.a && b == san.b && c == san.c; } @Override public int hashCode() { return Objects.hash(a, b, c); } public int gcd() { int g = Main.gcd(a, b); g = Main.gcd(g, c); return g; } } public static final int gcd(final int a, final int b) { return (b == 0) ? a : gcd(b, a % b); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 97, 5 ], [ 97, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 97, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 78, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 89, 90 ], [ 89, 91 ], [ 76, 92 ], [ 92, 93 ], [ 76, 94 ], [ 94, 95 ], [ 0, 96 ], [ 96, 97 ], [ 96, 98 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int x = sc.nextInt();\n\n long ans = 0;\n for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }\n\n System.out.println(ans);\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int x = sc.nextInt();\n\n long ans = 0;\n for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }\n\n System.out.println(ans);\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "Main", "public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int x = sc.nextInt();\n\n long ans = 0;\n for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }\n\n System.out.println(ans);\n }", "main", "{\n final Scanner sc = new Scanner(System.in);\n\n final int x = sc.nextInt();\n\n long ans = 0;\n for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }\n\n System.out.println(ans);\n }", "final Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "final int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\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 for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }", "{\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }", "for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= x", "j", "x", "j++", "j++", "j", "{\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }", "{\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }", "for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= x", "k", "x", "k++", "k++", "k", "{\n ans += gcd(gcd(i, j), k);\n }", "{\n ans += gcd(gcd(i, j), k);\n }", "ans += gcd(gcd(i, j), k)", "ans", "gcd(gcd(i, j), k)", "gcd", "gcd(i, j)", "gcd", "i", "j", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "private static long gcd(long a, long b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n }", "gcd", "{\n if (b == 0) return a;\n return gcd(b, a % b);\n }", "if (b == 0) return a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "long a", "a", "long b", "b", "public class Main {\n\n public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int x = sc.nextInt();\n\n long ans = 0;\n for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }\n\n System.out.println(ans);\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n\n final int x = sc.nextInt();\n\n long ans = 0;\n for (int i = 1; i <= x; i++) {\n for (int j = 1; j <= x; j++) {\n for (int k = 1; k <= x; k++) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }\n\n System.out.println(ans);\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { final Scanner sc = new Scanner(System.in); final int x = sc.nextInt(); long ans = 0; for (int i = 1; i <= x; i++) { for (int j = 1; j <= x; j++) { for (int k = 1; k <= x; k++) { ans += gcd(gcd(i, j), k); } } } System.out.println(ans); } private static long gcd(long a, long b) { if (b == 0) return a; return gcd(b, a % b); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 41, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 29, 4, 13, 13, 13, 14, 2, 2, 13, 13, 17, 30, 29, 13, 30, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 119, 5 ], [ 119, 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 ], [ 10, 19 ], [ 19, 20 ], [ 19, 21 ], [ 10, 22 ], [ 22, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 27, 28 ], [ 27, 29 ], [ 22, 30 ], [ 30, 31 ], [ 31, 32 ], [ 22, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 35, 43 ], [ 43, 44 ], [ 44, 45 ], [ 35, 46 ], [ 47, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 53, 54 ], [ 53, 55 ], [ 48, 56 ], [ 56, 57 ], [ 57, 58 ], [ 48, 59 ], [ 60, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 60, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 60, 73 ], [ 73, 74 ], [ 73, 75 ], [ 10, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 6, 82 ], [ 82, 83 ], [ 119, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 86, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 97, 103 ], [ 103, 104 ], [ 104, 105 ], [ 97, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 108, 113 ], [ 84, 114 ], [ 114, 115 ], [ 84, 116 ], [ 116, 117 ], [ 0, 118 ], [ 118, 119 ], [ 118, 120 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\n\t\tif ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}\n\t\t\n\t\tif ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\n\t\tif ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}\n\t\t\n\t\tif ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}\n\t}\n\n}", "Main", "public static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}\n\t}", "main", "{\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}\n\t}", "try(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}", "{\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}", "Scanner sc = new Scanner(System.in)", "Scanner sc = new Scanner(System.in)", "new Scanner(System.in)", "int k= sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "int a = 1 ;", "int a = 1 ;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}\n\t\t\t\t}", "int b = 1 ;", "int b = 1 ;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}\n\t\t\t\t}", "for(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}", "int c = 1 ;", "int c = 1 ;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\n\t\t\t\t\t}", "int gcd1 = gcd(a, b);", "gcd1", "gcd(a, b)", "gcd", "a", "b", "int gcd2 = gcd(gcd1, c);", "gcd2", "gcd(gcd1, c)", "gcd", "gcd1", "c", "sum+= gcd2", "sum", "gcd2", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int a, int b) {\n\n\t\tif ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}\n\t\t\n\t\tif ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}\n\t}", "gcd", "{\n\n\t\tif ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}\n\t\t\n\t\tif ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}\n\t}", "if ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}", "a < b", "a", "b", "{\n\t\t\treturn gcd(b, a);\n\t\t}", "return gcd(b, a);", "gcd(b, a)", "gcd", "b", "a", "if ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}", "a % b == 0", "a % b", "a", "b", "0", "{\n\t\t\treturn b;\n\t\t}", "return b;", "b", "{\n\t\t\treturn gcd(a % b, b);\n\t\t}", "return gcd(a % b, b);", "gcd(a % b, b)", "gcd", "a % b", "a", "b", "b", "int a", "a", "int b", "b", "public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\n\t\tif ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}\n\t\t\n\t\tif ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\n\t\t\tint k= sc.nextInt();\n\t\t\t\n\t\t\tint sum = 0;\n\t\t\t\n\t\t\tfor(int a = 1 ; a <= k ; a++) {\n\t\t\t\tfor(int b = 1 ; b <= k ; b++ ) {\n\t\t\t\t\tfor(int c = 1 ; c <= k ; c++ ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tint gcd1 = gcd(a, b);\n\t\t\t\t\t\tint gcd2 = gcd(gcd1, c);\n\t\t\t\t\t\t\n\t\t\t\t\t\tsum+= gcd2;\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(sum);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\n\t\tif ( a < b ) {\n\t\t\treturn gcd(b, a);\n\t\t}\n\t\t\n\t\tif ( a % b == 0 ) {\n\t\t\treturn b;\n\t\t}\n\t\telse {\n\t\t\treturn gcd(a % b, b);\n\t\t}\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ try(Scanner sc = new Scanner(System.in)) { int k= sc.nextInt(); int sum = 0; for(int a = 1 ; a <= k ; a++) { for(int b = 1 ; b <= k ; b++ ) { for(int c = 1 ; c <= k ; c++ ) { int gcd1 = gcd(a, b); int gcd2 = gcd(gcd1, c); sum+= gcd2; } } } System.out.println(sum); } } public static int gcd(int a, int b) { if ( a < b ) { return gcd(b, a); } if ( a % b == 0 ) { return b; } else { return gcd(a % b, b); } } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 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 ], [ 115, 11 ], [ 115, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 20, 23 ], [ 14, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 24, 28 ], [ 28, 29 ], [ 14, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 31, 34 ], [ 34, 35 ], [ 34, 36 ], [ 12, 37 ], [ 37, 38 ], [ 12, 39 ], [ 39, 40 ], [ 115, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 49, 52 ], [ 52, 53 ], [ 53, 54 ], [ 43, 55 ], [ 55, 56 ], [ 55, 57 ], [ 43, 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 ], [ 97, 99 ], [ 99, 100 ], [ 99, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 102, 105 ], [ 43, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 41, 112 ], [ 112, 113 ], [ 0, 114 ], [ 114, 115 ], [ 114, 116 ] ]
[ "\nimport java.util.*;\nimport java.lang.*;\nimport java.util.stream.*;\n\npublic class Main {\n public static int gcd(int a, int b) {\n if(a < b) return gcd(b,a);\n if(b == 0) return a;\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer k = Integer.parseInt(scanner.next());\n\n int ans = 0;\n for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }\n System.out.println(ans);\n }\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "import java.util.stream.*;", "stream.*", "java.util", "public class Main {\n public static int gcd(int a, int b) {\n if(a < b) return gcd(b,a);\n if(b == 0) return a;\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer k = Integer.parseInt(scanner.next());\n\n int ans = 0;\n for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "public static int gcd(int a, int b) {\n if(a < b) return gcd(b,a);\n if(b == 0) return a;\n return gcd(b,a%b);\n }", "gcd", "{\n if(a < b) return gcd(b,a);\n if(b == 0) return a;\n return gcd(b,a%b);\n }", "if(a < b) return gcd(b,a);", "a < b", "a", "b", "return gcd(b,a);", "gcd(b,a)", "gcd", "b", "a", "if(b == 0) return a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer k = Integer.parseInt(scanner.next());\n\n int ans = 0;\n for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer k = Integer.parseInt(scanner.next());\n\n int ans = 0;\n for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }\n System.out.println(ans);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "Integer k = Integer.parseInt(scanner.next());", "k", "Integer.parseInt(scanner.next())", "Integer.parseInt", "Integer", "scanner.next()", "scanner.next", "scanner", "int ans = 0;", "ans", "0", "for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }", "{\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }", "for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "{\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }", "{\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }", "for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }", "int m = 1;", "int m = 1;", "m", "1", "m <= k", "m", "k", "m++", "m++", "m", "{\n ans += gcd(i, gcd(j,m));\n }", "{\n ans += gcd(i, gcd(j,m));\n }", "ans += gcd(i, gcd(j,m))", "ans", "gcd(i, gcd(j,m))", "gcd", "i", "gcd(j,m)", "gcd", "j", "m", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public class Main {\n public static int gcd(int a, int b) {\n if(a < b) return gcd(b,a);\n if(b == 0) return a;\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer k = Integer.parseInt(scanner.next());\n\n int ans = 0;\n for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n public static int gcd(int a, int b) {\n if(a < b) return gcd(b,a);\n if(b == 0) return a;\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n //コード\n Scanner scanner = new Scanner(System.in);\n Integer k = Integer.parseInt(scanner.next());\n\n int ans = 0;\n for(int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int m = 1; m <= k; m++) {\n ans += gcd(i, gcd(j,m));\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.util.*; import java.lang.*; import java.util.stream.*; public class Main { public static int gcd(int a, int b) { if(a < b) return gcd(b,a); if(b == 0) return a; return gcd(b,a%b); } public static void main(String[] args) { //コード Scanner scanner = new Scanner(System.in); Integer k = Integer.parseInt(scanner.next()); int ans = 0; for(int i = 1; i <= k; i++) { for (int j = 1; j <= k; j++) { for (int m = 1; m <= k; m++) { ans += gcd(i, gcd(j,m)); } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 14, 2, 13, 17, 29, 13, 14, 2, 13, 13, 29, 13, 14, 2, 13, 13, 29, 4, 13, 2, 13, 13, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 0, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 13, 13, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 217, 8 ], [ 217, 9 ], [ 9, 10 ], [ 217, 11 ], [ 11, 12 ], [ 11, 13 ], [ 13, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 13, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 13, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 13, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 32, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 39, 41 ], [ 37, 42 ], [ 13, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 44, 47 ], [ 47, 48 ], [ 47, 49 ], [ 11, 50 ], [ 50, 51 ], [ 11, 52 ], [ 52, 53 ], [ 217, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 60, 61 ], [ 60, 62 ], [ 56, 63 ], [ 63, 64 ], [ 63, 65 ], [ 65, 66 ], [ 66, 67 ], [ 56, 68 ], [ 68, 69 ], [ 68, 70 ], [ 56, 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 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 102, 103 ], [ 102, 104 ], [ 97, 105 ], [ 105, 106 ], [ 106, 107 ], [ 97, 108 ], [ 109, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 114, 116 ], [ 114, 117 ], [ 112, 118 ], [ 56, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 56, 123 ], [ 123, 124 ], [ 124, 125 ], [ 54, 126 ], [ 126, 127 ], [ 217, 128 ], [ 128, 129 ], [ 128, 130 ], [ 130, 131 ], [ 128, 132 ], [ 132, 133 ], [ 128, 134 ], [ 134, 135 ], [ 134, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 128, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 145, 146 ], [ 145, 147 ], [ 144, 148 ], [ 148, 149 ], [ 149, 150 ], [ 150, 151 ], [ 143, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 153, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 142, 164 ], [ 164, 165 ], [ 165, 166 ], [ 166, 167 ], [ 128, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 172, 173 ], [ 173, 174 ], [ 172, 175 ], [ 175, 176 ], [ 128, 177 ], [ 177, 178 ], [ 177, 179 ], [ 179, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 181, 184 ], [ 184, 185 ], [ 128, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 191, 192 ], [ 190, 193 ], [ 193, 194 ], [ 128, 195 ], [ 195, 196 ], [ 195, 197 ], [ 197, 198 ], [ 198, 199 ], [ 198, 200 ], [ 197, 201 ], [ 201, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 201, 208 ], [ 208, 209 ], [ 209, 210 ], [ 209, 211 ], [ 211, 212 ], [ 212, 213 ], [ 197, 214 ], [ 214, 215 ], [ 0, 216 ], [ 216, 217 ], [ 216, 218 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n static int gcd(int a, int b)\n {\n // Everything divides 0\n if (a == 0)\n return b;\n if (b == 0)\n return a;\n\n // base case\n if (a == b)\n return a;\n\n // a is greater\n if (a > b)\n return gcd(a-b, b);\n return gcd(a, b-a);\n }\n public static void main(String[] args) throws Exception{\n\n FastReader fs = new FastReader();\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n\n int k = fs.nextInt();\n long ans = 0 ;\n for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }\n \n out.println(ans);\n \n\n\n out.close();\n }\n //-----------PrintWriter for faster output---------------------------------\n public static PrintWriter out;\n\n //-----------MyScanner class for faster input----------\n public static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n }\n //--------------------------------------------------------\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n static int gcd(int a, int b)\n {\n // Everything divides 0\n if (a == 0)\n return b;\n if (b == 0)\n return a;\n\n // base case\n if (a == b)\n return a;\n\n // a is greater\n if (a > b)\n return gcd(a-b, b);\n return gcd(a, b-a);\n }\n public static void main(String[] args) throws Exception{\n\n FastReader fs = new FastReader();\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n\n int k = fs.nextInt();\n long ans = 0 ;\n for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }\n \n out.println(ans);\n \n\n\n out.close();\n }\n //-----------PrintWriter for faster output---------------------------------\n public static PrintWriter out;\n\n //-----------MyScanner class for faster input----------\n public static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n }\n //--------------------------------------------------------\n}", "Main", "//-----------PrintWriter for faster output---------------------------------\n public static PrintWriter out;", "out", "static int gcd(int a, int b)\n {\n // Everything divides 0\n if (a == 0)\n return b;\n if (b == 0)\n return a;\n\n // base case\n if (a == b)\n return a;\n\n // a is greater\n if (a > b)\n return gcd(a-b, b);\n return gcd(a, b-a);\n }", "gcd", "{\n // Everything divides 0\n if (a == 0)\n return b;\n if (b == 0)\n return a;\n\n // base case\n if (a == b)\n return a;\n\n // a is greater\n if (a > b)\n return gcd(a-b, b);\n return gcd(a, b-a);\n }", "if (a == 0)\n return b;", "a == 0", "a", "0", "return b;", "b", "if (b == 0)\n return a;", "b == 0", "b", "0", "return a;", "a", "if (a == b)\n return a;", "a == b", "a", "b", "return a;", "a", "if (a > b)\n return gcd(a-b, b);", "a > b", "a", "b", "return gcd(a-b, b);", "gcd(a-b, b)", "gcd", "a-b", "a", "b", "b", "return gcd(a, b-a);", "gcd(a, b-a)", "gcd", "a", "b-a", "b", "a", "int a", "a", "int b", "b", "public static void main(String[] args) throws Exception{\n\n FastReader fs = new FastReader();\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n\n int k = fs.nextInt();\n long ans = 0 ;\n for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }\n \n out.println(ans);\n \n\n\n out.close();\n }", "main", "{\n\n FastReader fs = new FastReader();\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n\n int k = fs.nextInt();\n long ans = 0 ;\n for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }\n \n out.println(ans);\n \n\n\n out.close();\n }", "FastReader fs = new FastReader();", "fs", "new FastReader()", "out = new PrintWriter(new BufferedOutputStream(System.out))", "out", "new PrintWriter(new BufferedOutputStream(System.out))", "int k = fs.nextInt();", "k", "fs.nextInt()", "fs.nextInt", "fs", "long ans = 0 ;", "ans", "0", "for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }", "int i=1 ;", "int i=1 ;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }", "{\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }", "for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }", "int j=1 ;", "int j=1 ;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }", "{\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }", "for(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }", "int l=1 ;", "int l=1 ;", "l", "1", "l<=k", "l", "k", "l++", "l++", "l", "{\n \tans += gcd(gcd(i,j),l);\n }", "{\n \tans += gcd(gcd(i,j),l);\n }", "ans += gcd(gcd(i,j),l)", "ans", "gcd(gcd(i,j),l)", "gcd", "gcd(i,j)", "gcd", "i", "j", "l", "out.println(ans)", "out.println", "out", "ans", "out.close()", "out.close", "out", "String[] args", "args", "public static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n static int gcd(int a, int b)\n {\n // Everything divides 0\n if (a == 0)\n return b;\n if (b == 0)\n return a;\n\n // base case\n if (a == b)\n return a;\n\n // a is greater\n if (a > b)\n return gcd(a-b, b);\n return gcd(a, b-a);\n }\n public static void main(String[] args) throws Exception{\n\n FastReader fs = new FastReader();\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n\n int k = fs.nextInt();\n long ans = 0 ;\n for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }\n \n out.println(ans);\n \n\n\n out.close();\n }\n //-----------PrintWriter for faster output---------------------------------\n public static PrintWriter out;\n\n //-----------MyScanner class for faster input----------\n public static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n }\n //--------------------------------------------------------\n}", "public class Main {\n static int gcd(int a, int b)\n {\n // Everything divides 0\n if (a == 0)\n return b;\n if (b == 0)\n return a;\n\n // base case\n if (a == b)\n return a;\n\n // a is greater\n if (a > b)\n return gcd(a-b, b);\n return gcd(a, b-a);\n }\n public static void main(String[] args) throws Exception{\n\n FastReader fs = new FastReader();\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n\n int k = fs.nextInt();\n long ans = 0 ;\n for(int i=1 ; i<=k ; i++){\n for(int j=1 ; j<=k ; j++){\n \tfor(int l=1 ; l<=k ; l++){\n \tans += gcd(gcd(i,j),l);\n }\n }\n }\n \n out.println(ans);\n \n\n\n out.close();\n }\n //-----------PrintWriter for faster output---------------------------------\n public static PrintWriter out;\n\n //-----------MyScanner class for faster input----------\n public static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n }\n //--------------------------------------------------------\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { static int gcd(int a, int b) { // Everything divides 0 if (a == 0) return b; if (b == 0) return a; // base case if (a == b) return a; // a is greater if (a > b) return gcd(a-b, b); return gcd(a, b-a); } public static void main(String[] args) throws Exception{ FastReader fs = new FastReader(); out = new PrintWriter(new BufferedOutputStream(System.out)); int k = fs.nextInt(); long ans = 0 ; for(int i=1 ; i<=k ; i++){ for(int j=1 ; j<=k ; j++){ for(int l=1 ; l<=k ; l++){ ans += gcd(gcd(i,j),l); } } } out.println(ans); out.close(); } //-----------PrintWriter for faster output--------------------------------- public static PrintWriter out; //-----------MyScanner class for faster input---------- public static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } //-------------------------------------------------------- }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 13, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 13, 13, 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 ], [ 127, 11 ], [ 127, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 15, 19 ], [ 19, 20 ], [ 14, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 24, 26 ], [ 22, 27 ], [ 12, 28 ], [ 28, 29 ], [ 12, 30 ], [ 30, 31 ], [ 127, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 34, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 40, 42 ], [ 40, 43 ], [ 34, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 46, 49 ], [ 34, 50 ], [ 50, 51 ], [ 32, 52 ], [ 52, 53 ], [ 32, 54 ], [ 54, 55 ], [ 32, 56 ], [ 56, 57 ], [ 127, 58 ], [ 58, 59 ], [ 58, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 60, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 66, 69 ], [ 69, 70 ], [ 70, 71 ], [ 60, 72 ], [ 72, 73 ], [ 72, 74 ], [ 60, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 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 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 99, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 99, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 113, 115 ], [ 113, 116 ], [ 113, 117 ], [ 60, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 118, 123 ], [ 58, 124 ], [ 124, 125 ], [ 0, 126 ], [ 126, 127 ], [ 126, 128 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main \n{\n\tstatic long gcd(long a, long b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic long GCD(long A, long B, long C)\n\t{\n\t\tlong Result = A;\n\t\tResult = gcd(Result, B);\n\t\tResult = gcd(Result, C);\n\t\treturn Result;\n\t}\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in));\n\t\tlong K = Long.parseLong(BR.readLine()), Sum = 0;\n\t\tfor (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);\n\t\tSystem.out.println(Sum);\n\t}\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "public class Main \n{\n\tstatic long gcd(long a, long b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic long GCD(long A, long B, long C)\n\t{\n\t\tlong Result = A;\n\t\tResult = gcd(Result, B);\n\t\tResult = gcd(Result, C);\n\t\treturn Result;\n\t}\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in));\n\t\tlong K = Long.parseLong(BR.readLine()), Sum = 0;\n\t\tfor (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);\n\t\tSystem.out.println(Sum);\n\t}\n}", "Main", "static long gcd(long a, long b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "gcd", "{ \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "if (a == 0) \n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "long a", "a", "long b", "b", "static long GCD(long A, long B, long C)\n\t{\n\t\tlong Result = A;\n\t\tResult = gcd(Result, B);\n\t\tResult = gcd(Result, C);\n\t\treturn Result;\n\t}", "GCD", "{\n\t\tlong Result = A;\n\t\tResult = gcd(Result, B);\n\t\tResult = gcd(Result, C);\n\t\treturn Result;\n\t}", "long Result = A;", "Result", "A", "Result = gcd(Result, B)", "Result", "gcd(Result, B)", "gcd", "Result", "B", "Result = gcd(Result, C)", "Result", "gcd(Result, C)", "gcd", "Result", "C", "return Result;", "Result", "long A", "A", "long B", "B", "long C", "C", "public static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in));\n\t\tlong K = Long.parseLong(BR.readLine()), Sum = 0;\n\t\tfor (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);\n\t\tSystem.out.println(Sum);\n\t}", "main", "{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in));\n\t\tlong K = Long.parseLong(BR.readLine()), Sum = 0;\n\t\tfor (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);\n\t\tSystem.out.println(Sum);\n\t}", "BufferedReader BR = new BufferedReader(new InputStreamReader(System.in));", "BR", "new BufferedReader(new InputStreamReader(System.in))", "long K = Long.parseLong(BR.readLine())", "K", "Long.parseLong(BR.readLine())", "Long.parseLong", "Long", "BR.readLine()", "BR.readLine", "BR", "Sum = 0;", "Sum", "0", "for (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);", "long i = 1;", "long i = 1;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "for (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);", "for (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);", "long j = 1;", "long j = 1;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "for (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);", "for (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);", "long k = 1;", "long k = 1;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "Sum += GCD(i, j, k);", "Sum += GCD(i, j, k)", "Sum", "GCD(i, j, k)", "GCD", "i", "j", "k", "System.out.println(Sum)", "System.out.println", "System.out", "System", "System.out", "Sum", "String[] Arguments", "Arguments", "public class Main \n{\n\tstatic long gcd(long a, long b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic long GCD(long A, long B, long C)\n\t{\n\t\tlong Result = A;\n\t\tResult = gcd(Result, B);\n\t\tResult = gcd(Result, C);\n\t\treturn Result;\n\t}\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in));\n\t\tlong K = Long.parseLong(BR.readLine()), Sum = 0;\n\t\tfor (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);\n\t\tSystem.out.println(Sum);\n\t}\n}", "public class Main \n{\n\tstatic long gcd(long a, long b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic long GCD(long A, long B, long C)\n\t{\n\t\tlong Result = A;\n\t\tResult = gcd(Result, B);\n\t\tResult = gcd(Result, C);\n\t\treturn Result;\n\t}\n\tpublic static void main(String[] Arguments) throws IOException \n\t{\n\t\tBufferedReader BR = new BufferedReader(new InputStreamReader(System.in));\n\t\tlong K = Long.parseLong(BR.readLine()), Sum = 0;\n\t\tfor (long i = 1; i <= K; i++)\n\t\t\tfor (long j = 1; j <= K; j++)\n\t\t\t\tfor (long k = 1; k <= K; k++)\n\t\t\t\t\tSum += GCD(i, j, k);\n\t\tSystem.out.println(Sum);\n\t}\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static long gcd(long a, long b) { if (a == 0) return b; return gcd(b % a, a); } static long GCD(long A, long B, long C) { long Result = A; Result = gcd(Result, B); Result = gcd(Result, C); return Result; } public static void main(String[] Arguments) throws IOException { BufferedReader BR = new BufferedReader(new InputStreamReader(System.in)); long K = Long.parseLong(BR.readLine()), Sum = 0; for (long i = 1; i <= K; i++) for (long j = 1; j <= K; j++) for (long k = 1; k <= K; k++) Sum += GCD(i, j, k); System.out.println(Sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 2, 13, 13, 42, 2, 13, 17, 30, 0, 13, 13, 0, 13, 13, 0, 13, 2, 13, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 110, 5 ], [ 110, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 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 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 110, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 84, 86 ], [ 81, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 95, 97 ], [ 91, 98 ], [ 98, 99 ], [ 98, 100 ], [ 100, 101 ], [ 100, 102 ], [ 81, 103 ], [ 103, 104 ], [ 79, 105 ], [ 105, 106 ], [ 79, 107 ], [ 107, 108 ], [ 0, 109 ], [ 109, 110 ], [ 109, 111 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n scan.close();\n\n long sum = 0;\n for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n int r = a % b;\n while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n scan.close();\n\n long sum = 0;\n for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n int r = a % b;\n while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n scan.close();\n\n long sum = 0;\n for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n scan.close();\n\n long sum = 0;\n for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int N = scan.nextInt();", "N", "scan.nextInt()", "scan.nextInt", "scan", "scan.close()", "scan.close", "scan", "long sum = 0;", "sum", "0", "for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }", "int a=1;", "int a=1;", "a", "1", "a<=N", "a", "N", "a++", "a++", "a", "{\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }", "{\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }", "for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }", "int b=1;", "int b=1;", "b", "1", "b<=N", "b", "N", "b++", "b++", "b", "{\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }", "{\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }", "for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }", "int c=1;", "int c=1;", "c", "1", "c<=N", "c", "N", "c++", "c++", "c", "{\n sum += gcd(a, gcd(b,c));\n }", "{\n sum += gcd(a, gcd(b,c));\n }", "sum += gcd(a, gcd(b,c))", "sum", "gcd(a, gcd(b,c))", "gcd", "a", "gcd(b,c)", "gcd", "b", "c", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int a, int b) {\n int r = a % b;\n while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }", "gcd", "{\n int r = a % b;\n while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }", "int r = a % b;", "r", "a % b", "a", "b", "while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }", "r != 0", "r", "0", "{\n a = b;\n b = r;\n r = a % b;\n }", "a = b", "a", "b", "b = r", "b", "r", "r = a % b", "r", "a % b", "a", "b", "return b;", "b", "int a", "a", "int b", "b", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n scan.close();\n\n long sum = 0;\n for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n int r = a % b;\n while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int N = scan.nextInt();\n scan.close();\n\n long sum = 0;\n for(int a=1; a<=N; a++) {\n for(int b=1; b<=N; b++) {\n for(int c=1; c<=N; c++) {\n sum += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(sum);\n }\n\n public static int gcd(int a, int b) {\n int r = a % b;\n while(r != 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\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(); scan.close(); long sum = 0; for(int a=1; a<=N; a++) { for(int b=1; b<=N; b++) { for(int c=1; c<=N; c++) { sum += gcd(a, gcd(b,c)); } } } System.out.println(sum); } public static int gcd(int a, int b) { int r = a % b; while(r != 0) { a = b; b = r; r = a % b; } return b; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 13, 41, 13, 4, 18, 13, 13, 13, 14, 2, 2, 13, 13, 17, 30, 29, 4, 13, 13, 2, 13, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 117, 8 ], [ 117, 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 ], [ 11, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 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 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 66, 69 ], [ 64, 70 ], [ 11, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 9, 77 ], [ 77, 78 ], [ 117, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 84, 87 ], [ 84, 88 ], [ 81, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 92, 93 ], [ 91, 94 ], [ 91, 95 ], [ 81, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 96, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 96, 110 ], [ 110, 111 ], [ 79, 112 ], [ 112, 113 ], [ 79, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.util.*;\nimport java.math.*;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint k = in.nextInt();\n\t\tlong ans = 0;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static int gcd(int a, int b) {\n\t\tint na = Math.max(a, b);\n\t\tint nb = Math.min(a, b);\n\t\tif(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;\n\t}\n} ", "import java.util.*;", "util.*", "java", "import java.math.*;", "math.*", "java", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint k = in.nextInt();\n\t\tlong ans = 0;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static int gcd(int a, int b) {\n\t\tint na = Math.max(a, b);\n\t\tint nb = Math.min(a, b);\n\t\tif(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;\n\t}\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint k = in.nextInt();\n\t\tlong ans = 0;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\tScanner in = new Scanner(System.in);\n\t\tint k = in.nextInt();\n\t\tlong ans = 0;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "Scanner in = new Scanner(System.in);", "in", "new Scanner(System.in)", "int k = in.nextInt();", "k", "in.nextInt()", "in.nextInt", "in", "long ans = 0;", "ans", "0", "for(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "{\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}", "for(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}", "int l = 1;", "int l = 1;", "l", "1", "l <= k", "l", "k", "l++", "l++", "l", "{\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}", "{\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}", "ans += gcd(gcd(i, j), l)", "ans", "gcd(gcd(i, j), l)", "gcd", "gcd(i, j)", "gcd", "i", "j", "l", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public static int gcd(int a, int b) {\n\t\tint na = Math.max(a, b);\n\t\tint nb = Math.min(a, b);\n\t\tif(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;\n\t}", "gcd", "{\n\t\tint na = Math.max(a, b);\n\t\tint nb = Math.min(a, b);\n\t\tif(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;\n\t}", "int na = Math.max(a, b);", "na", "Math.max(a, b)", "Math.max", "Math", "a", "b", "int nb = Math.min(a, b);", "nb", "Math.min(a, b)", "Math.min", "Math", "a", "b", "if(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;", "na % nb != 0", "na % nb", "na", "nb", "0", "{\n\t\t\treturn gcd(nb, na % nb);\n\t\t}", "return gcd(nb, na % nb);", "gcd(nb, na % nb)", "gcd", "nb", "na % nb", "na", "nb", "return nb;", "nb", "int a", "a", "int b", "b", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint k = in.nextInt();\n\t\tlong ans = 0;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static int gcd(int a, int b) {\n\t\tint na = Math.max(a, b);\n\t\tint nb = Math.min(a, b);\n\t\tif(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;\n\t}\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint k = in.nextInt();\n\t\tlong ans = 0;\n\t\tfor(int i = 1; i <= k; i++) {\n\t\t\tfor(int j = 1; j <= k; j++) {\n\t\t\t\tfor(int l = 1; l <= k; l++) {\n\t\t\t\t\tans += gcd(gcd(i, j), l);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tpublic static int gcd(int a, int b) {\n\t\tint na = Math.max(a, b);\n\t\tint nb = Math.min(a, b);\n\t\tif(na % nb != 0) {\n\t\t\treturn gcd(nb, na % nb);\n\t\t}else return nb;\n\t}\n}", "Main" ]
import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int k = in.nextInt(); long ans = 0; for(int i = 1; i <= k; i++) { for(int j = 1; j <= k; j++) { for(int l = 1; l <= k; l++) { ans += gcd(gcd(i, j), l); } } } System.out.println(ans); } public static int gcd(int a, int b) { int na = Math.max(a, b); int nb = Math.min(a, b); if(na % nb != 0) { return gcd(nb, na % nb); }else return nb; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 17, 13, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 98, 5 ], [ 98, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 98, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 79, 83 ], [ 83, 84 ], [ 84, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 87, 90 ], [ 90, 91 ], [ 90, 92 ], [ 76, 93 ], [ 93, 94 ], [ 76, 95 ], [ 95, 96 ], [ 0, 97 ], [ 97, 98 ], [ 97, 99 ] ]
[ "import java.util.*;\npublic class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n long total=0;\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 total += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(total);\n }\n\n static long gcd(long x, long y){\n if(0 == y){\n return x;\n }\n return gcd(y, x%y); \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 int N = sc.nextInt();\n long total=0;\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 total += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(total);\n }\n\n static long gcd(long x, long y){\n if(0 == y){\n return x;\n }\n return gcd(y, x%y); \n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n long total=0;\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 total += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(total);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n long total=0;\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 total += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(total);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int N = sc.nextInt();", "N", "sc.nextInt()", "sc.nextInt", "sc", "long total=0;", "total", "0", "for(int i=1; i<=N; i++){\n for(int j=1; j<=N; j++){\n for(int k=1; k<=N; k++){\n total += gcd(gcd(i,j),k);\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 total += gcd(gcd(i,j),k);\n }\n }\n }", "{\n for(int j=1; j<=N; j++){\n for(int k=1; k<=N; k++){\n total += gcd(gcd(i,j),k);\n }\n }\n }", "for(int j=1; j<=N; j++){\n for(int k=1; k<=N; k++){\n total += gcd(gcd(i,j),k);\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 total += gcd(gcd(i,j),k);\n }\n }", "{\n for(int k=1; k<=N; k++){\n total += gcd(gcd(i,j),k);\n }\n }", "for(int k=1; k<=N; k++){\n total += gcd(gcd(i,j),k);\n }", "int k=1;", "int k=1;", "k", "1", "k<=N", "k", "N", "k++", "k++", "k", "{\n total += gcd(gcd(i,j),k);\n }", "{\n total += gcd(gcd(i,j),k);\n }", "total += gcd(gcd(i,j),k)", "total", "gcd(gcd(i,j),k)", "gcd", "gcd(i,j)", "gcd", "i", "j", "k", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String args[]", "args", "static long gcd(long x, long y){\n if(0 == y){\n return x;\n }\n return gcd(y, x%y); \n }", "gcd", "{\n if(0 == y){\n return x;\n }\n return gcd(y, x%y); \n }", "if(0 == y){\n return x;\n }", "0 == y", "0", "y", "{\n return x;\n }", "return x;", "x", "return gcd(y, x%y);", "gcd(y, x%y)", "gcd", "y", "x%y", "x", "y", "long x", "x", "long y", "y", "public class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n long total=0;\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 total += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(total);\n }\n\n static long gcd(long x, long y){\n if(0 == y){\n return x;\n }\n return gcd(y, x%y); \n }\n}", "public class Main {\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n long total=0;\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 total += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(total);\n }\n\n static long gcd(long x, long y){\n if(0 == y){\n return x;\n }\n return gcd(y, x%y); \n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String args[]){ Scanner sc = new Scanner(System.in); int N = sc.nextInt(); long total=0; for(int i=1; i<=N; i++){ for(int j=1; j<=N; j++){ for(int k=1; k<=N; k++){ total += gcd(gcd(i,j),k); } } } System.out.println(total); } static long gcd(long x, long y){ if(0 == y){ return x; } return gcd(y, x%y); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 27, 29 ], [ 20, 30 ], [ 30, 31 ], [ 31, 32 ], [ 20, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 67, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 6, 80 ], [ 80, 81 ], [ 105, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 85, 91 ], [ 91, 92 ], [ 84, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 82, 100 ], [ 100, 101 ], [ 82, 102 ], [ 102, 103 ], [ 0, 104 ], [ 104, 105 ], [ 104, 106 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint k = scan.nextInt();\n\t\t\n\t\tlong total = 0;\n\t\t\n\t\tfor(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(total);\n\t}\n\t\n\t//ユークリッドの互除法\n\tstatic int gcd(int p, int q) {\n\t\tif(p % q == 0)\treturn q;\t//最大公約数\n\t\treturn gcd(q, p % q);\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\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint k = scan.nextInt();\n\t\t\n\t\tlong total = 0;\n\t\t\n\t\tfor(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(total);\n\t}\n\t\n\t//ユークリッドの互除法\n\tstatic int gcd(int p, int q) {\n\t\tif(p % q == 0)\treturn q;\t//最大公約数\n\t\treturn gcd(q, p % q);\t\t//答えが見つかるまで繰り返し\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint k = scan.nextInt();\n\t\t\n\t\tlong total = 0;\n\t\t\n\t\tfor(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(total);\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint k = scan.nextInt();\n\t\t\n\t\tlong total = 0;\n\t\t\n\t\tfor(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(total);\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "long total = 0;", "total", "0", "for(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a < k+1", "a", "k+1", "k", "1", "a++", "a++", "a", "{\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}", "int b = 1;", "int b = 1;", "b", "1", "b < k+1", "b", "k+1", "k", "1", "b++", "b++", "b", "{\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}", "for(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}", "int c = 1;", "int c = 1;", "c", "1", "c < k+1", "c", "k+1", "k", "1", "c++", "c++", "c", "{\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}", "{\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}", "total += gcd(gcd(a, b), c)", "total", "gcd(gcd(a, b), c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String[] args", "args", "//ユークリッドの互除法\n\tstatic int gcd(int p, int q) {\n\t\tif(p % q == 0)\treturn q;\t//最大公約数\n\t\treturn gcd(q, p % q);\t\t//答えが見つかるまで繰り返し\n\t}", "gcd", "{\n\t\tif(p % q == 0)\treturn q;\t//最大公約数\n\t\treturn gcd(q, p % q);\t\t//答えが見つかるまで繰り返し\n\t}", "if(p % q == 0)\treturn q;\t//最大公約数", "p % q == 0", "p % q", "p", "q", "0", "return q;\t//最大公約数", "q", "return gcd(q, p % q);\t\t//答えが見つかるまで繰り返し", "gcd(q, p % q)", "gcd", "q", "p % q", "p", "q", "int p", "p", "int q", "q", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint k = scan.nextInt();\n\t\t\n\t\tlong total = 0;\n\t\t\n\t\tfor(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(total);\n\t}\n\t\n\t//ユークリッドの互除法\n\tstatic int gcd(int p, int q) {\n\t\tif(p % q == 0)\treturn q;\t//最大公約数\n\t\treturn gcd(q, p % q);\t\t//答えが見つかるまで繰り返し\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tint k = scan.nextInt();\n\t\t\n\t\tlong total = 0;\n\t\t\n\t\tfor(int a = 1; a < k+1; a++) {\n\t\t\tfor(int b = 1; b < k+1; b++) {\n\t\t\t\tfor(int c = 1; c < k+1; c++) {\n\t\t\t\t\ttotal += gcd(gcd(a, b), c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(total);\n\t}\n\t\n\t//ユークリッドの互除法\n\tstatic int gcd(int p, int q) {\n\t\tif(p % q == 0)\treturn q;\t//最大公約数\n\t\treturn gcd(q, p % q);\t\t//答えが見つかるまで繰り返し\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); int k = scan.nextInt(); long total = 0; for(int a = 1; a < k+1; a++) { for(int b = 1; b < k+1; b++) { for(int c = 1; c < k+1; c++) { total += gcd(gcd(a, b), c); } } } System.out.println(total); } //ユークリッドの互除法 static int gcd(int p, int q) { if(p % q == 0) return q; //最大公約数 return gcd(q, p % q); //答えが見つかるまで繰り返し } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 13, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 133, 17 ], [ 133, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 21, 25 ], [ 25, 26 ], [ 20, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 18, 34 ], [ 34, 35 ], [ 18, 36 ], [ 36, 37 ], [ 133, 38 ], [ 38, 39 ], [ 38, 40 ], [ 40, 41 ], [ 41, 42 ], [ 41, 43 ], [ 40, 44 ], [ 44, 45 ], [ 44, 46 ], [ 46, 47 ], [ 46, 48 ], [ 46, 49 ], [ 40, 50 ], [ 50, 51 ], [ 50, 52 ], [ 52, 53 ], [ 52, 54 ], [ 52, 55 ], [ 40, 56 ], [ 56, 57 ], [ 38, 58 ], [ 58, 59 ], [ 38, 60 ], [ 60, 61 ], [ 38, 62 ], [ 62, 63 ], [ 133, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 66, 75 ], [ 75, 76 ], [ 75, 77 ], [ 66, 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 ], [ 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 ], [ 104, 109 ], [ 109, 110 ], [ 109, 111 ], [ 104, 112 ], [ 112, 113 ], [ 113, 114 ], [ 104, 115 ], [ 116, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 119, 121 ], [ 119, 122 ], [ 119, 123 ], [ 66, 124 ], [ 124, 125 ], [ 125, 126 ], [ 126, 127 ], [ 126, 128 ], [ 124, 129 ], [ 64, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ] ]
[ "import java.io.*;\nimport java.math.*;\nimport java.text.*;\nimport java.util.*;\nimport java.util.regex.*;\n\npublic class Main{\n\tstatic int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic int findGCD(int a,int b,int c) \n { \n int result = a; \n result = gcd(b,result);\n result = gcd(c,result);\n return result; \n } \n\t\n public static void main(String[] args) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tint k = sc.nextInt();\n \tint sum = 0;\n \tfor(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}\n \tSystem.out.println(sum);\n }\n}", "import java.io.*;", "io.*", "java", "import java.math.*;", "math.*", "java", "import java.text.*;", "text.*", "java", "import java.util.*;", "util.*", "java", "import java.util.regex.*;", "regex.*", "java.util", "public class Main{\n\tstatic int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic int findGCD(int a,int b,int c) \n { \n int result = a; \n result = gcd(b,result);\n result = gcd(c,result);\n return result; \n } \n\t\n public static void main(String[] args) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tint k = sc.nextInt();\n \tint sum = 0;\n \tfor(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}\n \tSystem.out.println(sum);\n }\n}", "Main", "static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "gcd", "{ \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "if (a == 0) \n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "int a", "a", "int b", "b", "static int findGCD(int a,int b,int c) \n { \n int result = a; \n result = gcd(b,result);\n result = gcd(c,result);\n return result; \n }", "findGCD", "{ \n int result = a; \n result = gcd(b,result);\n result = gcd(c,result);\n return result; \n }", "int result = a;", "result", "a", "result = gcd(b,result)", "result", "gcd(b,result)", "gcd", "b", "result", "result = gcd(c,result)", "result", "gcd(c,result)", "gcd", "c", "result", "return result;", "result", "int a", "a", "int b", "b", "int c", "c", "public static void main(String[] args) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tint k = sc.nextInt();\n \tint sum = 0;\n \tfor(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}\n \tSystem.out.println(sum);\n }", "main", "{\n \tScanner sc = new Scanner(System.in);\n \tint k = sc.nextInt();\n \tint sum = 0;\n \tfor(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}\n \tSystem.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}", "{\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}", "for(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}", "{\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}", "for(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}", "int a=1;", "int a=1;", "a", "1", "a<=k", "a", "k", "a++", "a++", "a", "{\n \t\tsum+=findGCD(i,j,a);\n \t}", "{\n \t\tsum+=findGCD(i,j,a);\n \t}", "sum+=findGCD(i,j,a)", "sum", "findGCD(i,j,a)", "findGCD", "i", "j", "a", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main{\n\tstatic int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic int findGCD(int a,int b,int c) \n { \n int result = a; \n result = gcd(b,result);\n result = gcd(c,result);\n return result; \n } \n\t\n public static void main(String[] args) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tint k = sc.nextInt();\n \tint sum = 0;\n \tfor(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}\n \tSystem.out.println(sum);\n }\n}", "public class Main{\n\tstatic int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n\t\n\tstatic int findGCD(int a,int b,int c) \n { \n int result = a; \n result = gcd(b,result);\n result = gcd(c,result);\n return result; \n } \n\t\n public static void main(String[] args) throws IOException {\n \tScanner sc = new Scanner(System.in);\n \tint k = sc.nextInt();\n \tint sum = 0;\n \tfor(int i=1;i<=k;i++) {\n \t\tfor(int j=1;j<=k;j++) {\n \t\t\tfor(int a=1;a<=k;a++) {\n \t\tsum+=findGCD(i,j,a);\n \t}\n \t}\n \t}\n \tSystem.out.println(sum);\n }\n}", "Main" ]
import java.io.*; import java.math.*; import java.text.*; import java.util.*; import java.util.regex.*; public class Main{ static int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } static int findGCD(int a,int b,int c) { int result = a; result = gcd(b,result); result = gcd(c,result); return result; } public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int sum = 0; for(int i=1;i<=k;i++) { for(int j=1;j<=k;j++) { for(int a=1;a<=k;a++) { sum+=findGCD(i,j,a); } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 0, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 30, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 104, 5 ], [ 104, 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 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 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 ], [ 64, 65 ], [ 65, 66 ], [ 64, 67 ], [ 64, 68 ], [ 68, 69 ], [ 69, 70 ], [ 68, 71 ], [ 68, 72 ], [ 8, 73 ], [ 73, 74 ], [ 74, 75 ], [ 75, 76 ], [ 75, 77 ], [ 73, 78 ], [ 6, 79 ], [ 79, 80 ], [ 104, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 84, 88 ], [ 88, 89 ], [ 89, 90 ], [ 84, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 96, 97 ], [ 96, 98 ], [ 81, 99 ], [ 99, 100 ], [ 81, 101 ], [ 101, 102 ], [ 0, 103 ], [ 103, 104 ], [ 103, 105 ] ]
[ "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 A = sc.nextInt();\n\t\tlong ans = 0;\n\t\tMain main = new Main();\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tpublic int GCD(int num1, int num2) {\n\t\tif (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\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 sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tlong ans = 0;\n\t\tMain main = new Main();\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tpublic int GCD(int num1, int num2) {\n\t\tif (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\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\tint A = sc.nextInt();\n\t\tlong ans = 0;\n\t\tMain main = new Main();\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tlong ans = 0;\n\t\tMain main = new Main();\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int A = sc.nextInt();", "A", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "Main main = new Main();", "main", "new Main()", "for (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= A", "i", "A", "i++", "i++", "i", "{\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= A", "j", "A", "j++", "j++", "j", "{\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}", "for (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= A", "k", "A", "k++", "k++", "k", "{\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}", "{\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}", "ans += main.GCD(i, main.GCD(j, k))", "ans", "main.GCD(i, main.GCD(j, k))", "main.GCD", "main", "i", "main.GCD(j, k)", "main.GCD", "main", "j", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public int GCD(int num1, int num2) {\n\t\tif (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\n\t\t}\n\t}", "GCD", "{\n\t\tif (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\n\t\t}\n\t}", "if (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\n\t\t}", "num2 == 0", "num2", "0", "{\n\t\t\treturn num1;\n\t\t}", "return num1;", "num1", "{\n\t\t\treturn GCD(num2, num1 % num2);\n\t\t}", "return GCD(num2, num1 % num2);", "GCD(num2, num1 % num2)", "GCD", "num2", "num1 % num2", "num1", "num2", "int num1", "num1", "int num2", "num2", "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint A = sc.nextInt();\n\t\tlong ans = 0;\n\t\tMain main = new Main();\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tpublic int GCD(int num1, int num2) {\n\t\tif (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\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\tint A = sc.nextInt();\n\t\tlong ans = 0;\n\t\tMain main = new Main();\n\n\t\tfor (int i = 1; i <= A; i++) {\n\t\t\tfor (int j = 1; j <= A; j++) {\n\t\t\t\tfor (int k = 1; k <= A; k++) {\n\t\t\t\t\tans += main.GCD(i, main.GCD(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\t}\n\n\tpublic int GCD(int num1, int num2) {\n\t\tif (num2 == 0) {\n\t\t\treturn num1;\n\t\t} else {\n\t\t\treturn GCD(num2, num1 % num2);\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); int A = sc.nextInt(); long ans = 0; Main main = new Main(); for (int i = 1; i <= A; i++) { for (int j = 1; j <= A; j++) { for (int k = 1; k <= A; k++) { ans += main.GCD(i, main.GCD(j, k)); } } } System.out.println(ans); } public int GCD(int num1, int num2) { if (num2 == 0) { return num1; } else { return GCD(num2, num1 % num2); } } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 29, 13, 14, 2, 13, 17, 30, 29, 4, 13, 13, 13, 17, 30, 29, 4, 13, 13, 2, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 2, 13, 4, 13, 13, 13, 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 ], [ 120, 8 ], [ 120, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 13, 17 ], [ 17, 18 ], [ 17, 19 ], [ 12, 20 ], [ 20, 21 ], [ 21, 22 ], [ 12, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 23, 27 ], [ 27, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 29, 32 ], [ 29, 33 ], [ 23, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 36, 39 ], [ 39, 40 ], [ 39, 41 ], [ 36, 42 ], [ 9, 43 ], [ 43, 44 ], [ 9, 45 ], [ 45, 46 ], [ 9, 47 ], [ 47, 48 ], [ 120, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 51, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 58, 59 ], [ 51, 60 ], [ 60, 61 ], [ 60, 62 ], [ 51, 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 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 106, 109 ], [ 106, 110 ], [ 51, 111 ], [ 111, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 111, 116 ], [ 49, 117 ], [ 117, 118 ], [ 0, 119 ], [ 119, 120 ], [ 119, 121 ] ]
[ "import java.util.*; \nimport java.lang.*; \n\npublic class Main{\n\n\tstatic int gcd(int x, int y, int z){\n\t\tif(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}\n\t}\n\n\t\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\t\t\n\t\tfor(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t}\n}", "import java.util.*;", "util.*", "java", "import java.lang.*;", "lang.*", "java", "public class Main{\n\n\tstatic int gcd(int x, int y, int z){\n\t\tif(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}\n\t}\n\n\t\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\t\t\n\t\tfor(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t}\n}", "Main", "static int gcd(int x, int y, int z){\n\t\tif(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}\n\t}", "gcd", "{\n\t\tif(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}\n\t}", "if(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}", "y == 0 && z == 0", "y == 0", "y", "0", "z == 0", "z", "0", "{\n\t\t\treturn x;\n\t\t}", "return x;", "x", "if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}", "y == 0", "y", "0", "{\n\t\t\treturn gcd(x,z,0);\n\t\t}", "return gcd(x,z,0);", "gcd(x,z,0)", "gcd", "x", "z", "0", "{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}", "return gcd(y, x%y,z);", "gcd(y, x%y,z)", "gcd", "y", "x%y", "x", "y", "z", "int x", "x", "int y", "y", "int z", "z", "public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\t\t\n\t\tfor(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t}", "main", "{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\t\t\n\t\tfor(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int K = scan.nextInt();", "K", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "for(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int a=1;", "int a=1;", "a", "1", "a<=K", "a", "K", "a++", "a++", "a", "{\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}", "int b=1;", "int b=1;", "b", "1", "b<=K", "b", "K", "b++", "b++", "b", "{\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}", "for(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}", "int c=1;", "int c=1;", "c", "1", "c<=K", "c", "K", "c++", "c++", "c", "{\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}", "{\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}", "sum = sum + gcd(a,b,c)", "sum", "sum + gcd(a,b,c)", "sum", "gcd(a,b,c)", "gcd", "a", "b", "c", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main{\n\n\tstatic int gcd(int x, int y, int z){\n\t\tif(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}\n\t}\n\n\t\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\t\t\n\t\tfor(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t}\n}", "public class Main{\n\n\tstatic int gcd(int x, int y, int z){\n\t\tif(y == 0 && z == 0){\n\t\t\treturn x;\n\t\t}\n\t\telse if(y == 0){\n\t\t\treturn gcd(x,z,0);\n\t\t}\n\t\telse{\n\t\t\treturn gcd(y, x%y,z);\n\t\t}\n\t}\n\n\t\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint sum = 0;\n\t\t\n\t\tfor(int a=1; a<=K; a++){\n\t\t\tfor(int b=1; b<=K; b++){\n\t\t\t\tfor(int c=1; c<=K; c++){\n\t\t\t\t\tsum = sum + gcd(a,b,c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(sum);\n\t}\n}", "Main" ]
import java.util.*; import java.lang.*; public class Main{ static int gcd(int x, int y, int z){ if(y == 0 && z == 0){ return x; } else if(y == 0){ return gcd(x,z,0); } else{ return gcd(y, x%y,z); } } public static void main(String[] args){ Scanner scan = new Scanner(System.in); int K = scan.nextInt(); int sum = 0; for(int a=1; a<=K; a++){ for(int b=1; b<=K; b++){ for(int c=1; c<=K; c++){ sum = sum + gcd(a,b,c); } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 4, 13, 4, 13, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 41, 13, 2, 13, 13, 29, 4, 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 ], [ 125, 11 ], [ 125, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 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 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 70, 74 ], [ 14, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 12, 81 ], [ 81, 82 ], [ 125, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 89, 92 ], [ 87, 93 ], [ 83, 94 ], [ 94, 95 ], [ 83, 96 ], [ 96, 97 ], [ 83, 98 ], [ 98, 99 ], [ 125, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 102, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 112, 114 ], [ 102, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 116, 119 ], [ 100, 120 ], [ 120, 121 ], [ 100, 122 ], [ 122, 123 ], [ 0, 124 ], [ 124, 125 ], [ 124, 126 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n\n int sum = 0;\n for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j, int s) {\n \treturn gcdTwo(gcdTwo(i, j), s);\n }\n \n private static int gcdTwo(int i, int j) {\n \tif (j == 0) {\n return i;\n }\n int r = i % j;\n return gcdTwo(j, r);\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 public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n\n int sum = 0;\n for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j, int s) {\n \treturn gcdTwo(gcdTwo(i, j), s);\n }\n \n private static int gcdTwo(int i, int j) {\n \tif (j == 0) {\n return i;\n }\n int r = i % j;\n return gcdTwo(j, r);\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n\n int sum = 0;\n for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }\n \n System.out.print(sum);\n }", "main", "{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n\n int sum = 0;\n for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }\n \n System.out.print(sum);\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int k = Integer.parseInt(br.readLine());", "k", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "int sum = 0;", "sum", "0", "for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }", "{\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }", "for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "{\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }", "{\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }", "for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }", "int s = 1;", "int s = 1;", "s", "1", "s <= k", "s", "k", "s++", "s++", "s", "{\n sum += gcd(i, j, s);\n }", "{\n sum += gcd(i, j, s);\n }", "sum += gcd(i, j, s)", "sum", "gcd(i, j, s)", "gcd", "i", "j", "s", "System.out.print(sum)", "System.out.print", "System.out", "System", "System.out", "sum", "String[] args", "args", "private static int gcd(int i, int j, int s) {\n \treturn gcdTwo(gcdTwo(i, j), s);\n }", "gcd", "{\n \treturn gcdTwo(gcdTwo(i, j), s);\n }", "return gcdTwo(gcdTwo(i, j), s);", "gcdTwo(gcdTwo(i, j), s)", "gcdTwo", "gcdTwo(i, j)", "gcdTwo", "i", "j", "s", "int i", "i", "int j", "j", "int s", "s", "private static int gcdTwo(int i, int j) {\n \tif (j == 0) {\n return i;\n }\n int r = i % j;\n return gcdTwo(j, r);\n }", "gcdTwo", "{\n \tif (j == 0) {\n return i;\n }\n int r = i % j;\n return gcdTwo(j, r);\n }", "if (j == 0) {\n return i;\n }", "j == 0", "j", "0", "{\n return i;\n }", "return i;", "i", "int r = i % j;", "r", "i % j", "i", "j", "return gcdTwo(j, r);", "gcdTwo(j, r)", "gcdTwo", "j", "r", "int i", "i", "int j", "j", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n\n int sum = 0;\n for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j, int s) {\n \treturn gcdTwo(gcdTwo(i, j), s);\n }\n \n private static int gcdTwo(int i, int j) {\n \tif (j == 0) {\n return i;\n }\n int r = i % j;\n return gcdTwo(j, r);\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n\n int sum = 0;\n for (int i = 1; i <= k; i++) {\n for (int j = 1; j <= k; j++) {\n for (int s = 1; s <= k; s++) {\n sum += gcd(i, j, s);\n }\n }\n }\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j, int s) {\n \treturn gcdTwo(gcdTwo(i, j), s);\n }\n \n private static int gcdTwo(int i, int j) {\n \tif (j == 0) {\n return i;\n }\n int r = i % j;\n return gcdTwo(j, r);\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)); int k = Integer.parseInt(br.readLine()); int sum = 0; for (int i = 1; i <= k; i++) { for (int j = 1; j <= k; j++) { for (int s = 1; s <= k; s++) { sum += gcd(i, j, s); } } } System.out.print(sum); } private static int gcd(int i, int j, int s) { return gcdTwo(gcdTwo(i, j), s); } private static int gcdTwo(int i, int j) { if (j == 0) { return i; } int r = i % j; return gcdTwo(j, r); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 39, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 4, 18, 18, 13, 13, 18, 13, 2, 13, 17, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 233, 5 ], [ 233, 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 ], [ 19, 21 ], [ 19, 22 ], [ 19, 23 ], [ 19, 24 ], [ 19, 25 ], [ 19, 26 ], [ 19, 27 ], [ 19, 28 ], [ 19, 29 ], [ 19, 30 ], [ 19, 31 ], [ 19, 32 ], [ 19, 33 ], [ 19, 34 ], [ 19, 35 ], [ 19, 36 ], [ 19, 37 ], [ 19, 38 ], [ 19, 39 ], [ 19, 40 ], [ 19, 41 ], [ 19, 42 ], [ 19, 43 ], [ 19, 44 ], [ 19, 45 ], [ 19, 46 ], [ 19, 47 ], [ 19, 48 ], [ 19, 49 ], [ 19, 50 ], [ 19, 51 ], [ 19, 52 ], [ 19, 53 ], [ 19, 54 ], [ 19, 55 ], [ 19, 56 ], [ 19, 57 ], [ 19, 58 ], [ 19, 59 ], [ 19, 60 ], [ 19, 61 ], [ 19, 62 ], [ 19, 63 ], [ 19, 64 ], [ 19, 65 ], [ 19, 66 ], [ 19, 67 ], [ 19, 68 ], [ 19, 69 ], [ 19, 70 ], [ 19, 71 ], [ 19, 72 ], [ 19, 73 ], [ 19, 74 ], [ 19, 75 ], [ 19, 76 ], [ 19, 77 ], [ 19, 78 ], [ 19, 79 ], [ 19, 80 ], [ 19, 81 ], [ 19, 82 ], [ 19, 83 ], [ 19, 84 ], [ 19, 85 ], [ 19, 86 ], [ 19, 87 ], [ 19, 88 ], [ 19, 89 ], [ 19, 90 ], [ 19, 91 ], [ 19, 92 ], [ 19, 93 ], [ 19, 94 ], [ 19, 95 ], [ 19, 96 ], [ 19, 97 ], [ 19, 98 ], [ 19, 99 ], [ 19, 100 ], [ 19, 101 ], [ 19, 102 ], [ 19, 103 ], [ 19, 104 ], [ 19, 105 ], [ 19, 106 ], [ 19, 107 ], [ 19, 108 ], [ 19, 109 ], [ 19, 110 ], [ 19, 111 ], [ 19, 112 ], [ 19, 113 ], [ 19, 114 ], [ 19, 115 ], [ 19, 116 ], [ 19, 117 ], [ 19, 118 ], [ 19, 119 ], [ 19, 120 ], [ 19, 121 ], [ 19, 122 ], [ 19, 123 ], [ 19, 124 ], [ 19, 125 ], [ 19, 126 ], [ 19, 127 ], [ 19, 128 ], [ 19, 129 ], [ 19, 130 ], [ 19, 131 ], [ 19, 132 ], [ 19, 133 ], [ 19, 134 ], [ 19, 135 ], [ 19, 136 ], [ 19, 137 ], [ 19, 138 ], [ 19, 139 ], [ 19, 140 ], [ 19, 141 ], [ 19, 142 ], [ 19, 143 ], [ 19, 144 ], [ 19, 145 ], [ 19, 146 ], [ 19, 147 ], [ 19, 148 ], [ 19, 149 ], [ 19, 150 ], [ 19, 151 ], [ 19, 152 ], [ 19, 153 ], [ 19, 154 ], [ 19, 155 ], [ 19, 156 ], [ 19, 157 ], [ 19, 158 ], [ 19, 159 ], [ 19, 160 ], [ 19, 161 ], [ 19, 162 ], [ 19, 163 ], [ 19, 164 ], [ 19, 165 ], [ 19, 166 ], [ 19, 167 ], [ 19, 168 ], [ 19, 169 ], [ 19, 170 ], [ 19, 171 ], [ 19, 172 ], [ 19, 173 ], [ 19, 174 ], [ 19, 175 ], [ 19, 176 ], [ 19, 177 ], [ 19, 178 ], [ 19, 179 ], [ 19, 180 ], [ 19, 181 ], [ 19, 182 ], [ 19, 183 ], [ 19, 184 ], [ 19, 185 ], [ 19, 186 ], [ 19, 187 ], [ 19, 188 ], [ 19, 189 ], [ 19, 190 ], [ 19, 191 ], [ 19, 192 ], [ 19, 193 ], [ 19, 194 ], [ 19, 195 ], [ 19, 196 ], [ 19, 197 ], [ 19, 198 ], [ 19, 199 ], [ 19, 200 ], [ 19, 201 ], [ 19, 202 ], [ 19, 203 ], [ 19, 204 ], [ 19, 205 ], [ 19, 206 ], [ 19, 207 ], [ 19, 208 ], [ 19, 209 ], [ 19, 210 ], [ 19, 211 ], [ 19, 212 ], [ 19, 213 ], [ 19, 214 ], [ 19, 215 ], [ 19, 216 ], [ 19, 217 ], [ 19, 218 ], [ 19, 219 ], [ 8, 220 ], [ 220, 221 ], [ 221, 222 ], [ 222, 223 ], [ 222, 224 ], [ 220, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 227, 229 ], [ 6, 230 ], [ 230, 231 ], [ 0, 232 ], [ 232, 233 ], [ 232, 234 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};\n System.out.println(a[k-1]);\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 int k = scanner.nextInt();\n long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};\n System.out.println(a[k-1]);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};\n System.out.println(a[k-1]);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};\n System.out.println(a[k-1]);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int k = scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};", "a", "{1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692}", "1", "9", "30", "76", "141", "267", "400", "624", "885", "1249", "1590", "2208", "2689", "3411", "4248", "5248", "6081", "7485", "8530", "10248", "11889", "13687", "15228", "17988", "20053", "22569", "25242", "28588", "31053", "35463", "38284", "42540", "46581", "50893", "55362", "61824", "65857", "71247", "76884", "84388", "89349", "97881", "103342", "111528", "120141", "128047", "134580", "146316", "154177", "164817", "174438", "185836", "194157", "207927", "218812", "233268", "245277", "257857", "268182", "288216", "299257", "313635", "330204", "347836", "362973", "383709", "397042", "416448", "434025", "456967", "471948", "499740", "515581", "536073", "559758", "583960", "604833", "633651", "652216", "683712", "709065", "734233", "754734", "793188", "818917", "846603", "874512", "909496", "933081", "977145", "1006126", "1041504", "1073385", "1106467", "1138536", "1187112", "1215145", "1255101", "1295142", "1342852", "1373253", "1422195", "1453816", "1502376", "1553361", "1595437", "1629570", "1691292", "1726717", "1782111", "1827492", "1887772", "1925853", "1986837", "2033674", "2089776", "2145333", "2197483", "2246640", "2332104", "2379085", "2434833", "2490534", "2554600", "2609625", "2693919", "2742052", "2813988", "2875245", "2952085", "3003306", "3096024", "3157249", "3224511", "3306240", "3388576", "3444609", "3533637", "3591322", "3693924", "3767085", "3842623", "3912324", "4027884", "4102093", "4181949", "4270422", "4361548", "4427853", "4548003", "4616104", "4718640", "4812789", "4918561", "5003286", "5131848", "5205481", "5299011", "5392008", "5521384", "5610705", "5739009", "5818390", "5930196", "6052893", "6156139", "6239472", "6402720", "6493681", "6623853", "6741078", "6864016", "6953457", "7094451", "7215016", "7359936", "7475145", "7593865", "7689630", "7886244", "7984165", "8130747", "8253888", "8403448", "8523897", "8684853", "8802826", "8949612", "9105537", "9267595", "9376656", "9574704", "9686065", "9827097", "9997134", "10174780", "10290813", "10493367", "10611772", "10813692", "System.out.println(a[k-1])", "System.out.println", "System.out", "System", "System.out", "a[k-1]", "a", "k-1", "k", "1", "String[] args", "args", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};\n System.out.println(a[k-1]);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692};\n System.out.println(a[k-1]);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int k = scanner.nextInt(); long[] a = {1, 9, 30, 76, 141, 267, 400, 624, 885, 1249, 1590, 2208, 2689, 3411, 4248, 5248, 6081, 7485, 8530, 10248, 11889, 13687, 15228, 17988, 20053, 22569, 25242, 28588, 31053, 35463, 38284, 42540, 46581, 50893, 55362, 61824, 65857, 71247, 76884, 84388, 89349, 97881, 103342, 111528, 120141, 128047, 134580, 146316, 154177, 164817, 174438, 185836, 194157, 207927, 218812, 233268, 245277, 257857, 268182, 288216, 299257, 313635, 330204, 347836, 362973, 383709, 397042, 416448, 434025, 456967, 471948, 499740, 515581, 536073, 559758, 583960, 604833, 633651, 652216, 683712, 709065, 734233, 754734, 793188, 818917, 846603, 874512, 909496, 933081, 977145, 1006126, 1041504, 1073385, 1106467, 1138536, 1187112, 1215145, 1255101, 1295142, 1342852, 1373253, 1422195, 1453816, 1502376, 1553361, 1595437, 1629570, 1691292, 1726717, 1782111, 1827492, 1887772, 1925853, 1986837, 2033674, 2089776, 2145333, 2197483, 2246640, 2332104, 2379085, 2434833, 2490534, 2554600, 2609625, 2693919, 2742052, 2813988, 2875245, 2952085, 3003306, 3096024, 3157249, 3224511, 3306240, 3388576, 3444609, 3533637, 3591322, 3693924, 3767085, 3842623, 3912324, 4027884, 4102093, 4181949, 4270422, 4361548, 4427853, 4548003, 4616104, 4718640, 4812789, 4918561, 5003286, 5131848, 5205481, 5299011, 5392008, 5521384, 5610705, 5739009, 5818390, 5930196, 6052893, 6156139, 6239472, 6402720, 6493681, 6623853, 6741078, 6864016, 6953457, 7094451, 7215016, 7359936, 7475145, 7593865, 7689630, 7886244, 7984165, 8130747, 8253888, 8403448, 8523897, 8684853, 8802826, 8949612, 9105537, 9267595, 9376656, 9574704, 9686065, 9827097, 9997134, 10174780, 10290813, 10493367, 10611772, 10813692}; System.out.println(a[k-1]); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 29, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 4, 13, 13, 2, 13, 13, 13, 23, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 27, 29 ], [ 20, 30 ], [ 30, 31 ], [ 31, 32 ], [ 20, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 67, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 8, 80 ], [ 6, 81 ], [ 81, 82 ], [ 103, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 94, 95 ], [ 94, 96 ], [ 87, 97 ], [ 83, 98 ], [ 98, 99 ], [ 83, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint K = sc.nextInt();\n long sum = (long) 0;\n \tfor(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }\n \n \tSystem.out.println(sum);\n return;\n\t}\n static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}\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 \tint K = sc.nextInt();\n long sum = (long) 0;\n \tfor(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }\n \n \tSystem.out.println(sum);\n return;\n\t}\n static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint K = sc.nextInt();\n long sum = (long) 0;\n \tfor(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }\n \n \tSystem.out.println(sum);\n return;\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n \tint K = sc.nextInt();\n long sum = (long) 0;\n \tfor(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }\n \n \tSystem.out.println(sum);\n return;\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "long sum = (long) 0;", "sum", "(long) 0", "for(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<K+1", "i", "K+1", "K", "1", "i++", "i++", "i", "{\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }", "{\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }", "for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<K+1", "j", "K+1", "K", "1", "j++", "j++", "j", "{\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }", "{\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }", "for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }", "int l=1;", "int l=1;", "l", "1", "l<K+1", "l", "K+1", "K", "1", "l++", "l++", "l", "{\n sum += gcd(gcd(i,j),l);\n }", "{\n sum += gcd(gcd(i,j),l);\n }", "sum += gcd(gcd(i,j),l)", "sum", "gcd(gcd(i,j),l)", "gcd", "gcd(i,j)", "gcd", "i", "j", "l", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "return;", "String[] args", "args", "static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}", "gcd", "{return b>0?gcd(b,a%b):a;}", "return b>0?gcd(b,a%b):a;", "b>0?gcd(b,a%b):a", "b>0", "b", "0", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "a", "int a", "a", "int b", "b", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint K = sc.nextInt();\n long sum = (long) 0;\n \tfor(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }\n \n \tSystem.out.println(sum);\n return;\n\t}\n static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint K = sc.nextInt();\n long sum = (long) 0;\n \tfor(int i=1; i<K+1; i++){\n for(int j=1; j<K+1; j++){\n for(int l=1; l<K+1; l++){\n sum += gcd(gcd(i,j),l);\n }\n }\n }\n \n \tSystem.out.println(sum);\n return;\n\t}\n static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int K = sc.nextInt(); long sum = (long) 0; for(int i=1; i<K+1; i++){ for(int j=1; j<K+1; j++){ for(int l=1; l<K+1; l++){ sum += gcd(gcd(i,j),l); } } } System.out.println(sum); return; } static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;} }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 41, 13, 12, 13, 30, 4, 13, 41, 13, 4, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 13, 13, 4, 18, 13, 4, 18, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 18, 13, 12, 13, 30, 29, 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 ], [ 217, 8 ], [ 217, 9 ], [ 9, 10 ], [ 9, 11 ], [ 217, 12 ], [ 12, 13 ], [ 12, 14 ], [ 217, 15 ], [ 15, 16 ], [ 217, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 19, 22 ], [ 22, 23 ], [ 22, 24 ], [ 24, 25 ], [ 19, 26 ], [ 26, 27 ], [ 26, 28 ], [ 19, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 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 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 67, 73 ], [ 19, 74 ], [ 74, 75 ], [ 75, 76 ], [ 74, 77 ], [ 19, 78 ], [ 78, 79 ], [ 79, 80 ], [ 19, 81 ], [ 81, 82 ], [ 82, 83 ], [ 217, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 86, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 95, 98 ], [ 98, 99 ], [ 98, 100 ], [ 84, 101 ], [ 101, 102 ], [ 84, 103 ], [ 103, 104 ], [ 217, 105 ], [ 105, 106 ], [ 105, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 217, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 115, 118 ], [ 118, 119 ], [ 119, 120 ], [ 217, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 130, 132 ], [ 128, 133 ], [ 133, 134 ], [ 133, 135 ], [ 128, 136 ], [ 136, 137 ], [ 137, 138 ], [ 128, 139 ], [ 140, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 141, 145 ], [ 145, 146 ], [ 123, 147 ], [ 147, 148 ], [ 121, 149 ], [ 149, 150 ], [ 217, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 155, 156 ], [ 156, 157 ], [ 155, 158 ], [ 158, 159 ], [ 159, 160 ], [ 217, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 164, 165 ], [ 164, 166 ], [ 163, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 170, 172 ], [ 168, 173 ], [ 173, 174 ], [ 173, 175 ], [ 168, 176 ], [ 176, 177 ], [ 177, 178 ], [ 168, 179 ], [ 180, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 181, 185 ], [ 185, 186 ], [ 163, 187 ], [ 187, 188 ], [ 161, 189 ], [ 189, 190 ], [ 217, 191 ], [ 191, 192 ], [ 191, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 196, 197 ], [ 195, 198 ], [ 198, 199 ], [ 199, 200 ], [ 217, 201 ], [ 201, 202 ], [ 201, 203 ], [ 203, 204 ], [ 204, 205 ], [ 205, 206 ], [ 206, 207 ], [ 217, 208 ], [ 208, 209 ], [ 208, 210 ], [ 210, 211 ], [ 211, 212 ], [ 212, 213 ], [ 208, 214 ], [ 214, 215 ], [ 0, 216 ], [ 216, 217 ], [ 216, 218 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main\n{\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer tok;\n\n public void go() throws IOException\n {\n ntok();\n int n = ipar();\n int sum = 0;\n for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);\n out.println(sum);\n\n out.flush();\n in.close();\n }\n\n public int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a%b);\n }\n\n public void ntok() throws IOException\n {\n tok = new StringTokenizer(in.readLine());\n }\n\n public int ipar()\n {\n return Integer.parseInt(tok.nextToken());\n }\n\n public int[] iapar(int n)\n {\n int[] arr = new int[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }\n return arr;\n }\n\n public long lpar()\n {\n return Long.parseLong(tok.nextToken());\n }\n\n public long[] lapar(int n)\n {\n long[] arr = new long[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }\n return arr;\n }\n\n public double dpar()\n {\n return Double.parseDouble(tok.nextToken());\n }\n\n public String spar()\n {\n return tok.nextToken();\n }\n\n public static void main(String[] args) throws IOException\n {\n new Main().go();\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main\n{\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer tok;\n\n public void go() throws IOException\n {\n ntok();\n int n = ipar();\n int sum = 0;\n for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);\n out.println(sum);\n\n out.flush();\n in.close();\n }\n\n public int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a%b);\n }\n\n public void ntok() throws IOException\n {\n tok = new StringTokenizer(in.readLine());\n }\n\n public int ipar()\n {\n return Integer.parseInt(tok.nextToken());\n }\n\n public int[] iapar(int n)\n {\n int[] arr = new int[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }\n return arr;\n }\n\n public long lpar()\n {\n return Long.parseLong(tok.nextToken());\n }\n\n public long[] lapar(int n)\n {\n long[] arr = new long[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }\n return arr;\n }\n\n public double dpar()\n {\n return Double.parseDouble(tok.nextToken());\n }\n\n public String spar()\n {\n return tok.nextToken();\n }\n\n public static void main(String[] args) throws IOException\n {\n new Main().go();\n }\n}", "Main", "PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));", "out", "new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "StringTokenizer tok;", "tok", "public void go() throws IOException\n {\n ntok();\n int n = ipar();\n int sum = 0;\n for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);\n out.println(sum);\n\n out.flush();\n in.close();\n }", "go", "{\n ntok();\n int n = ipar();\n int sum = 0;\n for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);\n out.println(sum);\n\n out.flush();\n in.close();\n }", "ntok()", "ntok", "int n = ipar();", "n", "ipar()", "ipar", "int sum = 0;", "sum", "0", "for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);", "for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);", "int e = 1;", "int e = 1;", "e", "1", "e <= n", "e", "n", "e++", "e++", "e", "for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);", "for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);", "int w = 1;", "int w = 1;", "w", "1", "w <= n", "w", "n", "w++", "w++", "w", "sum += gcd(gcd(i, e), w);", "sum += gcd(gcd(i, e), w)", "sum", "gcd(gcd(i, e), w)", "gcd", "gcd(i, e)", "gcd", "i", "e", "w", "out.println(sum)", "out.println", "out", "sum", "out.flush()", "out.flush", "out", "in.close()", "in.close", "in", "public int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a%b);\n }", "gcd", "{\n if (b == 0) {\n return a;\n }\n return gcd(b, a%b);\n }", "if (b == 0) {\n return a;\n }", "b == 0", "b", "0", "{\n return a;\n }", "return a;", "a", "return gcd(b, a%b);", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public void ntok() throws IOException\n {\n tok = new StringTokenizer(in.readLine());\n }", "ntok", "{\n tok = new StringTokenizer(in.readLine());\n }", "tok = new StringTokenizer(in.readLine())", "tok", "new StringTokenizer(in.readLine())", "public int ipar()\n {\n return Integer.parseInt(tok.nextToken());\n }", "ipar", "{\n return Integer.parseInt(tok.nextToken());\n }", "return Integer.parseInt(tok.nextToken());", "Integer.parseInt(tok.nextToken())", "Integer.parseInt", "Integer", "tok.nextToken()", "tok.nextToken", "tok", "public int[] iapar(int n)\n {\n int[] arr = new int[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }\n return arr;\n }", "iapar", "{\n int[] arr = new int[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }\n return arr;\n }", "int[] arr = new int[n];", "arr", "new int[n]", "n", "for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n arr[i] = ipar();\n }", "{\n arr[i] = ipar();\n }", "arr[i] = ipar()", "arr[i]", "arr", "i", "ipar()", "ipar", "return arr;", "arr", "int n", "n", "public long lpar()\n {\n return Long.parseLong(tok.nextToken());\n }", "lpar", "{\n return Long.parseLong(tok.nextToken());\n }", "return Long.parseLong(tok.nextToken());", "Long.parseLong(tok.nextToken())", "Long.parseLong", "Long", "tok.nextToken()", "tok.nextToken", "tok", "public long[] lapar(int n)\n {\n long[] arr = new long[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }\n return arr;\n }", "lapar", "{\n long[] arr = new long[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }\n return arr;\n }", "long[] arr = new long[n];", "arr", "new long[n]", "n", "for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n arr[i] = lpar();\n }", "{\n arr[i] = lpar();\n }", "arr[i] = lpar()", "arr[i]", "arr", "i", "lpar()", "lpar", "return arr;", "arr", "int n", "n", "public double dpar()\n {\n return Double.parseDouble(tok.nextToken());\n }", "dpar", "{\n return Double.parseDouble(tok.nextToken());\n }", "return Double.parseDouble(tok.nextToken());", "Double.parseDouble(tok.nextToken())", "Double.parseDouble", "Double", "tok.nextToken()", "tok.nextToken", "tok", "public String spar()\n {\n return tok.nextToken();\n }", "spar", "{\n return tok.nextToken();\n }", "return tok.nextToken();", "tok.nextToken()", "tok.nextToken", "tok", "public static void main(String[] args) throws IOException\n {\n new Main().go();\n }", "main", "{\n new Main().go();\n }", "new Main().go()", "new Main().go", "new Main()", "String[] args", "args", "public class Main\n{\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer tok;\n\n public void go() throws IOException\n {\n ntok();\n int n = ipar();\n int sum = 0;\n for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);\n out.println(sum);\n\n out.flush();\n in.close();\n }\n\n public int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a%b);\n }\n\n public void ntok() throws IOException\n {\n tok = new StringTokenizer(in.readLine());\n }\n\n public int ipar()\n {\n return Integer.parseInt(tok.nextToken());\n }\n\n public int[] iapar(int n)\n {\n int[] arr = new int[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }\n return arr;\n }\n\n public long lpar()\n {\n return Long.parseLong(tok.nextToken());\n }\n\n public long[] lapar(int n)\n {\n long[] arr = new long[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }\n return arr;\n }\n\n public double dpar()\n {\n return Double.parseDouble(tok.nextToken());\n }\n\n public String spar()\n {\n return tok.nextToken();\n }\n\n public static void main(String[] args) throws IOException\n {\n new Main().go();\n }\n}", "public class Main\n{\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer tok;\n\n public void go() throws IOException\n {\n ntok();\n int n = ipar();\n int sum = 0;\n for (int i = 1; i <= n; i++)\n for (int e = 1; e <= n; e++)\n for (int w = 1; w <= n; w++)\n sum += gcd(gcd(i, e), w);\n out.println(sum);\n\n out.flush();\n in.close();\n }\n\n public int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a%b);\n }\n\n public void ntok() throws IOException\n {\n tok = new StringTokenizer(in.readLine());\n }\n\n public int ipar()\n {\n return Integer.parseInt(tok.nextToken());\n }\n\n public int[] iapar(int n)\n {\n int[] arr = new int[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = ipar();\n }\n return arr;\n }\n\n public long lpar()\n {\n return Long.parseLong(tok.nextToken());\n }\n\n public long[] lapar(int n)\n {\n long[] arr = new long[n];\n for (int i = 0; i < n; i++)\n {\n arr[i] = lpar();\n }\n return arr;\n }\n\n public double dpar()\n {\n return Double.parseDouble(tok.nextToken());\n }\n\n public String spar()\n {\n return tok.nextToken();\n }\n\n public static void main(String[] args) throws IOException\n {\n new Main().go();\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer tok; public void go() throws IOException { ntok(); int n = ipar(); int sum = 0; for (int i = 1; i <= n; i++) for (int e = 1; e <= n; e++) for (int w = 1; w <= n; w++) sum += gcd(gcd(i, e), w); out.println(sum); out.flush(); in.close(); } public int gcd(int a, int b) { if (b == 0) { return a; } return gcd(b, a%b); } public void ntok() throws IOException { tok = new StringTokenizer(in.readLine()); } public int ipar() { return Integer.parseInt(tok.nextToken()); } public int[] iapar(int n) { int[] arr = new int[n]; for (int i = 0; i < n; i++) { arr[i] = ipar(); } return arr; } public long lpar() { return Long.parseLong(tok.nextToken()); } public long[] lapar(int n) { long[] arr = new long[n]; for (int i = 0; i < n; i++) { arr[i] = lpar(); } return arr; } public double dpar() { return Double.parseDouble(tok.nextToken()); } public String spar() { return tok.nextToken(); } public static void main(String[] args) throws IOException { new Main().go(); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 4, 13, 13, 13, 14, 2, 2, 13, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 126, 8 ], [ 126, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 17, 20 ], [ 20, 21 ], [ 21, 22 ], [ 11, 23 ], [ 23, 24 ], [ 23, 25 ], [ 11, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 26, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 35, 36 ], [ 26, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 40, 42 ], [ 38, 43 ], [ 43, 44 ], [ 43, 45 ], [ 38, 46 ], [ 46, 47 ], [ 47, 48 ], [ 38, 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 ], [ 61, 62 ], [ 62, 63 ], [ 62, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 11, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 9, 77 ], [ 77, 78 ], [ 126, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 81, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 90, 96 ], [ 96, 97 ], [ 90, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 99, 102 ], [ 102, 103 ], [ 102, 104 ], [ 79, 105 ], [ 105, 106 ], [ 79, 107 ], [ 107, 108 ], [ 126, 109 ], [ 109, 110 ], [ 109, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 115, 117 ], [ 111, 118 ], [ 118, 119 ], [ 118, 120 ], [ 109, 121 ], [ 121, 122 ], [ 109, 123 ], [ 123, 124 ], [ 0, 125 ], [ 125, 126 ], [ 125, 127 ] ]
[ "import java.util.*;\nimport java.io.*;\n \npublic class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n \tint num = Integer.parseInt(s.next());\n \n \tlong result = 0;\n \t\n \tfor(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));\n \t\n \tSystem.out.println(result);\n }\n \n \tpublic static int gcd(int x, int y) {\n \tif (x < y) swap(x, y);\n \tif (x % y == 0) return y;\n \telse return gcd(y, x%y);\n }\n \t\n \tpublic static void swap(int x, int y) {\n int t = x;\n\n x = y;\n y = t;\n }\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n \tint num = Integer.parseInt(s.next());\n \n \tlong result = 0;\n \t\n \tfor(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));\n \t\n \tSystem.out.println(result);\n }\n \n \tpublic static int gcd(int x, int y) {\n \tif (x < y) swap(x, y);\n \tif (x % y == 0) return y;\n \telse return gcd(y, x%y);\n }\n \t\n \tpublic static void swap(int x, int y) {\n int t = x;\n\n x = y;\n y = t;\n }\n}", "Main", "public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n \tint num = Integer.parseInt(s.next());\n \n \tlong result = 0;\n \t\n \tfor(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));\n \t\n \tSystem.out.println(result);\n }", "main", "{\n final Scanner s = new Scanner(System.in);\n \tint num = Integer.parseInt(s.next());\n \n \tlong result = 0;\n \t\n \tfor(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));\n \t\n \tSystem.out.println(result);\n }", "final Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int num = Integer.parseInt(s.next());", "num", "Integer.parseInt(s.next())", "Integer.parseInt", "Integer", "s.next()", "s.next", "s", "long result = 0;", "result", "0", "for(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));", "int i = 1;", "int i = 1;", "i", "1", "i <= num", "i", "num", "i++", "i++", "i", "for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));", "for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));", "int j = 1;", "int j = 1;", "j", "1", "j <= num", "j", "num", "j++", "j++", "j", "for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));", "for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));", "int k = 1;", "int k = 1;", "k", "1", "k <= num", "k", "num", "k++", "k++", "k", "result += (long)(gcd(i,gcd(j,k)));", "result += (long)(gcd(i,gcd(j,k)))", "result", "(long)(gcd(i,gcd(j,k)))", "gcd", "i", "gcd(j,k)", "gcd", "j", "k", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "final String[] args", "args", "public static int gcd(int x, int y) {\n \tif (x < y) swap(x, y);\n \tif (x % y == 0) return y;\n \telse return gcd(y, x%y);\n }", "gcd", "{\n \tif (x < y) swap(x, y);\n \tif (x % y == 0) return y;\n \telse return gcd(y, x%y);\n }", "if (x < y) swap(x, y);", "x < y", "x", "y", "swap(x, y)", "swap", "x", "y", "if (x % y == 0) return y;\n \telse return gcd(y, x%y);", "x % y == 0", "x % y", "x", "y", "0", "return y;", "y", "return gcd(y, x%y);", "gcd(y, x%y)", "gcd", "y", "x%y", "x", "y", "int x", "x", "int y", "y", "public static void swap(int x, int y) {\n int t = x;\n\n x = y;\n y = t;\n }", "swap", "{\n int t = x;\n\n x = y;\n y = t;\n }", "int t = x;", "t", "x", "x = y", "x", "y", "y = t", "y", "t", "int x", "x", "int y", "y", "public class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n \tint num = Integer.parseInt(s.next());\n \n \tlong result = 0;\n \t\n \tfor(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));\n \t\n \tSystem.out.println(result);\n }\n \n \tpublic static int gcd(int x, int y) {\n \tif (x < y) swap(x, y);\n \tif (x % y == 0) return y;\n \telse return gcd(y, x%y);\n }\n \t\n \tpublic static void swap(int x, int y) {\n int t = x;\n\n x = y;\n y = t;\n }\n}", "public class Main {\n public static void main (final String[] args) {\n final Scanner s = new Scanner(System.in);\n \tint num = Integer.parseInt(s.next());\n \n \tlong result = 0;\n \t\n \tfor(int i = 1; i <= num; i++)\n for(int j = 1; j <= num; j++)\n for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k)));\n \t\n \tSystem.out.println(result);\n }\n \n \tpublic static int gcd(int x, int y) {\n \tif (x < y) swap(x, y);\n \tif (x % y == 0) return y;\n \telse return gcd(y, x%y);\n }\n \t\n \tpublic static void swap(int x, int y) {\n int t = x;\n\n x = y;\n y = t;\n }\n}", "Main" ]
import java.util.*; import java.io.*; public class Main { public static void main (final String[] args) { final Scanner s = new Scanner(System.in); int num = Integer.parseInt(s.next()); long result = 0; for(int i = 1; i <= num; i++) for(int j = 1; j <= num; j++) for(int k = 1; k <= num; k++) result += (long)(gcd(i,gcd(j,k))); System.out.println(result); } public static int gcd(int x, int y) { if (x < y) swap(x, y); if (x % y == 0) return y; else return gcd(y, x%y); } public static void swap(int x, int y) { int t = x; x = y; y = t; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 13, 2, 13, 17, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 42, 2, 2, 13, 13, 17, 30, 41, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 6, 73 ], [ 73, 74 ], [ 4, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 86, 88 ], [ 82, 89 ], [ 89, 90 ], [ 89, 91 ], [ 77, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 92, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 98, 104 ], [ 104, 105 ], [ 104, 106 ], [ 98, 107 ], [ 107, 108 ], [ 107, 109 ], [ 77, 110 ], [ 110, 111 ], [ 75, 112 ], [ 112, 113 ], [ 75, 114 ], [ 114, 115 ], [ 4, 116 ], [ 116, 117 ], [ 116, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 121, 122 ], [ 121, 123 ], [ 119, 124 ], [ 116, 125 ], [ 125, 126 ], [ 4, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 130, 135 ], [ 127, 136 ], [ 136, 137 ] ]
[ "import java.util.*;\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum=0;\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }\n pl(sum+\"\");\n }\n\n public static int gcd(int a,int b){\n if(a<b){\n int aa=a;a=b;b=aa;\n }\n while(a%b!=0){\n int c=a%b;\n a=b;b=c;\n }\n return b;\n }\n\n public static void pr(String str){\n System.out.print(str);\n }\n public static void pl(String str){\n System.out.println(str);\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum=0;\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }\n pl(sum+\"\");\n }\n\n public static int gcd(int a,int b){\n if(a<b){\n int aa=a;a=b;b=aa;\n }\n while(a%b!=0){\n int c=a%b;\n a=b;b=c;\n }\n return b;\n }\n\n public static void pr(String str){\n System.out.print(str);\n }\n public static void pl(String str){\n System.out.println(str);\n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum=0;\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }\n pl(sum+\"\");\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long sum=0;\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }\n pl(sum+\"\");\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long sum=0;", "sum", "0", "for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }", "{\n for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }\n }", "for(int j=1;j<=k;j++){\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }", "{\n for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }\n }", "for(int ij=1;ij<=k;ij++){\n sum+=gcd(gcd(i,j),ij);\n }", "int ij=1;", "int ij=1;", "ij", "1", "ij<=k", "ij", "k", "ij++", "ij++", "ij", "{\n sum+=gcd(gcd(i,j),ij);\n }", "{\n sum+=gcd(gcd(i,j),ij);\n }", "sum+=gcd(gcd(i,j),ij)", "sum", "gcd(gcd(i,j),ij)", "gcd", "gcd(i,j)", "gcd", "i", "j", "ij", "pl(sum+\"\")", "pl", "sum+\"\"", "sum", "\"\"", "String args[]", "args", "public static int gcd(int a,int b){\n if(a<b){\n int aa=a;a=b;b=aa;\n }\n while(a%b!=0){\n int c=a%b;\n a=b;b=c;\n }\n return b;\n }", "gcd", "{\n if(a<b){\n int aa=a;a=b;b=aa;\n }\n while(a%b!=0){\n int c=a%b;\n a=b;b=c;\n }\n return b;\n }", "if(a<b){\n int aa=a;a=b;b=aa;\n }", "a<b", "a", "b", "{\n int aa=a;a=b;b=aa;\n }", "int aa=a;", "aa", "a", "a=b", "a", "b", "b=aa", "b", "aa", "while(a%b!=0){\n int c=a%b;\n a=b;b=c;\n }", "a%b!=0", "a%b", "a", "b", "0", "{\n int c=a%b;\n a=b;b=c;\n }", "int c=a%b;", "c", "a%b", "a", "b", "a=b", "a", "b", "b=c", "b", "c", "return b;", "b", "int a", "a", "int b", "b", "public static void pr(String str){\n System.out.print(str);\n }", "pr", "{\n System.out.print(str);\n }", "System.out.print(str)", "System.out.print", "System.out", "System", "System.out", "str", "String str", "str", "public static void pl(String str){\n System.out.println(str);\n }", "pl", "{\n System.out.println(str);\n }", "System.out.println(str)", "System.out.println", "System.out", "System", "System.out", "str", "String str", "str" ]
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); long sum=0; for(int i=1;i<=k;i++){ for(int j=1;j<=k;j++){ for(int ij=1;ij<=k;ij++){ sum+=gcd(gcd(i,j),ij); } } } pl(sum+""); } public static int gcd(int a,int b){ if(a<b){ int aa=a;a=b;b=aa; } while(a%b!=0){ int c=a%b; a=b;b=c; } return b; } public static void pr(String str){ System.out.print(str); } public static void pl(String str){ System.out.println(str); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 13, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 4, 18, 20, 4, 18, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 182, 8 ], [ 182, 9 ], [ 9, 10 ], [ 182, 11 ], [ 11, 12 ], [ 182, 13 ], [ 13, 14 ], [ 13, 15 ], [ 15, 16 ], [ 16, 17 ], [ 17, 18 ], [ 17, 19 ], [ 16, 20 ], [ 20, 21 ], [ 21, 22 ], [ 15, 23 ], [ 23, 24 ], [ 24, 25 ], [ 24, 26 ], [ 24, 27 ], [ 27, 28 ], [ 27, 29 ], [ 13, 30 ], [ 30, 31 ], [ 13, 32 ], [ 32, 33 ], [ 182, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 42, 44 ], [ 36, 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 ], [ 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 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 86, 92 ], [ 36, 93 ], [ 93, 94 ], [ 94, 95 ], [ 93, 96 ], [ 182, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 103, 104 ], [ 103, 105 ], [ 99, 106 ], [ 106, 107 ], [ 107, 108 ], [ 99, 109 ], [ 109, 110 ], [ 110, 111 ], [ 97, 112 ], [ 112, 113 ], [ 182, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 114, 118 ], [ 118, 119 ], [ 114, 120 ], [ 120, 121 ], [ 120, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 114, 126 ], [ 126, 127 ], [ 126, 128 ], [ 128, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 134, 135 ], [ 135, 136 ], [ 136, 137 ], [ 129, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 143, 144 ], [ 144, 145 ], [ 139, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 128, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 114, 154 ], [ 154, 155 ], [ 154, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 158, 161 ], [ 161, 162 ], [ 114, 163 ], [ 163, 164 ], [ 163, 165 ], [ 165, 166 ], [ 166, 167 ], [ 167, 168 ], [ 168, 169 ], [ 167, 170 ], [ 170, 171 ], [ 114, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 176, 179 ], [ 179, 180 ], [ 0, 181 ], [ 181, 182 ], [ 181, 183 ] ]
[ "\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private void solve() {\n int n = sc.nextInt();\n\n int ans = 0;\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 ans += gcd(gcd(i, j), k);\n }\n }\n }\n out.println(ans);\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private void solve() {\n int n = sc.nextInt();\n\n int ans = 0;\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 ans += gcd(gcd(i, j), k);\n }\n }\n }\n out.println(ans);\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "Main", "private static PrintWriter out;", "out", "private static MyScanner sc;", "sc", "private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }", "gcd", "{\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }", "if (b == 0) {\n return a;\n }", "b == 0", "b", "0", "{\n return a;\n }", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "private void solve() {\n int n = sc.nextInt();\n\n int ans = 0;\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 ans += gcd(gcd(i, j), k);\n }\n }\n }\n out.println(ans);\n }", "solve", "{\n int n = sc.nextInt();\n\n int ans = 0;\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 ans += gcd(gcd(i, j), k);\n }\n }\n }\n out.println(ans);\n }", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for (int i = 1; i <= n; i++) {\n for (int j = 1; j <= n; ++j) {\n for (int k = 1; k <= n; ++k) {\n ans += gcd(gcd(i, j), k);\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 ans += gcd(gcd(i, j), k);\n }\n }\n }", "{\n for (int j = 1; j <= n; ++j) {\n for (int k = 1; k <= n; ++k) {\n ans += gcd(gcd(i, j), k);\n }\n }\n }", "for (int j = 1; j <= n; ++j) {\n for (int k = 1; k <= n; ++k) {\n ans += gcd(gcd(i, j), k);\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 ans += gcd(gcd(i, j), k);\n }\n }", "{\n for (int k = 1; k <= n; ++k) {\n ans += gcd(gcd(i, j), k);\n }\n }", "for (int k = 1; k <= n; ++k) {\n ans += gcd(gcd(i, j), k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "++k", "++k", "k", "{\n ans += gcd(gcd(i, j), k);\n }", "{\n ans += gcd(gcd(i, j), k);\n }", "ans += gcd(gcd(i, j), k)", "ans", "gcd(gcd(i, j), k)", "gcd", "gcd(i, j)", "gcd", "i", "j", "k", "out.println(ans)", "out.println", "out", "ans", "public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }", "main", "{\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }", "out = new PrintWriter(new BufferedOutputStream(System.out))", "out", "new PrintWriter(new BufferedOutputStream(System.out))", "sc = new MyScanner()", "sc", "new MyScanner()", "new Main().solve()", "new Main().solve", "new Main()", "out.close()", "out.close", "out", "String[] args", "args", "private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }", "MyScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "MyScanner", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public class Main {\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private void solve() {\n int n = sc.nextInt();\n\n int ans = 0;\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 ans += gcd(gcd(i, j), k);\n }\n }\n }\n out.println(ans);\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "public class Main {\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private void solve() {\n int n = sc.nextInt();\n\n int ans = 0;\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 ans += gcd(gcd(i, j), k);\n }\n }\n }\n out.println(ans);\n }\n\n private static PrintWriter out;\n private static MyScanner sc;\n\n private static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n private MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n }\n\n public static void main(String[] args) {\n out = new PrintWriter(new BufferedOutputStream(System.out));\n sc = new MyScanner();\n new Main().solve();\n out.close();\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { private int gcd(int a, int b) { if (b == 0) { return a; } return gcd(b, a % b); } private void solve() { int n = sc.nextInt(); int ans = 0; for (int i = 1; i <= n; i++) { for (int j = 1; j <= n; ++j) { for (int k = 1; k <= n; ++k) { ans += gcd(gcd(i, j), k); } } } out.println(ans); } private static PrintWriter out; private static MyScanner sc; private static class MyScanner { BufferedReader br; StringTokenizer st; private MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } } public static void main(String[] args) { out = new PrintWriter(new BufferedOutputStream(System.out)); sc = new MyScanner(); new Main().solve(); out.close(); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 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 ], [ 117, 11 ], [ 117, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 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 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 67, 73 ], [ 14, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 12, 80 ], [ 80, 81 ], [ 117, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 89, 96 ], [ 96, 97 ], [ 96, 98 ], [ 84, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 103, 104 ], [ 84, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 106, 111 ], [ 82, 112 ], [ 112, 113 ], [ 82, 114 ], [ 114, 115 ], [ 0, 116 ], [ 116, 117 ], [ 116, 118 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n long k = Long.parseLong(in.readLine());\n long sum = 0L;\n for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);\n System.out.println(sum);\n }\n public static long gcd(long a, long b) {\n if(a>b) {\n long t = a;\n a = b;\n b = t;\n }\n if(a == 0L)\n return b;\n return gcd(b%a,a);\n }\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 public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n long k = Long.parseLong(in.readLine());\n long sum = 0L;\n for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);\n System.out.println(sum);\n }\n public static long gcd(long a, long b) {\n if(a>b) {\n long t = a;\n a = b;\n b = t;\n }\n if(a == 0L)\n return b;\n return gcd(b%a,a);\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n long k = Long.parseLong(in.readLine());\n long sum = 0L;\n for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);\n System.out.println(sum);\n }", "main", "{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n long k = Long.parseLong(in.readLine());\n long sum = 0L;\n for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);\n System.out.println(sum);\n }", "BufferedReader in = new BufferedReader(new InputStreamReader(System.in));", "in", "new BufferedReader(new InputStreamReader(System.in))", "long k = Long.parseLong(in.readLine());", "k", "Long.parseLong(in.readLine())", "Long.parseLong", "Long", "in.readLine()", "in.readLine", "in", "long sum = 0L;", "sum", "0L", "for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);", "int a=1;", "int a=1;", "a", "1", "a<=k", "a", "k", "a++", "a++", "a", "for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);", "for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);", "int b=1;", "int b=1;", "b", "1", "b<=k", "b", "k", "b++", "b++", "b", "for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);", "for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);", "int c=1;", "int c=1;", "c", "1", "c<=k", "c", "k", "c++", "c++", "c", "sum += gcd(gcd(a,b),c);", "sum += gcd(gcd(a,b),c)", "sum", "gcd(gcd(a,b),c)", "gcd", "gcd(a,b)", "gcd", "a", "b", "c", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static long gcd(long a, long b) {\n if(a>b) {\n long t = a;\n a = b;\n b = t;\n }\n if(a == 0L)\n return b;\n return gcd(b%a,a);\n }", "gcd", "{\n if(a>b) {\n long t = a;\n a = b;\n b = t;\n }\n if(a == 0L)\n return b;\n return gcd(b%a,a);\n }", "if(a>b) {\n long t = a;\n a = b;\n b = t;\n }", "a>b", "a", "b", "{\n long t = a;\n a = b;\n b = t;\n }", "long t = a;", "t", "a", "a = b", "a", "b", "b = t", "b", "t", "if(a == 0L)\n return b;", "a == 0L", "a", "0L", "return b;", "b", "return gcd(b%a,a);", "gcd(b%a,a)", "gcd", "b%a", "b", "a", "a", "long a", "a", "long b", "b", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n long k = Long.parseLong(in.readLine());\n long sum = 0L;\n for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);\n System.out.println(sum);\n }\n public static long gcd(long a, long b) {\n if(a>b) {\n long t = a;\n a = b;\n b = t;\n }\n if(a == 0L)\n return b;\n return gcd(b%a,a);\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n long k = Long.parseLong(in.readLine());\n long sum = 0L;\n for(int a=1; a<=k; a++)\n for(int b=1; b<=k; b++)\n for(int c=1; c<=k; c++)\n sum += gcd(gcd(a,b),c);\n System.out.println(sum);\n }\n public static long gcd(long a, long b) {\n if(a>b) {\n long t = a;\n a = b;\n b = t;\n }\n if(a == 0L)\n return b;\n return gcd(b%a,a);\n }\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 in = new BufferedReader(new InputStreamReader(System.in)); long k = Long.parseLong(in.readLine()); long sum = 0L; for(int a=1; a<=k; a++) for(int b=1; b<=k; b++) for(int c=1; c<=k; c++) sum += gcd(gcd(a,b),c); System.out.println(sum); } public static long gcd(long a, long b) { if(a>b) { long t = a; a = b; b = t; } if(a == 0L) return b; return gcd(b%a,a); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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, 13, 2, 13, 13, 30, 0, 13, 13, 30, 0, 13, 4, 13, 4, 13, 13, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 4, 18, 18, 13, 13, 4, 13, 4, 18, 13, 4, 18, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 9, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 18, 19 ], [ 18, 20 ], [ 18, 21 ], [ 21, 22 ], [ 21, 23 ], [ 6, 24 ], [ 24, 25 ], [ 6, 26 ], [ 26, 27 ], [ 121, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 30, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 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 ], [ 74, 78 ], [ 78, 79 ], [ 78, 80 ], [ 73, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 73, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 90, 93 ], [ 88, 94 ], [ 30, 95 ], [ 95, 96 ], [ 28, 97 ], [ 97, 98 ], [ 121, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 102, 103 ], [ 102, 104 ], [ 101, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 105, 110 ], [ 110, 111 ], [ 110, 112 ], [ 112, 113 ], [ 113, 114 ], [ 101, 115 ], [ 115, 116 ], [ 116, 117 ], [ 99, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.*;\n\npublic class Main {\n private static int gcd(int p, int q) {\n if(p % q == 0)return q;\n return gcd(q, p % q);\n }\n \n private static long solve(int n) {\n long result = 0;\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }\n return result;\n }\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(solve(sc.nextInt()));\n sc.close();\n }\n}\n", "import java.util.*;", "util.*", "java", "public class Main {\n private static int gcd(int p, int q) {\n if(p % q == 0)return q;\n return gcd(q, p % q);\n }\n \n private static long solve(int n) {\n long result = 0;\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }\n return result;\n }\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(solve(sc.nextInt()));\n sc.close();\n }\n}", "Main", "private static int gcd(int p, int q) {\n if(p % q == 0)return q;\n return gcd(q, p % q);\n }", "gcd", "{\n if(p % q == 0)return q;\n return gcd(q, p % q);\n }", "if(p % q == 0)return q;", "p % q == 0", "p % q", "p", "q", "0", "return q;", "q", "return gcd(q, p % q);", "gcd(q, p % q)", "gcd", "q", "p % q", "p", "q", "int p", "p", "int q", "q", "private static long solve(int n) {\n long result = 0;\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }\n return result;\n }", "solve", "{\n long result = 0;\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }\n return result;\n }", "long result = 0;", "result", "0", "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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }", "{\n for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }", "for (int j = 1; j <= n; j++) {\n for (int k = 1; k <= n; k++) {\n if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }", "{\n for (int k = 1; k <= n; k++) {\n if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }", "for (int k = 1; k <= n; k++) {\n if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }", "{\n if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }", "if (i == j && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }", "i == j && j == k", "i == j", "i", "j", "j == k", "j", "k", "{\n result += i;\n }", "result += i", "result", "i", "{\n result += gcd(gcd(i, j), k);\n }", "result += gcd(gcd(i, j), k)", "result", "gcd(gcd(i, j), k)", "gcd", "gcd(i, j)", "gcd", "i", "j", "k", "return result;", "result", "int n", "n", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(solve(sc.nextInt()));\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n System.out.println(solve(sc.nextInt()));\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "System.out.println(solve(sc.nextInt()))", "System.out.println", "System.out", "System", "System.out", "solve(sc.nextInt())", "solve", "sc.nextInt()", "sc.nextInt", "sc", "sc.close()", "sc.close", "sc", "String[] args", "args", "public class Main {\n private static int gcd(int p, int q) {\n if(p % q == 0)return q;\n return gcd(q, p % q);\n }\n \n private static long solve(int n) {\n long result = 0;\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }\n return result;\n }\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(solve(sc.nextInt()));\n sc.close();\n }\n}", "public class Main {\n private static int gcd(int p, int q) {\n if(p % q == 0)return q;\n return gcd(q, p % q);\n }\n \n private static long solve(int n) {\n long result = 0;\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 && j == k) {\n result += i;\n } else {\n result += gcd(gcd(i, j), k);\n }\n }\n }\n }\n return result;\n }\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(solve(sc.nextInt()));\n sc.close();\n }\n}", "Main" ]
import java.util.*; public class Main { private static int gcd(int p, int q) { if(p % q == 0)return q; return gcd(q, p % q); } private static long solve(int n) { long result = 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 && j == k) { result += i; } else { result += gcd(gcd(i, j), k); } } } } return result; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println(solve(sc.nextInt())); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 99, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 79, 85 ], [ 85, 86 ], [ 78, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 76, 94 ], [ 94, 95 ], [ 76, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int x, int y){\n if(x % y == 0) return y;\n return gcd(y, x % y);\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 int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int x, int y){\n if(x % y == 0) return y;\n return gcd(y, x % y);\n }\n}", "Main", "public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int k = scan.nextInt();", "k", "scan.nextInt()", "scan.nextInt", "scan", "int sum = 0;", "sum", "0", "for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }", "{\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }", "for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }", "{\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }", "for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n sum += gcd(gcd(a, b), c);\n }", "{\n sum += gcd(gcd(a, b), c);\n }", "sum += gcd(gcd(a, b), c)", "sum", "gcd(gcd(a, b), c)", "gcd", "gcd(a, b)", "gcd", "a", "b", "c", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "static int gcd(int x, int y){\n if(x % y == 0) return y;\n return gcd(y, x % y);\n }", "gcd", "{\n if(x % y == 0) return y;\n return gcd(y, x % y);\n }", "if(x % y == 0) return y;", "x % y == 0", "x % y", "x", "y", "0", "return y;", "y", "return gcd(y, x % y);", "gcd(y, x % y)", "gcd", "y", "x % y", "x", "y", "int x", "x", "int y", "y", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int x, int y){\n if(x % y == 0) return y;\n return gcd(y, x % y);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int k = scan.nextInt();\n int sum = 0;\n for(int a = 1; a <= k; a++){\n for(int b = 1; b <= k; b++){\n for(int c = 1; c <= k; c++){\n sum += gcd(gcd(a, b), c);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int x, int y){\n if(x % y == 0) return y;\n return gcd(y, x % y);\n }\n}", "Main" ]
import java.util.*; public class Main{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); int k = scan.nextInt(); int sum = 0; for(int a = 1; a <= k; a++){ for(int b = 1; b <= k; b++){ for(int c = 1; c <= k; c++){ sum += gcd(gcd(a, b), c); } } } System.out.println(sum); } static int gcd(int x, int y){ if(x % y == 0) return y; return gcd(y, x % y); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 0, 13, 4, 18, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 13, 41, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 0, 13, 13, 29, 13, 23, 13, 23, 13, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 23, 31 ], [ 31, 32 ], [ 32, 33 ], [ 23, 34 ], [ 35, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 36, 41 ], [ 41, 42 ], [ 41, 43 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 49, 54 ], [ 54, 55 ], [ 54, 56 ], [ 49, 57 ], [ 57, 58 ], [ 58, 59 ], [ 49, 60 ], [ 60, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 64, 65 ], [ 63, 66 ], [ 63, 67 ], [ 63, 68 ], [ 8, 69 ], [ 69, 70 ], [ 70, 71 ], [ 71, 72 ], [ 71, 73 ], [ 69, 74 ], [ 6, 75 ], [ 75, 76 ], [ 0, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 85, 87 ], [ 81, 88 ], [ 88, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 88, 96 ], [ 96, 97 ], [ 96, 98 ], [ 88, 99 ], [ 99, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 100, 104 ], [ 104, 105 ], [ 104, 106 ], [ 99, 107 ], [ 107, 108 ], [ 107, 109 ], [ 81, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 110, 115 ], [ 115, 116 ], [ 115, 117 ], [ 110, 118 ], [ 118, 119 ], [ 119, 120 ], [ 110, 121 ], [ 122, 122 ], [ 122, 123 ], [ 123, 124 ], [ 125, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 125, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 125, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 123, 141 ], [ 141, 142 ], [ 141, 143 ], [ 81, 144 ], [ 144, 145 ], [ 79, 146 ], [ 146, 147 ], [ 79, 148 ], [ 148, 149 ], [ 79, 150 ], [ 150, 151 ] ]
[ "import java.util.*;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int y = 0;\n Gcd gcd = new Gcd();\n for(int i=1;i<=x;i++){\n for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }\n }\n System.out.println(y);\n }\n}\n\nclass Gcd{\n int gcd(int a,int b,int c){\n int min = a;\n int num = 1;\n if(a>b&&b<=c)\n min = b;\n else if(a>b&&b>c)\n min = c;\n \n for(int i=1;i<=min;i++){\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }\n return num;\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int y = 0;\n Gcd gcd = new Gcd();\n for(int i=1;i<=x;i++){\n for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }\n }\n System.out.println(y);\n }\n}", "Main", "public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int y = 0;\n Gcd gcd = new Gcd();\n for(int i=1;i<=x;i++){\n for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }\n }\n System.out.println(y);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int x = sc.nextInt();\n int y = 0;\n Gcd gcd = new Gcd();\n for(int i=1;i<=x;i++){\n for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }\n }\n System.out.println(y);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int x = sc.nextInt();", "x", "sc.nextInt()", "sc.nextInt", "sc", "int y = 0;", "y", "0", "Gcd gcd = new Gcd();", "gcd", "new Gcd()", "for(int i=1;i<=x;i++){\n for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\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 for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }\n }", "{\n for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }\n }", "for(int j=1;j<=x;j++){\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }", "int j=1;", "int j=1;", "j", "1", "j<=x", "j", "x", "j++", "j++", "j", "{\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }", "{\n for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);\n }", "for(int k=1;k<=x;k++)\n y+=gcd.gcd(i,j,k);", "int k=1;", "int k=1;", "k", "1", "k<=x", "k", "x", "k++", "k++", "k", "y+=gcd.gcd(i,j,k);", "y+=gcd.gcd(i,j,k)", "y", "gcd.gcd(i,j,k)", "gcd.gcd", "gcd", "i", "j", "k", "System.out.println(y)", "System.out.println", "System.out", "System", "System.out", "y", "String args[]", "args", "class Gcd{\n int gcd(int a,int b,int c){\n int min = a;\n int num = 1;\n if(a>b&&b<=c)\n min = b;\n else if(a>b&&b>c)\n min = c;\n \n for(int i=1;i<=min;i++){\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }\n return num;\n }\n}", "Gcd", "int gcd(int a,int b,int c){\n int min = a;\n int num = 1;\n if(a>b&&b<=c)\n min = b;\n else if(a>b&&b>c)\n min = c;\n \n for(int i=1;i<=min;i++){\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }\n return num;\n }", "gcd", "{\n int min = a;\n int num = 1;\n if(a>b&&b<=c)\n min = b;\n else if(a>b&&b>c)\n min = c;\n \n for(int i=1;i<=min;i++){\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }\n return num;\n }", "int min = a;", "min", "a", "int num = 1;", "num", "1", "if(a>b&&b<=c)\n min = b;\n else if(a>b&&b>c)\n min = c;", "a>b&&b<=c", "a>b", "a", "b", "b<=c", "b", "c", "min = b", "min", "b", "if(a>b&&b>c)\n min = c;", "a>b&&b>c", "a>b", "a", "b", "b>c", "b", "c", "min = c", "min", "c", "for(int i=1;i<=min;i++){\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }", "int i=1;", "int i=1;", "i", "1", "i<=min", "i", "min", "i++", "i++", "i", "{\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }", "{\n if(a%i==0&&b%i==0&&c%i==0)\n num = i;\n }", "if(a%i==0&&b%i==0&&c%i==0)\n num = i;", "a%i==0&&b%i==0&&c%i==0", "a%i==0&&b%i==0&&c%i==0", "a%i==0", "a%i", "a", "i", "0", "b%i==0", "b%i", "b", "i", "0", "c%i==0", "c%i", "c", "i", "0", "num = i", "num", "i", "return num;", "num", "int a", "a", "int b", "b", "int c", "c" ]
import java.util.*; class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = 0; Gcd gcd = new Gcd(); for(int i=1;i<=x;i++){ for(int j=1;j<=x;j++){ for(int k=1;k<=x;k++) y+=gcd.gcd(i,j,k); } } System.out.println(y); } } class Gcd{ int gcd(int a,int b,int c){ int min = a; int num = 1; if(a>b&&b<=c) min = b; else if(a>b&&b>c) min = c; for(int i=1;i<=min;i++){ if(a%i==0&&b%i==0&&c%i==0) num = i; } return num; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 48, 51 ], [ 45, 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 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 64, 71 ], [ 71, 72 ], [ 71, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 8, 80 ], [ 80, 81 ], [ 81, 82 ], [ 6, 83 ], [ 83, 84 ], [ 115, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 88, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 87, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 87, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 107, 108 ], [ 107, 109 ], [ 85, 110 ], [ 110, 111 ], [ 85, 112 ], [ 112, 113 ], [ 0, 114 ], [ 114, 115 ], [ 114, 116 ] ]
[ "import java.util.*;\n\npublic class Main {\npublic static void main(String[] args) {\n\n\t\t\tScanner keyboard = new Scanner(System.in);\n\n\t\t\t int N = keyboard.nextInt();\n\t\t\t int ans = 0;\n\t\t\t\n\t\t\tfor (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t}\n\t\n\tprivate static int gcd(int m, int n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\npublic static void main(String[] args) {\n\n\t\t\tScanner keyboard = new Scanner(System.in);\n\n\t\t\t int N = keyboard.nextInt();\n\t\t\t int ans = 0;\n\t\t\t\n\t\t\tfor (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t}\n\t\n\tprivate static int gcd(int m, int n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n}", "Main", "public static void main(String[] args) {\n\n\t\t\tScanner keyboard = new Scanner(System.in);\n\n\t\t\t int N = keyboard.nextInt();\n\t\t\t int ans = 0;\n\t\t\t\n\t\t\tfor (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t}", "main", "{\n\n\t\t\tScanner keyboard = new Scanner(System.in);\n\n\t\t\t int N = keyboard.nextInt();\n\t\t\t int ans = 0;\n\t\t\t\n\t\t\tfor (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t}", "Scanner keyboard = new Scanner(System.in);", "keyboard", "new Scanner(System.in)", "int N = keyboard.nextInt();", "N", "keyboard.nextInt()", "keyboard.nextInt", "keyboard", "int ans = 0;", "ans", "0", "for (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\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=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "for(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}", "int b=1;", "int b=1;", "b", "1", "b<=N", "b", "N", "b++", "b++", "b", "{\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}", "{\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}", "int B = gcd(a, b);", "B", "gcd(a, b)", "gcd", "a", "b", "for(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}", "int c=1;", "int c=1;", "c", "1", "c<=N", "c", "N", "c++", "c++", "c", "{\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}", "{\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}", "int C = gcd(B, c);", "C", "gcd(B, c)", "gcd", "B", "c", "ans += C", "ans", "C", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "keyboard.close()", "keyboard.close", "keyboard", "String[] args", "args", "private static int gcd(int m, int n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }", "gcd", "{\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }", "if(m < n) return gcd(n, m);", "m < n", "m", "n", "return gcd(n, m);", "gcd(n, m)", "gcd", "n", "m", "if(n == 0) return m;", "n == 0", "n", "0", "return m;", "m", "return gcd(n, m % n);", "gcd(n, m % n)", "gcd", "n", "m % n", "m", "n", "int m", "m", "int n", "n", "public class Main {\npublic static void main(String[] args) {\n\n\t\t\tScanner keyboard = new Scanner(System.in);\n\n\t\t\t int N = keyboard.nextInt();\n\t\t\t int ans = 0;\n\t\t\t\n\t\t\tfor (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t}\n\t\n\tprivate static int gcd(int m, int n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n}", "public class Main {\npublic static void main(String[] args) {\n\n\t\t\tScanner keyboard = new Scanner(System.in);\n\n\t\t\t int N = keyboard.nextInt();\n\t\t\t int ans = 0;\n\t\t\t\n\t\t\tfor (int a=1; a<=N; a++) {\n\t\t\t\tfor(int b=1; b<=N; b++) {\n\t\t\t\t\tint B = gcd(a, b);\n\t\t\t\t\tfor(int c=1; c<=N; c++) {\n\t\t\t\t\t\tint C = gcd(B, c);\n\t\t\t\t\t\tans += C;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\n\t\tSystem.out.println(ans);\n\t\tkeyboard.close();\t\n\t}\n\t\n\tprivate static int gcd(int m, int n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); int N = keyboard.nextInt(); int ans = 0; for (int a=1; a<=N; a++) { for(int b=1; b<=N; b++) { int B = gcd(a, b); for(int c=1; c<=N; c++) { int C = gcd(B, c); ans += C; } } } System.out.println(ans); keyboard.close(); } private static int gcd(int m, int n) { if(m < n) return gcd(n, m); if(n == 0) return m; return gcd(n, m % n); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 20, 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, 41, 13, 4, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 4, 13, 4, 18, 13, 13, 13, 4, 18, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 221, 8 ], [ 221, 9 ], [ 9, 10 ], [ 9, 11 ], [ 221, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 29, 31 ], [ 14, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 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 ], [ 58, 60 ], [ 60, 61 ], [ 60, 62 ], [ 60, 63 ], [ 57, 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 ], [ 77, 79 ], [ 79, 80 ], [ 79, 81 ], [ 79, 82 ], [ 14, 83 ], [ 83, 84 ], [ 84, 85 ], [ 85, 86 ], [ 85, 87 ], [ 83, 88 ], [ 12, 89 ], [ 89, 90 ], [ 221, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 97, 100 ], [ 97, 101 ], [ 95, 102 ], [ 102, 103 ], [ 103, 104 ], [ 102, 105 ], [ 102, 106 ], [ 91, 107 ], [ 107, 108 ], [ 91, 109 ], [ 109, 110 ], [ 221, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 119, 120 ], [ 113, 121 ], [ 121, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 124, 126 ], [ 122, 127 ], [ 111, 128 ], [ 128, 129 ], [ 111, 130 ], [ 130, 131 ], [ 0, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 132, 136 ], [ 136, 137 ], [ 132, 138 ], [ 138, 139 ], [ 138, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 132, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 147, 148 ], [ 148, 149 ], [ 149, 150 ], [ 149, 151 ], [ 148, 152 ], [ 152, 153 ], [ 153, 154 ], [ 154, 155 ], [ 147, 156 ], [ 156, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 157, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 146, 168 ], [ 168, 169 ], [ 169, 170 ], [ 170, 171 ], [ 132, 172 ], [ 172, 173 ], [ 172, 174 ], [ 174, 175 ], [ 175, 176 ], [ 176, 177 ], [ 177, 178 ], [ 176, 179 ], [ 179, 180 ], [ 132, 181 ], [ 181, 182 ], [ 181, 183 ], [ 183, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 185, 188 ], [ 188, 189 ], [ 132, 190 ], [ 190, 191 ], [ 190, 192 ], [ 192, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 194, 197 ], [ 197, 198 ], [ 132, 199 ], [ 199, 200 ], [ 199, 201 ], [ 201, 202 ], [ 202, 203 ], [ 202, 204 ], [ 201, 205 ], [ 205, 206 ], [ 206, 207 ], [ 206, 208 ], [ 208, 209 ], [ 209, 210 ], [ 210, 211 ], [ 205, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 215, 216 ], [ 216, 217 ], [ 201, 218 ], [ 218, 219 ], [ 0, 220 ], [ 220, 221 ], [ 220, 222 ] ]
[ "import java.util.*;\nimport java.io.*;\npublic class Main\n{\n static Hashtable<String ,Integer>hash=new Hashtable<>();\n public static void main(String args[]) throws java.lang.Exception\n {\n MyScanner sc = new MyScanner();\n \n // hash=new Hashtable<>();\n\n int n=Integer.parseInt(sc.nextLine());\n Hashtable<String,Integer>hash=new Hashtable<>();\n // long c=0;\n // int gcd[][]=new int[n+1][n+1];\n // for(int i=1;i<=n;i++)\n // {\n // for(int j=i;j<=n;j++)\n // {\n // gcd[i][j]=gcd1(i,j);\n // }\n // }\n long c=0;\n for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }\n \n System.out.println(c);\n \n \n \n }\n static int gcd1(int a, int b)\n {\n return func(Math.min(a,b),Math.max(a,b));\n }\n static int func(int a, int b)\n {\n if(a==0){return b;}\n return func(b%a,a);\n }\n \n \n \n\n \n }\n\n class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main\n{\n static Hashtable<String ,Integer>hash=new Hashtable<>();\n public static void main(String args[]) throws java.lang.Exception\n {\n MyScanner sc = new MyScanner();\n \n // hash=new Hashtable<>();\n\n int n=Integer.parseInt(sc.nextLine());\n Hashtable<String,Integer>hash=new Hashtable<>();\n // long c=0;\n // int gcd[][]=new int[n+1][n+1];\n // for(int i=1;i<=n;i++)\n // {\n // for(int j=i;j<=n;j++)\n // {\n // gcd[i][j]=gcd1(i,j);\n // }\n // }\n long c=0;\n for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }\n \n System.out.println(c);\n \n \n \n }\n static int gcd1(int a, int b)\n {\n return func(Math.min(a,b),Math.max(a,b));\n }\n static int func(int a, int b)\n {\n if(a==0){return b;}\n return func(b%a,a);\n }\n \n \n \n\n \n }", "Main", "static Hashtable<String ,Integer>hash=new Hashtable<>();", "hash", "new Hashtable<>()", "public static void main(String args[]) throws java.lang.Exception\n {\n MyScanner sc = new MyScanner();\n \n // hash=new Hashtable<>();\n\n int n=Integer.parseInt(sc.nextLine());\n Hashtable<String,Integer>hash=new Hashtable<>();\n // long c=0;\n // int gcd[][]=new int[n+1][n+1];\n // for(int i=1;i<=n;i++)\n // {\n // for(int j=i;j<=n;j++)\n // {\n // gcd[i][j]=gcd1(i,j);\n // }\n // }\n long c=0;\n for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }\n \n System.out.println(c);\n \n \n \n }", "main", "{\n MyScanner sc = new MyScanner();\n \n // hash=new Hashtable<>();\n\n int n=Integer.parseInt(sc.nextLine());\n Hashtable<String,Integer>hash=new Hashtable<>();\n // long c=0;\n // int gcd[][]=new int[n+1][n+1];\n // for(int i=1;i<=n;i++)\n // {\n // for(int j=i;j<=n;j++)\n // {\n // gcd[i][j]=gcd1(i,j);\n // }\n // }\n long c=0;\n for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }\n \n System.out.println(c);\n \n \n \n }", "MyScanner sc = new MyScanner();", "sc", "new MyScanner()", "int n=Integer.parseInt(sc.nextLine());", "n", "Integer.parseInt(sc.nextLine())", "Integer.parseInt", "Integer", "sc.nextLine()", "sc.nextLine", "sc", "Hashtable<String,Integer>hash=new Hashtable<>();", "hash", "new Hashtable<>()", "long c=0;", "c", "0", "for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "{\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }", "{\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }", "for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }", "int i=1;", "int i=1;", "i", "1", "i<=n", "i", "n", "i++", "i++", "i", "{\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }", "{\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }", "int kk=gcd1(i,k);", "kk", "gcd1(i,k)", "gcd1", "i", "k", "for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }", "int j=1;", "int j=1;", "j", "1", "j<=n", "j", "n", "j++", "j++", "j", "{\n c+=(long)gcd1(kk,j);\n }", "{\n c+=(long)gcd1(kk,j);\n }", "c+=(long)gcd1(kk,j)", "c", "(long)gcd1(kk,j)", "gcd1", "kk", "j", "System.out.println(c)", "System.out.println", "System.out", "System", "System.out", "c", "String args[]", "args", "static int gcd1(int a, int b)\n {\n return func(Math.min(a,b),Math.max(a,b));\n }", "gcd1", "{\n return func(Math.min(a,b),Math.max(a,b));\n }", "return func(Math.min(a,b),Math.max(a,b));", "func(Math.min(a,b),Math.max(a,b))", "func", "Math.min(a,b)", "Math.min", "Math", "a", "b", "Math.max(a,b)", "Math.max", "Math", "a", "b", "int a", "a", "int b", "b", "static int func(int a, int b)\n {\n if(a==0){return b;}\n return func(b%a,a);\n }", "func", "{\n if(a==0){return b;}\n return func(b%a,a);\n }", "if(a==0){return b;}", "a==0", "a", "0", "{return b;}", "return b;", "b", "return func(b%a,a);", "func(b%a,a)", "func", "b%a", "b", "a", "a", "int a", "a", "int b", "b", "class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n int nextInt() {\n return Integer.parseInt(next());\n }\n \n long nextLong() {\n return Long.parseLong(next());\n }\n \n double nextDouble() {\n return Double.parseDouble(next());\n }\n \n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n \n }", "MyScanner", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "MyScanner", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main\n{\n static Hashtable<String ,Integer>hash=new Hashtable<>();\n public static void main(String args[]) throws java.lang.Exception\n {\n MyScanner sc = new MyScanner();\n \n // hash=new Hashtable<>();\n\n int n=Integer.parseInt(sc.nextLine());\n Hashtable<String,Integer>hash=new Hashtable<>();\n // long c=0;\n // int gcd[][]=new int[n+1][n+1];\n // for(int i=1;i<=n;i++)\n // {\n // for(int j=i;j<=n;j++)\n // {\n // gcd[i][j]=gcd1(i,j);\n // }\n // }\n long c=0;\n for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }\n \n System.out.println(c);\n \n \n \n }\n static int gcd1(int a, int b)\n {\n return func(Math.min(a,b),Math.max(a,b));\n }\n static int func(int a, int b)\n {\n if(a==0){return b;}\n return func(b%a,a);\n }\n \n \n \n\n \n }", "public class Main\n{\n static Hashtable<String ,Integer>hash=new Hashtable<>();\n public static void main(String args[]) throws java.lang.Exception\n {\n MyScanner sc = new MyScanner();\n \n // hash=new Hashtable<>();\n\n int n=Integer.parseInt(sc.nextLine());\n Hashtable<String,Integer>hash=new Hashtable<>();\n // long c=0;\n // int gcd[][]=new int[n+1][n+1];\n // for(int i=1;i<=n;i++)\n // {\n // for(int j=i;j<=n;j++)\n // {\n // gcd[i][j]=gcd1(i,j);\n // }\n // }\n long c=0;\n for(int k=1;k<=n;k++)\n {\n for(int i=1;i<=n;i++)\n\n {\n int kk=gcd1(i,k);\n for(int j=1;j<=n;j++)\n {\n c+=(long)gcd1(kk,j);\n }\n\n\n }\n }\n \n System.out.println(c);\n \n \n \n }\n static int gcd1(int a, int b)\n {\n return func(Math.min(a,b),Math.max(a,b));\n }\n static int func(int a, int b)\n {\n if(a==0){return b;}\n return func(b%a,a);\n }\n \n \n \n\n \n }", "Main" ]
import java.util.*; import java.io.*; public class Main { static Hashtable<String ,Integer>hash=new Hashtable<>(); public static void main(String args[]) throws java.lang.Exception { MyScanner sc = new MyScanner(); // hash=new Hashtable<>(); int n=Integer.parseInt(sc.nextLine()); Hashtable<String,Integer>hash=new Hashtable<>(); // long c=0; // int gcd[][]=new int[n+1][n+1]; // for(int i=1;i<=n;i++) // { // for(int j=i;j<=n;j++) // { // gcd[i][j]=gcd1(i,j); // } // } long c=0; for(int k=1;k<=n;k++) { for(int i=1;i<=n;i++) { int kk=gcd1(i,k); for(int j=1;j<=n;j++) { c+=(long)gcd1(kk,j); } } } System.out.println(c); } static int gcd1(int a, int b) { return func(Math.min(a,b),Math.max(a,b)); } static int func(int a, int b) { if(a==0){return b;} return func(b%a,a); } } class MyScanner { BufferedReader br; StringTokenizer st; public MyScanner() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine(){ String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 41, 13, 41, 13, 41, 13, 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, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 17, 30, 0, 13, 13, 0, 13, 13, 0, 13, 17, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 17, 30, 0, 13, 13, 0, 13, 13, 0, 13, 17, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 2, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 8, 19 ], [ 19, 20 ], [ 8, 21 ], [ 21, 22 ], [ 8, 23 ], [ 23, 24 ], [ 8, 25 ], [ 25, 26 ], [ 25, 27 ], [ 8, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 33, 34 ], [ 33, 35 ], [ 28, 36 ], [ 36, 37 ], [ 37, 38 ], [ 28, 39 ], [ 40, 40 ], [ 40, 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 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 71, 75 ], [ 75, 76 ], [ 75, 77 ], [ 71, 78 ], [ 78, 79 ], [ 78, 80 ], [ 67, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 85, 87 ], [ 81, 88 ], [ 88, 89 ], [ 88, 90 ], [ 66, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 98, 99 ], [ 98, 100 ], [ 95, 101 ], [ 101, 102 ], [ 101, 103 ], [ 95, 104 ], [ 104, 105 ], [ 104, 106 ], [ 66, 107 ], [ 107, 108 ], [ 107, 109 ], [ 66, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 110, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 114, 118 ], [ 118, 119 ], [ 118, 120 ], [ 114, 121 ], [ 121, 122 ], [ 121, 123 ], [ 110, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 124, 128 ], [ 128, 129 ], [ 128, 130 ], [ 124, 131 ], [ 131, 132 ], [ 131, 133 ], [ 66, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 134, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 141, 142 ], [ 141, 143 ], [ 138, 144 ], [ 144, 145 ], [ 144, 146 ], [ 138, 147 ], [ 147, 148 ], [ 147, 149 ], [ 66, 150 ], [ 150, 151 ], [ 150, 152 ], [ 66, 153 ], [ 153, 154 ], [ 153, 155 ], [ 155, 156 ], [ 155, 157 ], [ 8, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 160, 162 ], [ 158, 163 ], [ 6, 164 ], [ 164, 165 ] ]
[ "import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt(); //繰り返す回数\n int a; //割られる数_最大公約数\n int b; //割る数\n int c; //あまり\n int max; //最大公約数\n int sum = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }\n System.out.println(sum);\n }\n}", "import java.util.*;", "util.*", "java", "class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt(); //繰り返す回数\n int a; //割られる数_最大公約数\n int b; //割る数\n int c; //あまり\n int max; //最大公約数\n int sum = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt(); //繰り返す回数\n int a; //割られる数_最大公約数\n int b; //割る数\n int c; //あまり\n int max; //最大公約数\n int sum = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt(); //繰り返す回数\n int a; //割られる数_最大公約数\n int b; //割る数\n int c; //あまり\n int max; //最大公約数\n int sum = 0;\n\n for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int a;", "a", "int b;", "b", "int c;", "c", "int max;", "max", "int sum = 0;", "sum", "0", "for(int i=1;i<=k;i++){\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }", "{\n for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }\n }", "for(int j=1;j<=k;j++){\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }", "{\n for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }\n }", "for(int l=1;l<=k;l++){\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }", "int l=1;", "int l=1;", "l", "1", "l<=k", "l", "k", "l++", "l++", "l", "{\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }", "{\n if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n } \n while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }\n max = a;\n sum = sum+max;\n }", "if(i>j){\n a = i;\n b = j;\n c = 1;\n }else{\n a = j;\n b = i;\n c = 1;\n }", "i>j", "i", "j", "{\n a = i;\n b = j;\n c = 1;\n }", "a = i", "a", "i", "b = j", "b", "j", "c = 1", "c", "1", "{\n a = j;\n b = i;\n c = 1;\n }", "a = j", "a", "j", "b = i", "b", "i", "c = 1", "c", "1", "while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }", "c!=0", "c", "0", "{\n c = a%b;\n a = b;\n b = c;\n }", "c = a%b", "c", "a%b", "a", "b", "a = b", "a", "b", "b = c", "b", "c", "max = a", "max", "a", "if(max>l){\n a = max;\n b = l;\n c = 1;\n }else{\n a = l;\n b = max;\n c = 1;\n }", "max>l", "max", "l", "{\n a = max;\n b = l;\n c = 1;\n }", "a = max", "a", "max", "b = l", "b", "l", "c = 1", "c", "1", "{\n a = l;\n b = max;\n c = 1;\n }", "a = l", "a", "l", "b = max", "b", "max", "c = 1", "c", "1", "while(c!=0){\n c = a%b;\n a = b;\n b = c;\n }", "c!=0", "c", "0", "{\n c = a%b;\n a = b;\n b = c;\n }", "c = a%b", "c", "a%b", "a", "b", "a = b", "a", "b", "b = c", "b", "c", "max = a", "max", "a", "sum = sum+max", "sum", "sum+max", "sum", "max", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args" ]
import java.util.*; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); //繰り返す回数 int a; //割られる数_最大公約数 int b; //割る数 int c; //あまり int max; //最大公約数 int sum = 0; for(int i=1;i<=k;i++){ for(int j=1;j<=k;j++){ for(int l=1;l<=k;l++){ if(i>j){ a = i; b = j; c = 1; }else{ a = j; b = i; c = 1; } while(c!=0){ c = a%b; a = b; b = c; } max = a; if(max>l){ a = max; b = l; c = 1; }else{ a = l; b = max; c = 1; } while(c!=0){ c = a%b; a = b; b = c; } max = a; sum = sum+max; } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 99, 5 ], [ 99, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 99, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 79, 85 ], [ 85, 86 ], [ 78, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 76, 94 ], [ 94, 95 ], [ 76, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 ans += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.print(ans);\n\n }\n static int gcd(int a, int b){\n if(a%b==0) return b;\n return gcd(b,a%b);\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 int n = sc.nextInt();\n int ans = 0;\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 ans += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.print(ans);\n\n }\n static int gcd(int a, int b){\n if(a%b==0) return b;\n return gcd(b,a%b);\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 ans += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.print(ans);\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 ans += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.print(ans);\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for(int i = 1; i <= n; i++){\n for(int j = 1; j <= n; j++){\n for(int k = 1; k <= n; k++){\n ans += gcd(gcd(i,j),k);\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 ans += gcd(gcd(i,j),k);\n }\n }\n }", "{\n for(int j = 1; j <= n; j++){\n for(int k = 1; k <= n; k++){\n ans += gcd(gcd(i,j),k);\n }\n }\n }", "for(int j = 1; j <= n; j++){\n for(int k = 1; k <= n; k++){\n ans += gcd(gcd(i,j),k);\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 ans += gcd(gcd(i,j),k);\n }\n }", "{\n for(int k = 1; k <= n; k++){\n ans += gcd(gcd(i,j),k);\n }\n }", "for(int k = 1; k <= n; k++){\n ans += gcd(gcd(i,j),k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n ans += gcd(gcd(i,j),k);\n }", "{\n ans += gcd(gcd(i,j),k);\n }", "ans += gcd(gcd(i,j),k)", "ans", "gcd(gcd(i,j),k)", "gcd", "gcd(i,j)", "gcd", "i", "j", "k", "System.out.print(ans)", "System.out.print", "System.out", "System", "System.out", "ans", "String[] args", "args", "static int gcd(int a, int b){\n if(a%b==0) return b;\n return gcd(b,a%b);\n }", "gcd", "{\n if(a%b==0) return b;\n return gcd(b,a%b);\n }", "if(a%b==0) return b;", "a%b==0", "a%b", "a", "b", "0", "return b;", "b", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 ans += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.print(ans);\n\n }\n static int gcd(int a, int b){\n if(a%b==0) return b;\n return gcd(b,a%b);\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int ans = 0;\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 ans += gcd(gcd(i,j),k);\n }\n }\n }\n System.out.print(ans);\n\n }\n static int gcd(int a, int b){\n if(a%b==0) return b;\n return gcd(b,a%b);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int ans = 0; for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ for(int k = 1; k <= n; k++){ ans += gcd(gcd(i,j),k); } } } System.out.print(ans); } static int gcd(int a, int b){ if(a%b==0) return b; return gcd(b,a%b); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 4, 13, 13, 13, 29, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 2, 13, 13, 17, 29, 13, 29, 4, 13, 13, 2, 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 ], [ 127, 11 ], [ 127, 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 ], [ 25, 27 ], [ 14, 28 ], [ 28, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 28, 33 ], [ 14, 34 ], [ 34, 35 ], [ 35, 36 ], [ 12, 37 ], [ 37, 38 ], [ 127, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 42, 44 ], [ 41, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 45, 50 ], [ 50, 51 ], [ 50, 52 ], [ 45, 53 ], [ 53, 54 ], [ 54, 55 ], [ 45, 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 ], [ 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 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 87, 90 ], [ 41, 91 ], [ 91, 92 ], [ 39, 93 ], [ 93, 94 ], [ 127, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 103, 106 ], [ 97, 107 ], [ 107, 108 ], [ 108, 109 ], [ 109, 110 ], [ 109, 111 ], [ 108, 112 ], [ 107, 113 ], [ 113, 114 ], [ 97, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 116, 119 ], [ 119, 120 ], [ 119, 121 ], [ 95, 122 ], [ 122, 123 ], [ 95, 124 ], [ 124, 125 ], [ 0, 126 ], [ 126, 127 ], [ 126, 128 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tlong r = solve(n);\n\t\tSystem.out.println(r);\n\t\tin.close();\n\t}\n\n\tprivate static long solve(int n) {\n\t\tlong r = 0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}\n\t\treturn r;\n\t}\n\n\tprivate static int gcm(int a, int b) {\n\t\tif (a < b)\n\t\t\treturn gcm(b, a);\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcm(b, a % b);\n\t}\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tlong r = solve(n);\n\t\tSystem.out.println(r);\n\t\tin.close();\n\t}\n\n\tprivate static long solve(int n) {\n\t\tlong r = 0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}\n\t\treturn r;\n\t}\n\n\tprivate static int gcm(int a, int b) {\n\t\tif (a < b)\n\t\t\treturn gcm(b, a);\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcm(b, a % b);\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tlong r = solve(n);\n\t\tSystem.out.println(r);\n\t\tin.close();\n\t}", "main", "{\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tlong r = solve(n);\n\t\tSystem.out.println(r);\n\t\tin.close();\n\t}", "Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));", "in", "new Scanner(new BufferedReader(new InputStreamReader(System.in)))", "int n = in.nextInt();", "n", "in.nextInt()", "in.nextInt", "in", "long r = solve(n);", "r", "solve(n)", "solve", "n", "System.out.println(r)", "System.out.println", "System.out", "System", "System.out", "r", "in.close()", "in.close", "in", "String[] args", "args", "private static long solve(int n) {\n\t\tlong r = 0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}\n\t\treturn r;\n\t}", "solve", "{\n\t\tlong r = 0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}\n\t\treturn r;\n\t}", "long r = 0;", "r", "0", "for (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "int i = 1;", "int i = 1;", "i", "1", "i <= n", "i", "n", "i++", "i++", "i", "for (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "for (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "for (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "for (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "{\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}", "r += gcm(i, gcm(j, k))", "r", "gcm(i, gcm(j, k))", "gcm", "i", "gcm(j, k)", "gcm", "j", "k", "return r;", "r", "int n", "n", "private static int gcm(int a, int b) {\n\t\tif (a < b)\n\t\t\treturn gcm(b, a);\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcm(b, a % b);\n\t}", "gcm", "{\n\t\tif (a < b)\n\t\t\treturn gcm(b, a);\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcm(b, a % b);\n\t}", "if (a < b)\n\t\t\treturn gcm(b, a);", "a < b", "a", "b", "return gcm(b, a);", "gcm(b, a)", "gcm", "b", "a", "if (a % b == 0)\n\t\t\treturn b;", "a % b == 0", "a % b", "a", "b", "0", "return b;", "b", "return gcm(b, a % b);", "gcm(b, a % b)", "gcm", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tlong r = solve(n);\n\t\tSystem.out.println(r);\n\t\tin.close();\n\t}\n\n\tprivate static long solve(int n) {\n\t\tlong r = 0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}\n\t\treturn r;\n\t}\n\n\tprivate static int gcm(int a, int b) {\n\t\tif (a < b)\n\t\t\treturn gcm(b, a);\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcm(b, a % b);\n\t}\n\n}", "public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\tint n = in.nextInt();\n\t\tlong r = solve(n);\n\t\tSystem.out.println(r);\n\t\tin.close();\n\t}\n\n\tprivate static long solve(int n) {\n\t\tlong r = 0;\n\t\tfor (int i = 1; i <= n; i++)\n\t\t\tfor (int j = 1; j <= n; j++)\n\t\t\t\tfor (int k = 1; k <= n; k++) {\n\t\t\t\t\tr += gcm(i, gcm(j, k));\n\t\t\t\t}\n\t\treturn r;\n\t}\n\n\tprivate static int gcm(int a, int b) {\n\t\tif (a < b)\n\t\t\treturn gcm(b, a);\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcm(b, a % b);\n\t}\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); int n = in.nextInt(); long r = solve(n); System.out.println(r); in.close(); } private static long solve(int n) { long r = 0; for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) for (int k = 1; k <= n; k++) { r += gcm(i, gcm(j, k)); } return r; } private static int gcm(int a, int b) { if (a < b) return gcm(b, a); if (a % b == 0) return b; return gcm(b, a % b); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 4, 18, 13, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 13, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 13, 0, 13, 2, 2, 17, 17, 13, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 17, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 121, 5 ], [ 121, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 10, 15 ], [ 15, 16 ], [ 15, 17 ], [ 15, 18 ], [ 18, 19 ], [ 18, 20 ], [ 6, 21 ], [ 21, 22 ], [ 6, 23 ], [ 23, 24 ], [ 121, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 27, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 27, 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 ], [ 54, 56 ], [ 53, 57 ], [ 57, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 57, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 66, 68 ], [ 57, 69 ], [ 69, 70 ], [ 70, 71 ], [ 57, 72 ], [ 73, 73 ], [ 73, 74 ], [ 74, 75 ], [ 74, 76 ], [ 76, 77 ], [ 76, 78 ], [ 76, 79 ], [ 73, 80 ], [ 80, 81 ], [ 80, 82 ], [ 83, 83 ], [ 83, 84 ], [ 83, 85 ], [ 83, 86 ], [ 73, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 87, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 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 ], [ 108, 111 ], [ 27, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 112, 117 ], [ 25, 118 ], [ 118, 119 ], [ 0, 120 ], [ 120, 121 ], [ 120, 122 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n static int gcd (int a, int b) {\n return b == 0 ? a : gcd (b, a % b);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long total = 0;\n int k = sc.nextInt();\n\n for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }\n System.out.println(total);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n static int gcd (int a, int b) {\n return b == 0 ? a : gcd (b, a % b);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long total = 0;\n int k = sc.nextInt();\n\n for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }\n System.out.println(total);\n }\n}", "Main", "static int gcd (int a, int b) {\n return b == 0 ? a : gcd (b, a % b);\n }", "gcd", "{\n return b == 0 ? a : gcd (b, a % b);\n }", "return b == 0 ? a : gcd (b, a % b);", "b == 0 ? a : gcd (b, a % b)", "b == 0", "b", "0", "a", "gcd (b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long total = 0;\n int k = sc.nextInt();\n\n for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }\n System.out.println(total);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n long total = 0;\n int k = sc.nextInt();\n\n for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }\n System.out.println(total);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "long total = 0;", "total", "0", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }", "int x = 1;", "int x = 1;", "x", "1", "x < k + 1", "x", "k + 1", "k", "1", "x++", "x++", "x", "{\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }", "{\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }", "total += x", "total", "x", "for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }", "int y = x+1;", "int y = x+1;", "y", "x+1", "x", "1", "y < k + 1", "y", "k + 1", "k", "1", "y++", "y++", "y", "{\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }", "{\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }", "int first = gcd(x, y);", "first", "gcd(x, y)", "gcd", "x", "y", "total += 2 * 3 * first", "total", "2 * 3 * first", "2 * 3 * first", "2", "3", "first", "for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }", "int z = y+1;", "int z = y+1;", "z", "y+1", "y", "1", "z < k + 1", "z", "k + 1", "k", "1", "z++", "z++", "z", "{\n total += 6 * gcd(first, z);\n }", "{\n total += 6 * gcd(first, z);\n }", "total += 6 * gcd(first, z)", "total", "6 * gcd(first, z)", "6", "gcd(first, z)", "gcd", "first", "z", "System.out.println(total)", "System.out.println", "System.out", "System", "System.out", "total", "String[] args", "args", "public class Main {\n\n static int gcd (int a, int b) {\n return b == 0 ? a : gcd (b, a % b);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long total = 0;\n int k = sc.nextInt();\n\n for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }\n System.out.println(total);\n }\n}", "public class Main {\n\n static int gcd (int a, int b) {\n return b == 0 ? a : gcd (b, a % b);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long total = 0;\n int k = sc.nextInt();\n\n for (int x = 1; x < k + 1; x++) {\n total += x;\n for (int y = x+1; y < k + 1; y++) {\n int first = gcd(x, y);\n total += 2 * 3 * first;\n for (int z = y+1; z < k + 1; z++) {\n total += 6 * gcd(first, z);\n }\n }\n }\n System.out.println(total);\n }\n}", "Main" ]
import java.util.*; public class Main { static int gcd (int a, int b) { return b == 0 ? a : gcd (b, a % b); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); long total = 0; int k = sc.nextInt(); for (int x = 1; x < k + 1; x++) { total += x; for (int y = x+1; y < k + 1; y++) { int first = gcd(x, y); total += 2 * 3 * first; for (int z = y+1; z < k + 1; z++) { total += 6 * gcd(first, z); } } } System.out.println(total); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 4, 18, 13, 17, 17, 41, 13, 17, 41, 13, 39, 39, 17, 17, 39, 17, 40, 17, 39, 17, 17, 39, 40, 17, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 13, 2, 17, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 30, 29, 17, 41, 13, 2, 13, 13, 14, 2, 13, 2, 13, 13, 30, 29, 17, 29, 17, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 0, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 42, 2, 13, 13, 30, 4, 13, 13, 13, 13, 40, 13, 40, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 18, 13, 13, 17, 30, 29, 17, 41, 13, 2, 18, 13, 13, 17, 42, 2, 13, 17, 30, 14, 2, 18, 13, 13, 18, 13, 2, 13, 17, 30, 3, 40, 13, 14, 2, 13, 17, 30, 29, 17, 41, 13, 2, 18, 13, 13, 17, 11, 1, 41, 13, 2, 18, 13, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 14, 2, 18, 13, 13, 18, 13, 13, 30, 0, 13, 13, 3, 4, 13, 13, 13, 13, 4, 13, 13, 2, 13, 17, 2, 18, 13, 13, 17, 29, 17, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 2, 13, 17, 29, 13, 23, 13, 12, 13, 30, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 28, 13, 13, 30, 30, 4, 18, 18, 13, 13, 2, 13, 17, 4, 13, 17, 23, 13, 12, 13, 30, 29, 2, 4, 18, 13, 13, 4, 18, 13, 17, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 29, 4, 13, 13, 13, 14, 2, 2, 13, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 12, 13, 30, 42, 2, 2, 13, 17, 40, 4, 18, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 4, 18, 13, 29, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 500, 14 ], [ 500, 15 ], [ 15, 16 ], [ 15, 17 ], [ 17, 18 ], [ 18, 19 ], [ 17, 20 ], [ 17, 21 ], [ 500, 22 ], [ 22, 23 ], [ 22, 24 ], [ 500, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 27, 35 ], [ 35, 36 ], [ 35, 37 ], [ 27, 38 ], [ 38, 39 ], [ 39, 40 ], [ 38, 41 ], [ 500, 42 ], [ 42, 43 ], [ 42, 44 ], [ 44, 45 ], [ 45, 46 ], [ 45, 47 ], [ 44, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 51, 52 ], [ 44, 53 ], [ 53, 54 ], [ 53, 55 ], [ 44, 56 ], [ 56, 57 ], [ 56, 58 ], [ 44, 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 ], [ 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 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 44, 108 ], [ 108, 109 ], [ 108, 110 ], [ 110, 111 ], [ 110, 112 ], [ 42, 113 ], [ 113, 114 ], [ 500, 115 ], [ 115, 116 ], [ 115, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 120, 121 ], [ 120, 122 ], [ 119, 123 ], [ 123, 124 ], [ 123, 125 ], [ 118, 126 ], [ 126, 127 ], [ 127, 128 ], [ 117, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 117, 134 ], [ 134, 135 ], [ 135, 136 ], [ 135, 137 ], [ 137, 138 ], [ 137, 139 ], [ 134, 140 ], [ 140, 141 ], [ 141, 142 ], [ 117, 143 ], [ 143, 144 ], [ 115, 145 ], [ 145, 146 ], [ 115, 147 ], [ 147, 148 ], [ 500, 149 ], [ 149, 150 ], [ 149, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 154, 155 ], [ 154, 156 ], [ 151, 157 ], [ 157, 158 ], [ 158, 159 ], [ 158, 160 ], [ 157, 161 ], [ 161, 162 ], [ 161, 163 ], [ 151, 164 ], [ 164, 165 ], [ 165, 166 ], [ 165, 167 ], [ 164, 168 ], [ 149, 169 ], [ 169, 170 ], [ 149, 171 ], [ 171, 172 ], [ 149, 173 ], [ 173, 174 ], [ 500, 175 ], [ 175, 176 ], [ 175, 177 ], [ 177, 178 ], [ 178, 179 ], [ 179, 180 ], [ 179, 181 ], [ 178, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 183, 186 ], [ 183, 187 ], [ 182, 188 ], [ 188, 189 ], [ 182, 190 ], [ 190, 191 ], [ 175, 192 ], [ 192, 193 ], [ 175, 194 ], [ 194, 195 ], [ 175, 196 ], [ 196, 197 ], [ 500, 198 ], [ 198, 199 ], [ 198, 200 ], [ 200, 201 ], [ 201, 202 ], [ 202, 203 ], [ 203, 204 ], [ 203, 205 ], [ 202, 206 ], [ 201, 207 ], [ 207, 208 ], [ 208, 209 ], [ 200, 210 ], [ 210, 211 ], [ 210, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 212, 216 ], [ 200, 217 ], [ 217, 218 ], [ 218, 219 ], [ 218, 220 ], [ 217, 221 ], [ 221, 222 ], [ 222, 223 ], [ 223, 224 ], [ 224, 225 ], [ 224, 226 ], [ 223, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 229, 231 ], [ 222, 232 ], [ 232, 233 ], [ 221, 234 ], [ 234, 235 ], [ 200, 236 ], [ 236, 237 ], [ 237, 238 ], [ 237, 239 ], [ 236, 240 ], [ 240, 241 ], [ 241, 242 ], [ 200, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 246, 247 ], [ 246, 248 ], [ 245, 249 ], [ 200, 250 ], [ 250, 251 ], [ 251, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 255, 257 ], [ 254, 258 ], [ 250, 259 ], [ 259, 260 ], [ 259, 261 ], [ 250, 262 ], [ 262, 263 ], [ 263, 264 ], [ 250, 265 ], [ 266, 266 ], [ 266, 267 ], [ 267, 268 ], [ 268, 269 ], [ 269, 270 ], [ 269, 271 ], [ 268, 272 ], [ 272, 273 ], [ 272, 274 ], [ 267, 275 ], [ 275, 276 ], [ 276, 277 ], [ 276, 278 ], [ 275, 279 ], [ 200, 280 ], [ 280, 281 ], [ 280, 282 ], [ 280, 283 ], [ 280, 284 ], [ 200, 285 ], [ 285, 286 ], [ 285, 287 ], [ 285, 288 ], [ 288, 289 ], [ 288, 290 ], [ 285, 291 ], [ 291, 292 ], [ 292, 293 ], [ 292, 294 ], [ 291, 295 ], [ 200, 296 ], [ 296, 297 ], [ 198, 298 ], [ 298, 299 ], [ 500, 300 ], [ 300, 301 ], [ 300, 302 ], [ 302, 303 ], [ 303, 304 ], [ 303, 305 ], [ 302, 307 ], [ 307, 308 ], [ 308, 309 ], [ 309, 310 ], [ 309, 311 ], [ 307, 312 ], [ 312, 313 ], [ 312, 314 ], [ 307, 315 ], [ 315, 316 ], [ 316, 317 ], [ 307, 318 ], [ 319, 319 ], [ 319, 320 ], [ 320, 321 ], [ 321, 322 ], [ 321, 323 ], [ 320, 324 ], [ 324, 325 ], [ 324, 326 ], [ 302, 327 ], [ 327, 328 ], [ 300, 329 ], [ 329, 330 ], [ 500, 331 ], [ 331, 332 ], [ 331, 333 ], [ 333, 334 ], [ 334, 335 ], [ 335, 336 ], [ 336, 337 ], [ 336, 338 ], [ 334, 339 ], [ 331, 340 ], [ 340, 341 ], [ 500, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 345, 346 ], [ 345, 347 ], [ 345, 348 ], [ 349, 349 ], [ 349, 350 ], [ 350, 351 ], [ 351, 352 ], [ 352, 353 ], [ 352, 354 ], [ 350, 355 ], [ 355, 356 ], [ 355, 357 ], [ 344, 358 ], [ 358, 359 ], [ 358, 360 ], [ 342, 361 ], [ 361, 362 ], [ 500, 363 ], [ 363, 364 ], [ 363, 365 ], [ 365, 366 ], [ 366, 367 ], [ 367, 368 ], [ 368, 369 ], [ 369, 370 ], [ 368, 371 ], [ 367, 372 ], [ 372, 373 ], [ 373, 374 ], [ 372, 375 ], [ 363, 376 ], [ 376, 377 ], [ 500, 378 ], [ 378, 379 ], [ 378, 380 ], [ 380, 381 ], [ 381, 382 ], [ 382, 383 ], [ 382, 384 ], [ 381, 385 ], [ 385, 386 ], [ 386, 387 ], [ 387, 388 ], [ 387, 389 ], [ 387, 390 ], [ 380, 391 ], [ 391, 392 ], [ 392, 393 ], [ 393, 394 ], [ 393, 395 ], [ 392, 396 ], [ 391, 397 ], [ 397, 398 ], [ 398, 399 ], [ 380, 400 ], [ 400, 401 ], [ 401, 402 ], [ 401, 403 ], [ 401, 404 ], [ 404, 405 ], [ 404, 406 ], [ 378, 407 ], [ 407, 408 ], [ 378, 409 ], [ 409, 410 ], [ 500, 411 ], [ 411, 412 ], [ 411, 413 ], [ 413, 414 ], [ 411, 415 ], [ 415, 416 ], [ 411, 417 ], [ 417, 418 ], [ 417, 419 ], [ 419, 420 ], [ 420, 421 ], [ 420, 422 ], [ 411, 423 ], [ 423, 424 ], [ 423, 425 ], [ 425, 426 ], [ 426, 427 ], [ 427, 428 ], [ 428, 429 ], [ 428, 430 ], [ 427, 431 ], [ 431, 432 ], [ 432, 433 ], [ 433, 434 ], [ 426, 435 ], [ 435, 436 ], [ 436, 437 ], [ 437, 438 ], [ 437, 439 ], [ 439, 440 ], [ 440, 441 ], [ 441, 442 ], [ 436, 443 ], [ 443, 444 ], [ 444, 445 ], [ 444, 446 ], [ 425, 447 ], [ 447, 448 ], [ 448, 449 ], [ 449, 450 ], [ 411, 451 ], [ 451, 452 ], [ 451, 453 ], [ 453, 454 ], [ 454, 455 ], [ 455, 456 ], [ 456, 457 ], [ 455, 458 ], [ 458, 459 ], [ 411, 460 ], [ 460, 461 ], [ 460, 462 ], [ 462, 463 ], [ 463, 464 ], [ 464, 465 ], [ 465, 466 ], [ 464, 467 ], [ 467, 468 ], [ 411, 469 ], [ 469, 470 ], [ 469, 471 ], [ 471, 472 ], [ 472, 473 ], [ 473, 474 ], [ 474, 475 ], [ 473, 476 ], [ 476, 477 ], [ 411, 478 ], [ 478, 479 ], [ 478, 480 ], [ 480, 481 ], [ 481, 482 ], [ 481, 483 ], [ 480, 484 ], [ 484, 485 ], [ 485, 486 ], [ 485, 487 ], [ 487, 488 ], [ 488, 489 ], [ 489, 490 ], [ 484, 491 ], [ 491, 492 ], [ 492, 493 ], [ 492, 494 ], [ 494, 495 ], [ 495, 496 ], [ 480, 497 ], [ 497, 498 ], [ 0, 499 ], [ 499, 500 ], [ 499, 501 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int k = sc.nextInt();\n int res = 0;\n int[] gcds = new int[k];\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }\n print(\"\" + res);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.*;", "util.*", "java", "public class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int k = sc.nextInt();\n int res = 0;\n int[] gcds = new int[k];\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }\n print(\"\" + res);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "Main", "private static final int MOD = (int) Math.pow(10, 9);", "MOD", "(int) Math.pow(10, 9)", "Math.pow", "Math", "10", "9", "private static final long EIGHT = (long) 1e18;", "EIGHT", "(long) 1e18", "private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};", "DIRS", "{{0, 1}, {0, -1}, {1, 0}, {-1, 0}}", "{0, 1}", "0", "1", "{0, -1}", "0", "-1", "1", "{1, 0}", "1", "0", "{-1, 0}", "-1", "1", "0", "public static void main(String[] args) {\n FastReader sc = new FastReader();\n int k = sc.nextInt();\n int res = 0;\n int[] gcds = new int[k];\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }\n print(\"\" + res);\n }", "main", "{\n FastReader sc = new FastReader();\n int k = sc.nextInt();\n int res = 0;\n int[] gcds = new int[k];\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }\n print(\"\" + res);\n }", "FastReader sc = new FastReader();", "sc", "new FastReader()", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int res = 0;", "res", "0", "int[] gcds = new int[k];", "gcds", "new int[k]", "k", "for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }", "for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }", "{\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }", "for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n res += gcd((long)a, gcd((long)b, (long)c));\n }", "{\n res += gcd((long)a, gcd((long)b, (long)c));\n }", "res += gcd((long)a, gcd((long)b, (long)c))", "res", "gcd((long)a, gcd((long)b, (long)c))", "gcd", "(long)a", "gcd((long)b, (long)c)", "gcd", "(long)b", "(long)c", "print(\"\" + res)", "print", "\"\" + res", "\"\"", "res", "String[] args", "args", "/*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }", "isOverflowByMul", "{\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }", "if (a == 0 || b == 0) {\n return false;\n }", "a == 0 || b == 0", "a == 0", "a", "0", "b == 0", "b", "0", "{\n return false;\n }", "return false;", "false", "long result = a * b;", "result", "a * b", "a", "b", "if (a == result / b) {\n return false;\n }", "a == result / b", "a", "result / b", "result", "b", "{\n return false;\n }", "return false;", "false", "return true;", "true", "long a", "a", "long b", "b", "static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }", "swap", "{\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }", "int tmp = nums[x];", "tmp", "nums[x]", "nums", "x", "nums[x] = nums[y]", "nums[x]", "nums", "x", "nums[y]", "nums", "y", "nums[y] = tmp", "nums[y]", "nums", "y", "tmp", "int[] nums", "nums", "int x", "x", "int y", "y", "static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }", "reverse", "{\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }", "while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }", "left < right", "left", "right", "{\n swap(nums, left, right);\n left++;\n right--;\n }", "swap(nums, left, right)", "swap", "nums", "left", "right", "left++", "left", "right--", "right", "int[] nums", "nums", "int left", "left", "int right", "right", "static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }", "findNextPermutation", "{\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }", "if (nums.length <= 1) {\n return false;\n }", "nums.length <= 1", "nums.length", "nums", "nums.length", "1", "{\n return false;\n }", "return false;", "false", "int last = nums.length - 2;", "last", "nums.length - 2", "nums.length", "nums", "nums.length", "2", "while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }", "last >= 0", "last", "0", "{\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }", "if (nums[last] < nums[last + 1]){\n break;\n }", "nums[last] < nums[last + 1]", "nums[last]", "nums", "last", "nums[last + 1]", "nums", "last + 1", "last", "1", "{\n break;\n }", "break;", "last--", "last", "if (last < 0) { return false; }", "last < 0", "last", "0", "{ return false; }", "return false;", "false", "int nextGenerater = nums.length - 1;", "nextGenerater", "nums.length - 1", "nums.length", "nums", "nums.length", "1", "for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }", "int i = nums.length - 1;", "int i = nums.length - 1;", "i", "nums.length - 1", "nums.length", "nums", "nums.length", "1", "i > last", "i", "last", "i--", "i--", "i", "{\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }", "{\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }", "if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }", "nums[i] > nums[last]", "nums[i]", "nums", "i", "nums[last]", "nums", "last", "{\n nextGenerater = i;\n break;\n }", "nextGenerater = i", "nextGenerater", "i", "break;", "swap(nums, nextGenerater, last)", "swap", "nums", "nextGenerater", "last", "reverse(nums, last + 1, nums.length - 1)", "reverse", "nums", "last + 1", "last", "1", "nums.length - 1", "nums.length", "nums", "nums.length", "1", "return true;", "true", "int[] nums", "nums", "static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }", "generateNArray", "{\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }", "int[] res = new int[n];", "res", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n res[i] = i + 1;\n }", "{\n res[i] = i + 1;\n }", "res[i] = i + 1", "res[i]", "res", "i", "i + 1", "i", "1", "return res;", "res", "int n", "n", "static private void print(String s) {\n System.out.println(s);\n }", "print", "{\n System.out.println(s);\n }", "System.out.println(s)", "System.out.println", "System.out", "System", "System.out", "s", "String s", "s", "static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }", "printArray", "{\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }", "for (int s: e) {\n System.out.print(s + \" \");\n }", "int s", "e", "{\n System.out.print(s + \" \");\n }", "{\n System.out.print(s + \" \");\n }", "System.out.print(s + \" \")", "System.out.print", "System.out", "System", "System.out", "s + \" \"", "s", "\" \"", "print(\"\")", "print", "\"\"", "int[] e", "e", "static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }", "log2", "{\n return (int)(Math.log(x) / Math.log(2));\n }", "return (int)(Math.log(x) / Math.log(2));", "(int)(Math.log(x) / Math.log(2))", "Math.log(x)", "Math.log", "Math", "x", "Math.log(2)", "Math.log", "Math", "2", "int x", "x", "static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }", "gcd", "{\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }", "if (m < n) { return gcd(n, m); }", "m < n", "m", "n", "{ return gcd(n, m); }", "return gcd(n, m);", "gcd(n, m)", "gcd", "n", "m", "if (m % n == 0) { return n; }", "m % n == 0", "m % n", "m", "n", "0", "{ return n; }", "return n;", "n", "return gcd(n, m%n);", "gcd(n, m%n)", "gcd", "n", "m%n", "m", "n", "long m", "m", "long n", "n", "static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }", "FastReader", "BufferedReader br;", "br", "StringTokenizer st;", "st", "public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "FastReader", "{\n br = new BufferedReader(new InputStreamReader(System.in));\n }", "br = new BufferedReader(new InputStreamReader(System.in))", "br", "new BufferedReader(new InputStreamReader(System.in))", "String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "next", "{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }", "while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "st == null || !st.hasMoreElements()", "st == null", "st", "null", "!st.hasMoreElements()", "st.hasMoreElements()", "st.hasMoreElements", "st", "{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n st = new StringTokenizer(br.readLine());\n }", "st = new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "nextLine", "{\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }", "String str = \"\";", "str", "\"\"", "try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }", "catch (IOException e) {\n e.printStackTrace();\n }", "IOException e", "{\n e.printStackTrace();\n }", "e.printStackTrace()", "e.printStackTrace", "e", "{\n str = br.readLine();\n }", "str = br.readLine()", "str", "br.readLine()", "br.readLine", "br", "return str;", "str", "public class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int k = sc.nextInt();\n int res = 0;\n int[] gcds = new int[k];\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }\n print(\"\" + res);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "public class Main {\n private static final int MOD = (int) Math.pow(10, 9);\n private static final long EIGHT = (long) 1e18;\n private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};\n\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n int k = sc.nextInt();\n int res = 0;\n int[] gcds = new int[k];\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n res += gcd((long)a, gcd((long)b, (long)c));\n }\n }\n }\n print(\"\" + res);\n }\n\n /*\n * Check if a * b is overflow or not\n */\n static Boolean isOverflowByMul(long a, long b) {\n if (a == 0 || b == 0) {\n return false;\n }\n\n long result = a * b;\n if (a == result / b) {\n return false;\n }\n return true;\n }\n\n static private void swap(int[] nums, int x, int y) {\n int tmp = nums[x];\n nums[x] = nums[y];\n nums[y] = tmp;\n }\n\n static private void reverse(int[] nums, int left, int right) {\n while (left < right) {\n swap(nums, left, right);\n left++;\n right--;\n }\n }\n\n static private boolean findNextPermutation(int[] nums) {\n if (nums.length <= 1) {\n return false;\n }\n\n int last = nums.length - 2;\n\n while (last >= 0) {\n if (nums[last] < nums[last + 1]){\n break;\n }\n last--;\n }\n\n if (last < 0) { return false; }\n int nextGenerater = nums.length - 1;\n\n for (int i = nums.length - 1; i > last; i--) {\n if (nums[i] > nums[last]) {\n nextGenerater = i;\n break;\n }\n }\n\n swap(nums, nextGenerater, last);\n reverse(nums, last + 1, nums.length - 1);\n return true;\n }\n\n static private int[] generateNArray(int n) {\n int[] res = new int[n];\n\n for (int i = 0; i < n; i++) {\n res[i] = i + 1;\n }\n\n return res;\n }\n\n static private void print(String s) {\n System.out.println(s);\n }\n\n static private void printArray(int[] e) {\n for (int s: e) {\n System.out.print(s + \" \");\n }\n print(\"\");\n }\n\n static private int log2(int x) {\n return (int)(Math.log(x) / Math.log(2));\n }\n\n static private long gcd(long m, long n) {\n if (m < n) { return gcd(n, m); }\n if (m % n == 0) { return n; }\n return gcd(n, m%n);\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try{\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { private static final int MOD = (int) Math.pow(10, 9); private static final long EIGHT = (long) 1e18; private static final int[][] DIRS = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}}; public static void main(String[] args) { FastReader sc = new FastReader(); int k = sc.nextInt(); int res = 0; int[] gcds = new int[k]; for (int a = 1; a <= k; a++) { for (int b = 1; b <= k; b++) { for (int c = 1; c <= k; c++) { res += gcd((long)a, gcd((long)b, (long)c)); } } } print("" + res); } /* * Check if a * b is overflow or not */ static Boolean isOverflowByMul(long a, long b) { if (a == 0 || b == 0) { return false; } long result = a * b; if (a == result / b) { return false; } return true; } static private void swap(int[] nums, int x, int y) { int tmp = nums[x]; nums[x] = nums[y]; nums[y] = tmp; } static private void reverse(int[] nums, int left, int right) { while (left < right) { swap(nums, left, right); left++; right--; } } static private boolean findNextPermutation(int[] nums) { if (nums.length <= 1) { return false; } int last = nums.length - 2; while (last >= 0) { if (nums[last] < nums[last + 1]){ break; } last--; } if (last < 0) { return false; } int nextGenerater = nums.length - 1; for (int i = nums.length - 1; i > last; i--) { if (nums[i] > nums[last]) { nextGenerater = i; break; } } swap(nums, nextGenerater, last); reverse(nums, last + 1, nums.length - 1); return true; } static private int[] generateNArray(int n) { int[] res = new int[n]; for (int i = 0; i < n; i++) { res[i] = i + 1; } return res; } static private void print(String s) { System.out.println(s); } static private void printArray(int[] e) { for (int s: e) { System.out.print(s + " "); } print(""); } static private int log2(int x) { return (int)(Math.log(x) / Math.log(2)); } static private long gcd(long m, long n) { if (m < n) { return gcd(n, m); } if (m % n == 0) { return n; } return gcd(n, m%n); } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 29, 4, 13, 13, 4, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 14, 2, 13, 17, 30, 29, 13, 30, 29, 4, 13, 13, 2, 13, 13, 30, 29, 4, 13, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 128, 5 ], [ 128, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 61, 65 ], [ 8, 66 ], [ 66, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 66, 71 ], [ 8, 72 ], [ 72, 73 ], [ 73, 74 ], [ 6, 75 ], [ 75, 76 ], [ 128, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 81, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 77, 88 ], [ 88, 89 ], [ 77, 90 ], [ 90, 91 ], [ 77, 92 ], [ 92, 93 ], [ 128, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 97, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 106, 107 ], [ 107, 108 ], [ 102, 109 ], [ 109, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 111, 114 ], [ 114, 115 ], [ 114, 116 ], [ 97, 117 ], [ 117, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 119, 122 ], [ 94, 123 ], [ 123, 124 ], [ 94, 125 ], [ 125, 126 ], [ 0, 127 ], [ 127, 128 ], [ 127, 129 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n\n long sum = 0;\n\n for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }\n\n System.out.println(sum);\n sc.close();\n }\n\n private static int gcd(int a, int b, int c){\n return gcd(a, gcd(b, c));\n }\n\n private static int gcd(int a, int b){\n if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\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\n int K = sc.nextInt();\n\n long sum = 0;\n\n for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }\n\n System.out.println(sum);\n sc.close();\n }\n\n private static int gcd(int a, int b, int c){\n return gcd(a, gcd(b, c));\n }\n\n private static int gcd(int a, int b){\n if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\n }\n\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n\n long sum = 0;\n\n for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }\n\n System.out.println(sum);\n sc.close();\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n\n long sum = 0;\n\n for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }\n\n System.out.println(sum);\n sc.close();\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "long sum = 0;", "sum", "0", "for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "{\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }", "{\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }", "for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "{\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }", "{\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }", "for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "{\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }", "{\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }", "sum += gcd(i, j, k)", "sum", "gcd(i, j, k)", "gcd", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "sc.close()", "sc.close", "sc", "String[] args", "args", "private static int gcd(int a, int b, int c){\n return gcd(a, gcd(b, c));\n }", "gcd", "{\n return gcd(a, gcd(b, c));\n }", "return gcd(a, gcd(b, c));", "gcd(a, gcd(b, c))", "gcd", "a", "gcd(b, c)", "gcd", "b", "c", "int a", "a", "int b", "b", "int c", "c", "private static int gcd(int a, int b){\n if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\n }\n\n }", "gcd", "{\n if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\n }\n\n }", "if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\n }", "a >= b", "a", "b", "{\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n }", "if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }", "b == 0", "b", "0", "{\n return a;\n }", "return a;", "a", "{\n return gcd(b, a%b);\n }", "return gcd(b, a%b);", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "{\n return gcd(b, a);\n }", "return gcd(b, a);", "gcd(b, a)", "gcd", "b", "a", "int a", "a", "int b", "b", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n\n long sum = 0;\n\n for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }\n\n System.out.println(sum);\n sc.close();\n }\n\n private static int gcd(int a, int b, int c){\n return gcd(a, gcd(b, c));\n }\n\n private static int gcd(int a, int b){\n if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\n }\n\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int K = sc.nextInt();\n\n long sum = 0;\n\n for(int i = 1; i <= K; i++){\n for(int j = 1; j <= K; j++){\n for(int k = 1; k <= K; k++){\n // System.out.printf(\"%d %d %d %d\\n\", i, j, k, gcd(i, j, k));\n sum += gcd(i, j, k);\n }\n }\n }\n\n System.out.println(sum);\n sc.close();\n }\n\n private static int gcd(int a, int b, int c){\n return gcd(a, gcd(b, c));\n }\n\n private static int gcd(int a, int b){\n if(a >= b){\n if(b == 0){\n return a;\n } else {\n return gcd(b, a%b);\n }\n } else {\n return gcd(b, a);\n }\n\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int K = sc.nextInt(); long sum = 0; for(int i = 1; i <= K; i++){ for(int j = 1; j <= K; j++){ for(int k = 1; k <= K; k++){ // System.out.printf("%d %d %d %d\n", i, j, k, gcd(i, j, k)); sum += gcd(i, j, k); } } } System.out.println(sum); sc.close(); } private static int gcd(int a, int b, int c){ return gcd(a, gcd(b, c)); } private static int gcd(int a, int b){ if(a >= b){ if(b == 0){ return a; } else { return gcd(b, a%b); } } else { return gcd(b, a); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 6, 77 ], [ 77, 78 ], [ 103, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 84, 85 ], [ 84, 86 ], [ 83, 87 ], [ 82, 88 ], [ 88, 89 ], [ 89, 90 ], [ 81, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 79, 98 ], [ 98, 99 ], [ 79, 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 s = new Scanner(System.in);\n int K = s.nextInt();\n int gcd = 0;\n\n for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }\n\n System.out.println(gcd);\n s.close();\n }\n\n public static int gcd(int p, int q) {\n if (p % q == 0) {\n return q;\n }\n return gcd(q, p % q);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n int gcd = 0;\n\n for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }\n\n System.out.println(gcd);\n s.close();\n }\n\n public static int gcd(int p, int q) {\n if (p % q == 0) {\n return q;\n }\n return gcd(q, p % q);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n int gcd = 0;\n\n for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }\n\n System.out.println(gcd);\n s.close();\n }", "main", "{\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n int gcd = 0;\n\n for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }\n\n System.out.println(gcd);\n s.close();\n }", "Scanner s = new Scanner(System.in);", "s", "new Scanner(System.in)", "int K = s.nextInt();", "K", "s.nextInt()", "s.nextInt", "s", "int gcd = 0;", "gcd", "0", "for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "{\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }", "{\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }", "for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "{\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }", "{\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }", "for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "{\n gcd += gcd(gcd(j, k), i);\n }", "{\n gcd += gcd(gcd(j, k), i);\n }", "gcd += gcd(gcd(j, k), i)", "gcd", "gcd(gcd(j, k), i)", "gcd", "gcd(j, k)", "gcd", "j", "k", "i", "System.out.println(gcd)", "System.out.println", "System.out", "System", "System.out", "gcd", "s.close()", "s.close", "s", "String[] args", "args", "public static int gcd(int p, int q) {\n if (p % q == 0) {\n return q;\n }\n return gcd(q, p % q);\n }", "gcd", "{\n if (p % q == 0) {\n return q;\n }\n return gcd(q, p % q);\n }", "if (p % q == 0) {\n return q;\n }", "p % q == 0", "p % q", "p", "q", "0", "{\n return q;\n }", "return q;", "q", "return gcd(q, p % q);", "gcd(q, p % q)", "gcd", "q", "p % q", "p", "q", "int p", "p", "int q", "q", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n int gcd = 0;\n\n for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }\n\n System.out.println(gcd);\n s.close();\n }\n\n public static int gcd(int p, int q) {\n if (p % q == 0) {\n return q;\n }\n return gcd(q, p % q);\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int K = s.nextInt();\n int gcd = 0;\n\n for (int i = 1; i <= K; i++) {\n for (int j = 1; j <= K; j++) {\n for (int k = 1; k <= K; k++) {\n gcd += gcd(gcd(j, k), i);\n }\n }\n }\n\n System.out.println(gcd);\n s.close();\n }\n\n public static int gcd(int p, int q) {\n if (p % q == 0) {\n return q;\n }\n return gcd(q, p % q);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int K = s.nextInt(); int gcd = 0; for (int i = 1; i <= K; i++) { for (int j = 1; j <= K; j++) { for (int k = 1; k <= K; k++) { gcd += gcd(gcd(j, k), i); } } } System.out.println(gcd); s.close(); } public static int gcd(int p, int q) { if (p % q == 0) { return q; } return gcd(q, p % q); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 29, 4, 13, 13, 4, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 2, 13, 17, 2, 13, 17, 29, 17, 14, 2, 13, 13, 29, 13, 14, 2, 13, 13, 29, 4, 13, 13, 2, 13, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 13, 13, 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 ], [ 10, 12 ], [ 10, 13 ], [ 13, 14 ], [ 13, 15 ], [ 13, 16 ], [ 6, 17 ], [ 17, 18 ], [ 6, 19 ], [ 19, 20 ], [ 6, 21 ], [ 21, 22 ], [ 4, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 27, 28 ], [ 28, 29 ], [ 28, 30 ], [ 27, 31 ], [ 31, 32 ], [ 31, 33 ], [ 26, 34 ], [ 34, 35 ], [ 25, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 36, 40 ], [ 40, 41 ], [ 25, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 42, 46 ], [ 46, 47 ], [ 47, 48 ], [ 47, 49 ], [ 47, 50 ], [ 50, 51 ], [ 50, 52 ], [ 42, 53 ], [ 53, 54 ], [ 54, 55 ], [ 54, 56 ], [ 56, 57 ], [ 56, 58 ], [ 54, 59 ], [ 23, 60 ], [ 60, 61 ], [ 23, 62 ], [ 62, 63 ], [ 4, 64 ], [ 64, 65 ], [ 64, 66 ], [ 66, 67 ], [ 67, 68 ], [ 67, 69 ], [ 66, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 73, 74 ], [ 66, 75 ], [ 75, 76 ], [ 75, 77 ], [ 66, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 80, 82 ], [ 78, 83 ], [ 83, 84 ], [ 83, 85 ], [ 78, 86 ], [ 86, 87 ], [ 87, 88 ], [ 78, 89 ], [ 89, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 95, 96 ], [ 95, 97 ], [ 90, 98 ], [ 98, 99 ], [ 99, 100 ], [ 90, 101 ], [ 101, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 102, 110 ], [ 110, 111 ], [ 111, 112 ], [ 102, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 116, 117 ], [ 116, 118 ], [ 116, 119 ], [ 116, 120 ], [ 66, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 121, 126 ], [ 64, 127 ], [ 127, 128 ] ]
[ "import java.util.*;\n\nclass Main {\n\t\n\tprivate static int mcd(int a, int b, int c){\n\t\treturn mcd(a, mcd(b, c));\n\t}\n\t\n\tprivate static int mcd(int a, int b){\n\t\tif(a==1 || b==1) return 1; \n\t\tif(a==b) return a;\n\t\tif(a<b) return mcd(a, b-a);\n\t\telse return mcd(a-b, b);\n\t}\n\t\n\tpublic static void main(String... args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tlong somma = 0;\n\t\tfor(int a=1; a<=K; ++a)\n\t\t\tfor(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);\n\t\tSystem.out.print(somma);\n\t}\n}", "import java.util.*;", "util.*", "java", "class Main {\n\t\n\tprivate static int mcd(int a, int b, int c){\n\t\treturn mcd(a, mcd(b, c));\n\t}\n\t\n\tprivate static int mcd(int a, int b){\n\t\tif(a==1 || b==1) return 1; \n\t\tif(a==b) return a;\n\t\tif(a<b) return mcd(a, b-a);\n\t\telse return mcd(a-b, b);\n\t}\n\t\n\tpublic static void main(String... args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tlong somma = 0;\n\t\tfor(int a=1; a<=K; ++a)\n\t\t\tfor(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);\n\t\tSystem.out.print(somma);\n\t}\n}", "Main", "private static int mcd(int a, int b, int c){\n\t\treturn mcd(a, mcd(b, c));\n\t}", "mcd", "{\n\t\treturn mcd(a, mcd(b, c));\n\t}", "return mcd(a, mcd(b, c));", "mcd(a, mcd(b, c))", "mcd", "a", "mcd(b, c)", "mcd", "b", "c", "int a", "a", "int b", "b", "int c", "c", "private static int mcd(int a, int b){\n\t\tif(a==1 || b==1) return 1; \n\t\tif(a==b) return a;\n\t\tif(a<b) return mcd(a, b-a);\n\t\telse return mcd(a-b, b);\n\t}", "mcd", "{\n\t\tif(a==1 || b==1) return 1; \n\t\tif(a==b) return a;\n\t\tif(a<b) return mcd(a, b-a);\n\t\telse return mcd(a-b, b);\n\t}", "if(a==1 || b==1) return 1;", "a==1 || b==1", "a==1", "a", "1", "b==1", "b", "1", "return 1;", "1", "if(a==b) return a;", "a==b", "a", "b", "return a;", "a", "if(a<b) return mcd(a, b-a);\n\t\telse return mcd(a-b, b);", "a<b", "a", "b", "return mcd(a, b-a);", "mcd(a, b-a)", "mcd", "a", "b-a", "b", "a", "return mcd(a-b, b);", "mcd(a-b, b)", "mcd", "a-b", "a", "b", "b", "int a", "a", "int b", "b", "public static void main(String... args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tlong somma = 0;\n\t\tfor(int a=1; a<=K; ++a)\n\t\t\tfor(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);\n\t\tSystem.out.print(somma);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint K = sc.nextInt();\n\t\tlong somma = 0;\n\t\tfor(int a=1; a<=K; ++a)\n\t\t\tfor(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);\n\t\tSystem.out.print(somma);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "long somma = 0;", "somma", "0", "for(int a=1; a<=K; ++a)\n\t\t\tfor(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);", "int a=1;", "int a=1;", "a", "1", "a<=K", "a", "K", "++a", "++a", "a", "for(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);", "for(int b=1; b<=K; ++b)\n\t\t\t\tfor(int c=1; c<=K; ++c) somma+=mcd(a, b, c);", "int b=1;", "int b=1;", "b", "1", "b<=K", "b", "K", "++b", "++b", "b", "for(int c=1; c<=K; ++c) somma+=mcd(a, b, c);", "for(int c=1; c<=K; ++c) somma+=mcd(a, b, c);", "int c=1;", "int c=1;", "c", "1", "c<=K", "c", "K", "++c", "++c", "c", "somma+=mcd(a, b, c);", "somma+=mcd(a, b, c)", "somma", "mcd(a, b, c)", "mcd", "a", "b", "c", "System.out.print(somma)", "System.out.print", "System.out", "System", "System.out", "somma", "String... args", "args" ]
import java.util.*; class Main { private static int mcd(int a, int b, int c){ return mcd(a, mcd(b, c)); } private static int mcd(int a, int b){ if(a==1 || b==1) return 1; if(a==b) return a; if(a<b) return mcd(a, b-a); else return mcd(a-b, b); } public static void main(String... args){ Scanner sc = new Scanner(System.in); int K = sc.nextInt(); long somma = 0; for(int a=1; a<=K; ++a) for(int b=1; b<=K; ++b) for(int c=1; c<=K; ++c) somma+=mcd(a, b, c); System.out.print(somma); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 118, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 81, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 85, 89 ], [ 89, 90 ], [ 89, 91 ], [ 85, 92 ], [ 92, 93 ], [ 92, 94 ], [ 78, 95 ], [ 95, 96 ], [ 96, 97 ], [ 96, 98 ], [ 95, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 102, 104 ], [ 99, 105 ], [ 105, 106 ], [ 105, 107 ], [ 99, 108 ], [ 108, 109 ], [ 108, 110 ], [ 78, 111 ], [ 111, 112 ], [ 76, 113 ], [ 113, 114 ], [ 76, 115 ], [ 115, 116 ], [ 0, 117 ], [ 117, 118 ], [ 117, 119 ] ]
[ "\n\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int result = 0;\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 result += euclid(j,euclid(k,i));\n }\n }\n }\n System.out.println(result);\n }\n\n private static int euclid(int m, int n) {\n int tmp;\n\n if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }\n while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }\n return m;\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 = sc.nextInt();\n int result = 0;\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 result += euclid(j,euclid(k,i));\n }\n }\n }\n System.out.println(result);\n }\n\n private static int euclid(int m, int n) {\n int tmp;\n\n if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }\n while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }\n return m;\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int result = 0;\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 result += euclid(j,euclid(k,i));\n }\n }\n }\n System.out.println(result);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int result = 0;\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 result += euclid(j,euclid(k,i));\n }\n }\n }\n System.out.println(result);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int result = 0;", "result", "0", "for(int i = 1; i <= n; i++) {\n for(int j = 1; j <= n; j++) {\n for(int k = 1; k <= n; k++) {\n result += euclid(j,euclid(k,i));\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 result += euclid(j,euclid(k,i));\n }\n }\n }", "{\n for(int j = 1; j <= n; j++) {\n for(int k = 1; k <= n; k++) {\n result += euclid(j,euclid(k,i));\n }\n }\n }", "for(int j = 1; j <= n; j++) {\n for(int k = 1; k <= n; k++) {\n result += euclid(j,euclid(k,i));\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 result += euclid(j,euclid(k,i));\n }\n }", "{\n for(int k = 1; k <= n; k++) {\n result += euclid(j,euclid(k,i));\n }\n }", "for(int k = 1; k <= n; k++) {\n result += euclid(j,euclid(k,i));\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n result += euclid(j,euclid(k,i));\n }", "{\n result += euclid(j,euclid(k,i));\n }", "result += euclid(j,euclid(k,i))", "result", "euclid(j,euclid(k,i))", "euclid", "j", "euclid(k,i)", "euclid", "k", "i", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "private static int euclid(int m, int n) {\n int tmp;\n\n if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }\n while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }\n return m;\n }", "euclid", "{\n int tmp;\n\n if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }\n while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }\n return m;\n }", "int tmp;", "tmp", "if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }", "m < n", "m", "n", "{\n tmp = m;\n m = n;\n n = tmp;\n }", "tmp = m", "tmp", "m", "m = n", "m", "n", "n = tmp", "n", "tmp", "while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }", "n > 0", "n", "0", "{\n tmp = m % n;\n m = n;\n n = tmp;\n }", "tmp = m % n", "tmp", "m % n", "m", "n", "m = n", "m", "n", "n = tmp", "n", "tmp", "return m;", "m", "int m", "m", "int n", "n", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int result = 0;\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 result += euclid(j,euclid(k,i));\n }\n }\n }\n System.out.println(result);\n }\n\n private static int euclid(int m, int n) {\n int tmp;\n\n if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }\n while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }\n return m;\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int result = 0;\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 result += euclid(j,euclid(k,i));\n }\n }\n }\n System.out.println(result);\n }\n\n private static int euclid(int m, int n) {\n int tmp;\n\n if(m < n) {\n tmp = m;\n m = n;\n n = tmp;\n }\n while(n > 0){\n tmp = m % n;\n m = n;\n n = tmp;\n }\n return m;\n }\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 result = 0; for(int i = 1; i <= n; i++) { for(int j = 1; j <= n; j++) { for(int k = 1; k <= n; k++) { result += euclid(j,euclid(k,i)); } } } System.out.println(result); } private static int euclid(int m, int n) { int tmp; if(m < n) { tmp = m; m = n; n = tmp; } while(n > 0){ tmp = m % n; m = n; n = tmp; } return m; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 20, 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 4, 18, 13, 4, 13, 13, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 2, 13, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 160, 23 ], [ 160, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 27, 29 ], [ 26, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 26, 35 ], [ 35, 36 ], [ 35, 37 ], [ 26, 38 ], [ 38, 39 ], [ 38, 40 ], [ 26, 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 ], [ 56, 61 ], [ 61, 62 ], [ 61, 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 ], [ 71, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 78, 80 ], [ 71, 81 ], [ 81, 82 ], [ 82, 83 ], [ 71, 84 ], [ 85, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 85, 92 ], [ 92, 93 ], [ 93, 94 ], [ 92, 95 ], [ 95, 96 ], [ 95, 97 ], [ 95, 98 ], [ 26, 99 ], [ 99, 100 ], [ 99, 101 ], [ 26, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 102, 107 ], [ 107, 108 ], [ 107, 109 ], [ 110, 110 ], [ 110, 111 ], [ 110, 112 ], [ 110, 113 ], [ 102, 114 ], [ 114, 115 ], [ 115, 116 ], [ 102, 117 ], [ 118, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 121, 124 ], [ 26, 125 ], [ 125, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 125, 130 ], [ 24, 131 ], [ 131, 132 ], [ 160, 133 ], [ 133, 134 ], [ 133, 135 ], [ 135, 136 ], [ 136, 137 ], [ 135, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 142, 143 ], [ 142, 144 ], [ 139, 145 ], [ 138, 146 ], [ 146, 147 ], [ 147, 148 ], [ 147, 149 ], [ 146, 150 ], [ 150, 151 ], [ 150, 152 ], [ 135, 153 ], [ 153, 154 ], [ 133, 155 ], [ 155, 156 ], [ 133, 157 ], [ 157, 158 ], [ 0, 159 ], [ 159, 160 ], [ 159, 161 ] ]
[ "import java.io.BufferedReader;\nimport java.io.*;\nimport java.util.*;\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Collections;\npublic class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int m = 0;\n List<Integer> list = new ArrayList<>();\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }\n int sum = 0;\n for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n \n}\n\nstatic int gcd (int a, int b) {\n\tint temp;\n\twhile((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}\n\treturn b;\n}\n\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Iterator;", "Iterator", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Collections;", "Collections", "java.util", "public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int m = 0;\n List<Integer> list = new ArrayList<>();\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }\n int sum = 0;\n for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n \n}\n\nstatic int gcd (int a, int b) {\n\tint temp;\n\twhile((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}\n\treturn b;\n}\n\n\n}", "Main", "public static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int m = 0;\n List<Integer> list = new ArrayList<>();\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }\n int sum = 0;\n for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n \n}", "main", "{\n \n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int m = 0;\n List<Integer> list = new ArrayList<>();\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }\n int sum = 0;\n for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n \n}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int m = 0;", "m", "0", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < k + 1", "i", "k + 1", "k", "1", "i++", "i++", "i", "{\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }", "{\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }", "for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j < k + 1", "j", "k + 1", "k", "1", "j++", "j++", "j", "{\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }", "{\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }", "for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }", "int l = 1;", "int l = 1;", "l", "1", "l < k + 1", "l", "k + 1", "k", "1", "l++", "l++", "l", "{\n m = gcd(i,j);\n list.add(gcd(m,l));\n }", "{\n m = gcd(i,j);\n list.add(gcd(m,l));\n }", "m = gcd(i,j)", "m", "gcd(i,j)", "gcd", "i", "j", "list.add(gcd(m,l))", "list.add", "list", "gcd(m,l)", "gcd", "m", "l", "int sum = 0;", "sum", "0", "for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }", "int i = 0 ;", "int i = 0 ;", "i", "0", "i < k*k*k", "i", "k*k*k", "k*k*k", "k", "k", "k", "i++", "i++", "i", "{\n sum += list.get(i);\n }", "{\n sum += list.get(i);\n }", "sum += list.get(i)", "sum", "list.get(i)", "list.get", "list", "i", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "final String[] args", "args", "static int gcd (int a, int b) {\n\tint temp;\n\twhile((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}\n\treturn b;\n}", "gcd", "{\n\tint temp;\n\twhile((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}\n\treturn b;\n}", "int temp;", "temp", "while((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}", "(temp = a%b)!=0", "(temp = a%b)", "temp", "a%b", "a", "b", "0", "{\n\t\ta = b;\n\t\tb = temp;\n\t}", "a = b", "a", "b", "b = temp", "b", "temp", "return b;", "b", "int a", "a", "int b", "b", "public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int m = 0;\n List<Integer> list = new ArrayList<>();\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }\n int sum = 0;\n for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n \n}\n\nstatic int gcd (int a, int b) {\n\tint temp;\n\twhile((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}\n\treturn b;\n}\n\n\n}", "public class Main {\n\tpublic static void main(final String[] args){\n \n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int m = 0;\n List<Integer> list = new ArrayList<>();\n for(int i = 1; i < k + 1; i++){\n for(int j = 1; j < k + 1; j++){\n for(int l = 1; l < k + 1; l++){\n m = gcd(i,j);\n list.add(gcd(m,l));\n }\n }\n }\n int sum = 0;\n for(int i = 0 ; i < k*k*k ; i++){\n sum += list.get(i);\n }\n System.out.println(sum);\n \n}\n\nstatic int gcd (int a, int b) {\n\tint temp;\n\twhile((temp = a%b)!=0) {\n\t\ta = b;\n\t\tb = temp;\n\t}\n\treturn b;\n}\n\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.*; import java.util.*; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Collections; public class Main { public static void main(final String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int m = 0; List<Integer> list = new ArrayList<>(); for(int i = 1; i < k + 1; i++){ for(int j = 1; j < k + 1; j++){ for(int l = 1; l < k + 1; l++){ m = gcd(i,j); list.add(gcd(m,l)); } } } int sum = 0; for(int i = 0 ; i < k*k*k ; i++){ sum += list.get(i); } System.out.println(sum); } static int gcd (int a, int b) { int temp; while((temp = a%b)!=0) { a = b; b = temp; } return b; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 11, 1, 41, 13, 13, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 4, 13, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 30, 0, 13, 13, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 30, 0, 13, 2, 17, 13, 30, 0, 13, 2, 17, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 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 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 58, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 69, 73 ], [ 73, 74 ], [ 73, 75 ], [ 68, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 68, 80 ], [ 80, 81 ], [ 82, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 82, 86 ], [ 86, 87 ], [ 86, 88 ], [ 82, 89 ], [ 89, 90 ], [ 89, 91 ], [ 80, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 95, 96 ], [ 95, 97 ], [ 80, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 101, 102 ], [ 101, 103 ], [ 8, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 104, 109 ], [ 6, 110 ], [ 110, 111 ], [ 134, 112 ], [ 112, 113 ], [ 112, 114 ], [ 114, 115 ], [ 115, 116 ], [ 116, 117 ], [ 116, 118 ], [ 115, 119 ], [ 119, 120 ], [ 120, 121 ], [ 114, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 123, 126 ], [ 126, 127 ], [ 126, 128 ], [ 112, 129 ], [ 129, 130 ], [ 112, 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 k = sc.nextInt();\n int answer = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }\n System.out.println(answer);\n }\n\n static int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\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 k = sc.nextInt();\n int answer = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }\n System.out.println(answer);\n }\n\n static int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int answer = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }\n System.out.println(answer);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int answer = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }\n System.out.println(answer);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int answer = 0;", "answer", "0", "for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }", "{\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }", "for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }", "int b = a;", "int b = a;", "b", "a", "b <= k", "b", "k", "b++", "b++", "b", "{\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }", "{\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }", "for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }", "int c = b;", "int c = b;", "c", "b", "c <= k", "c", "k", "c++", "c++", "c", "{\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }", "{\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }", "int gcd = gcd(a, gcd(b, c));", "gcd", "gcd(a, gcd(b, c))", "gcd", "a", "gcd(b, c)", "gcd", "b", "c", "if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }", "a == b && b == c", "a == b", "a", "b", "b == c", "b", "c", "{\n answer += gcd;\n }", "answer += gcd", "answer", "gcd", "if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }", "a == b || a == c || b == c", "a == b || a == c || b == c", "a == b", "a", "b", "a == c", "a", "c", "b == c", "b", "c", "{\n answer += 3 * gcd;\n }", "answer += 3 * gcd", "answer", "3 * gcd", "3", "gcd", "{\n answer += 6 * gcd;\n }", "answer += 6 * gcd", "answer", "6 * gcd", "6", "gcd", "System.out.println(answer)", "System.out.println", "System.out", "System", "System.out", "answer", "String[] args", "args", "static int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }", "gcd", "{\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }", "if (b == 0) {\n return a;\n }", "b == 0", "b", "0", "{\n return a;\n }", "return a;", "a", "return gcd(b, a % b);", "gcd(b, a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int answer = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }\n System.out.println(answer);\n }\n\n static int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n int answer = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = a; b <= k; b++) {\n for (int c = b; c <= k; c++) {\n int gcd = gcd(a, gcd(b, c));\n if (a == b && b == c) {\n answer += gcd;\n } else if (a == b || a == c || b == c) {\n answer += 3 * gcd;\n } else {\n answer += 6 * gcd;\n }\n }\n }\n }\n System.out.println(answer);\n }\n\n static int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int answer = 0; for (int a = 1; a <= k; a++) { for (int b = a; b <= k; b++) { for (int c = b; c <= k; c++) { int gcd = gcd(a, gcd(b, c)); if (a == b && b == c) { answer += gcd; } else if (a == b || a == c || b == c) { answer += 3 * gcd; } else { answer += 6 * gcd; } } } } System.out.println(answer); } static int gcd(int a, int b) { if (b == 0) { return a; } return gcd(b, a % b); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 42, 2, 13, 17, 30, 41, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 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 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 16, 17 ], [ 16, 18 ], [ 13, 19 ], [ 19, 20 ], [ 19, 21 ], [ 13, 22 ], [ 22, 23 ], [ 22, 24 ], [ 8, 25 ], [ 25, 26 ], [ 6, 27 ], [ 27, 28 ], [ 6, 29 ], [ 29, 30 ], [ 4, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 33, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 33, 42 ], [ 42, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 33, 47 ], [ 47, 48 ], [ 47, 49 ], [ 33, 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 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 91, 97 ], [ 33, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 31, 104 ], [ 104, 105 ] ]
[ "import java.util.Scanner;\n\nclass Main {\n\n static int gcd(int x,int y){\n while(y!=0){\n int r=x%y;\n x=y;\n y=r;\n }\n return x;\n }\n\n public static void main(String[] args) {\n Scanner stdIn=new Scanner(System.in);\n \n int x=stdIn.nextInt();\n System.out.println();\n int sum=0;\n for(int i=1; i<=x; i++){\n for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n \n \n \n \n }\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "class Main {\n\n static int gcd(int x,int y){\n while(y!=0){\n int r=x%y;\n x=y;\n y=r;\n }\n return x;\n }\n\n public static void main(String[] args) {\n Scanner stdIn=new Scanner(System.in);\n \n int x=stdIn.nextInt();\n System.out.println();\n int sum=0;\n for(int i=1; i<=x; i++){\n for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n \n \n \n \n }\n\n}", "Main", "static int gcd(int x,int y){\n while(y!=0){\n int r=x%y;\n x=y;\n y=r;\n }\n return x;\n }", "gcd", "{\n while(y!=0){\n int r=x%y;\n x=y;\n y=r;\n }\n return x;\n }", "while(y!=0){\n int r=x%y;\n x=y;\n y=r;\n }", "y!=0", "y", "0", "{\n int r=x%y;\n x=y;\n y=r;\n }", "int r=x%y;", "r", "x%y", "x", "y", "x=y", "x", "y", "y=r", "y", "r", "return x;", "x", "int x", "x", "int y", "y", "public static void main(String[] args) {\n Scanner stdIn=new Scanner(System.in);\n \n int x=stdIn.nextInt();\n System.out.println();\n int sum=0;\n for(int i=1; i<=x; i++){\n for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n \n \n \n \n }", "main", "{\n Scanner stdIn=new Scanner(System.in);\n \n int x=stdIn.nextInt();\n System.out.println();\n int sum=0;\n for(int i=1; i<=x; i++){\n for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n \n \n \n \n }", "Scanner stdIn=new Scanner(System.in);", "stdIn", "new Scanner(System.in)", "int x=stdIn.nextInt();", "x", "stdIn.nextInt()", "stdIn.nextInt", "stdIn", "System.out.println()", "System.out.println", "System.out", "System", "System.out", "int sum=0;", "sum", "0", "for(int i=1; i<=x; i++){\n for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\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 for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }\n }", "{\n for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }\n }", "for(int j=1; j<=x; j++){\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=x", "j", "x", "j++", "j++", "j", "{\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }", "{\n for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }\n }", "for(int k=1; k<=x; k++){\n sum+=gcd(gcd(i,j),k);\n }", "int k=1;", "int k=1;", "k", "1", "k<=x", "k", "x", "k++", "k++", "k", "{\n sum+=gcd(gcd(i,j),k);\n }", "{\n sum+=gcd(gcd(i,j),k);\n }", "sum+=gcd(gcd(i,j),k)", "sum", "gcd(gcd(i,j),k)", "gcd", "gcd(i,j)", "gcd", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args" ]
import java.util.Scanner; class Main { static int gcd(int x,int y){ while(y!=0){ int r=x%y; x=y; y=r; } return x; } public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); int x=stdIn.nextInt(); System.out.println(); int sum=0; for(int i=1; i<=x; i++){ for(int j=1; j<=x; j++){ for(int k=1; k<=x; k++){ sum+=gcd(gcd(i,j),k); } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 20, 11, 1, 41, 13, 13, 2, 13, 17, 1, 40, 13, 30, 30, 14, 2, 2, 13, 13, 17, 30, 4, 18, 13, 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, 17, 2, 13, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 18, 13, 4, 18, 13, 13, 13, 13, 28, 13, 4, 18, 13, 2, 13, 17, 30, 30, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 30, 0, 13, 13, 3, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 159, 5 ], [ 159, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 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 ], [ 36, 44 ], [ 44, 45 ], [ 45, 46 ], [ 36, 47 ], [ 48, 48 ], [ 48, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 51, 53 ], [ 50, 54 ], [ 49, 55 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 56, 59 ], [ 32, 60 ], [ 60, 61 ], [ 61, 62 ], [ 60, 63 ], [ 8, 64 ], [ 64, 65 ], [ 64, 66 ], [ 8, 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 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 108, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 111, 115 ], [ 108, 116 ], [ 105, 117 ], [ 117, 118 ], [ 117, 119 ], [ 119, 120 ], [ 120, 121 ], [ 119, 122 ], [ 122, 123 ], [ 122, 124 ], [ 117, 125 ], [ 126, 126 ], [ 126, 127 ], [ 127, 128 ], [ 129, 129 ], [ 129, 130 ], [ 130, 131 ], [ 131, 132 ], [ 131, 133 ], [ 130, 134 ], [ 129, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 129, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 127, 145 ], [ 145, 146 ], [ 146, 147 ], [ 146, 148 ], [ 145, 149 ], [ 8, 150 ], [ 150, 151 ], [ 151, 152 ], [ 152, 153 ], [ 152, 154 ], [ 150, 155 ], [ 6, 156 ], [ 156, 157 ], [ 0, 158 ], [ 158, 159 ], [ 158, 160 ] ]
[ "import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);\n\n for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }\n\n long sum = 0;\n for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }\n\n System.out.println(sum);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);\n\n for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }\n\n long sum = 0;\n for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }\n\n System.out.println(sum);\n }\n}", "Main", "public static void main(String[] args) {\n // write your code here\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);\n\n for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }\n\n long sum = 0;\n for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }\n\n System.out.println(sum);\n }", "main", "{\n // write your code here\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);\n\n for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }\n\n long sum = 0;\n for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }\n\n System.out.println(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);", "divisors", "new ArrayList<>(k)", "for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }", "{\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }", "ArrayList<Integer> divs = new ArrayList<>();", "divs", "new ArrayList<>()", "for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }", "int j = k ;", "int j = k ;", "j", "k", "j >= 1", "j", "1", "j--", "j--", "j", "{\n if((i % j) == 0){\n divs.add(j);\n }\n }", "{\n if((i % j) == 0){\n divs.add(j);\n }\n }", "if((i % j) == 0){\n divs.add(j);\n }", "(i % j) == 0", "(i % j)", "i", "j", "0", "{\n divs.add(j);\n }", "divs.add(j)", "divs.add", "divs", "j", "divisors.add(divs)", "divisors.add", "divisors", "divs", "long sum = 0;", "sum", "0", "for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }", "int i = 1 ;", "int i = 1 ;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }", "{\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }", "for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }", "int j = 1 ;", "int j = 1 ;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "{\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }", "{\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }", "for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }", "int l = 1 ;", "int l = 1 ;", "l", "1", "l <= k", "l", "k", "l++", "l++", "l", "{\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }", "{\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }", "int m = Math.min(Math.min(i,j),l);", "m", "Math.min(Math.min(i,j),l)", "Math.min", "Math", "Math.min(i,j)", "Math.min", "Math", "i", "j", "l", "for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }", "int d", "divisors.get(m-1)", "divisors.get", "divisors", "m-1", "m", "1", "{\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }", "{\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }", "if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }", "(i % d) == 0 && (j % d) == 0 && (l % d) == 0", "(i % d) == 0 && (j % d) == 0 && (l % d) == 0", "(i % d) == 0", "(i % d)", "i", "d", "0", "(j % d) == 0", "(j % d)", "j", "d", "0", "(l % d) == 0", "(l % d)", "l", "d", "0", "{\n sum += d;\n break;\n }", "sum += d", "sum", "d", "break;", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);\n\n for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }\n\n long sum = 0;\n for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }\n\n System.out.println(sum);\n }\n}", "public class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k);\n\n for(int i = 1 ; i <= k ; i++){\n ArrayList<Integer> divs = new ArrayList<>();\n for(int j = k ; j >= 1 ; j--){\n if((i % j) == 0){\n divs.add(j);\n }\n }\n divisors.add(divs);\n }\n\n long sum = 0;\n for(int i = 1 ; i <= k ; i++){\n for(int j = 1 ; j <= k ; j++){\n for(int l = 1 ; l <= k ; l++){\n int m = Math.min(Math.min(i,j),l);\n for(int d : divisors.get(m-1)){\n if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){\n sum += d;\n break;\n }\n }\n }\n }\n }\n\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { // write your code here Scanner sc = new Scanner(System.in); int k = sc.nextInt(); ArrayList<ArrayList<Integer>> divisors = new ArrayList<>(k); for(int i = 1 ; i <= k ; i++){ ArrayList<Integer> divs = new ArrayList<>(); for(int j = k ; j >= 1 ; j--){ if((i % j) == 0){ divs.add(j); } } divisors.add(divs); } long sum = 0; for(int i = 1 ; i <= k ; i++){ for(int j = 1 ; j <= k ; j++){ for(int l = 1 ; l <= k ; l++){ int m = Math.min(Math.min(i,j),l); for(int d : divisors.get(m-1)){ if((i % d) == 0 && (j % d) == 0 && (l % d) == 0){ sum += d; break; } } } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 13, 29, 13, 23, 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 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 58, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 67, 70 ], [ 8, 71 ], [ 71, 72 ], [ 72, 73 ], [ 73, 74 ], [ 73, 75 ], [ 71, 76 ], [ 6, 77 ], [ 77, 78 ], [ 106, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 85, 91 ], [ 84, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 96, 97 ], [ 96, 98 ], [ 81, 99 ], [ 99, 100 ], [ 79, 101 ], [ 101, 102 ], [ 79, 103 ], [ 103, 104 ], [ 0, 105 ], [ 105, 106 ], [ 105, 107 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint max = sc.nextInt();\n \tint sum = 0;\n \n for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }\n System.out.println(sum);\n\t}\n \n \t private static int gcd(int x,int y) {\n int tmp;\n while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint max = sc.nextInt();\n \tint sum = 0;\n \n for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }\n System.out.println(sum);\n\t}\n \n \t private static int gcd(int x,int y) {\n int tmp;\n while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "Main", "public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint max = sc.nextInt();\n \tint sum = 0;\n \n for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }\n System.out.println(sum);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n \tint max = sc.nextInt();\n \tint sum = 0;\n \n for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }\n System.out.println(sum);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int max = sc.nextInt();", "max", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }", "int a=1;", "int a=1;", "a", "1", "a<=max", "a", "max", "a++", "a++", "a", "{\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }", "{\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }", "for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }", "int b=1;", "int b=1;", "b", "1", "b<=max", "b", "max", "b++", "b++", "b", "{\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }", "{\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }", "for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }", "int c=1;", "int c=1;", "c", "1", "c<=max", "c", "max", "c++", "c++", "c", "{\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }", "{\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }", "int tmp = gcd(b,c);", "tmp", "gcd(b,c)", "gcd", "b", "c", "sum += gcd(a,tmp)", "sum", "gcd(a,tmp)", "gcd", "a", "tmp", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "private static int gcd(int x,int y) {\n int tmp;\n while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }\n return y;\n }", "gcd", "{\n int tmp;\n while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }\n return y;\n }", "int tmp;", "tmp", "while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }", "(tmp = x % y) != 0", "(tmp = x % y)", "tmp", "x % y", "x", "y", "0", "{\n x = y;\n y = tmp;\n }", "x = y", "x", "y", "y = tmp", "y", "tmp", "return y;", "y", "int x", "x", "int y", "y", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint max = sc.nextInt();\n \tint sum = 0;\n \n for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }\n System.out.println(sum);\n\t}\n \n \t private static int gcd(int x,int y) {\n int tmp;\n while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \tint max = sc.nextInt();\n \tint sum = 0;\n \n for(int a=1;a<=max;a++){\n for(int b=1;b<=max;b++){\n for(int c=1;c<=max;c++){\n int tmp = gcd(b,c);\n sum += gcd(a,tmp);\n }\n \n }\n }\n System.out.println(sum);\n\t}\n \n \t private static int gcd(int x,int y) {\n int tmp;\n while ((tmp = x % y) != 0) {\n x = y;\n y = tmp;\n }\n return y;\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int max = sc.nextInt(); int sum = 0; for(int a=1;a<=max;a++){ for(int b=1;b<=max;b++){ for(int c=1;c<=max;c++){ int tmp = gcd(b,c); sum += gcd(a,tmp); } } } System.out.println(sum); } private static int gcd(int x,int y) { int tmp; while ((tmp = x % y) != 0) { x = y; y = tmp; } return y; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 4, 18, 13, 4, 13, 13, 13, 41, 13, 17, 28, 13, 13, 30, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 30, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 13, 41, 13, 4, 13, 18, 13, 17, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 18, 13, 2, 13, 17, 29, 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 ], [ 23, 24 ], [ 24, 25 ], [ 17, 26 ], [ 26, 27 ], [ 27, 28 ], [ 17, 29 ], [ 29, 30 ], [ 29, 31 ], [ 17, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 34, 36 ], [ 32, 37 ], [ 37, 38 ], [ 37, 39 ], [ 32, 40 ], [ 40, 41 ], [ 41, 42 ], [ 32, 43 ], [ 44, 44 ], [ 44, 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 ], [ 58, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 17, 65 ], [ 65, 66 ], [ 65, 67 ], [ 17, 68 ], [ 68, 69 ], [ 68, 70 ], [ 68, 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 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 17, 92 ], [ 92, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 92, 97 ], [ 15, 98 ], [ 98, 99 ], [ 13, 100 ], [ 100, 101 ], [ 100, 102 ], [ 102, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 103, 107 ], [ 107, 108 ], [ 108, 109 ], [ 103, 110 ], [ 110, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 112, 115 ], [ 115, 116 ], [ 115, 117 ], [ 100, 118 ], [ 118, 119 ], [ 100, 120 ], [ 120, 121 ], [ 13, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 127, 129 ], [ 124, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 134, 136 ], [ 132, 137 ], [ 137, 138 ], [ 137, 139 ], [ 124, 140 ], [ 140, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 140, 145 ], [ 145, 146 ], [ 145, 147 ], [ 147, 148 ], [ 147, 149 ], [ 140, 150 ], [ 150, 151 ], [ 151, 152 ], [ 140, 153 ], [ 154, 154 ], [ 154, 155 ], [ 155, 156 ], [ 155, 157 ], [ 157, 158 ], [ 157, 159 ], [ 157, 160 ], [ 160, 161 ], [ 160, 162 ], [ 162, 163 ], [ 162, 164 ], [ 124, 165 ], [ 165, 166 ], [ 122, 167 ], [ 167, 168 ] ]
[ "import java.util.List;\nimport java.util.ArrayList;\nimport java.util.Scanner;\nimport java.lang.Math;\n\nclass Main {\n \n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n scanner.close();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<=k; i++){\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }\n int sum = 0;\n for (Integer val : list) {\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }\n \n // int sum = 0;\n // for(int i=0; i<Math.pow(k, 3); i++){\n // List<Integer> input = list.get(i);\n // sum += gcd(input.get(0),input.get(1),input.get(2));\n // }\n System.out.print(sum);\n\n } \n\n public static int gcd(int val1, int val2){\n if(val2==0){\n return val1;\n }else{\n return gcd(val2, val1%val2);\n }\n }\n\n public static int gcd(int... val){\n int len = val.length;\n int g = gcd(val[0], val[1]);\n for(int i=1; i<len-1; i++){\n g = gcd(g, val[i+1]);\n }\n return g;\n }\n}", "import java.util.List;", "List", "java.util", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "import java.lang.Math;", "Math", "java.lang", "class Main {\n \n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n scanner.close();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<=k; i++){\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }\n int sum = 0;\n for (Integer val : list) {\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }\n \n // int sum = 0;\n // for(int i=0; i<Math.pow(k, 3); i++){\n // List<Integer> input = list.get(i);\n // sum += gcd(input.get(0),input.get(1),input.get(2));\n // }\n System.out.print(sum);\n\n } \n\n public static int gcd(int val1, int val2){\n if(val2==0){\n return val1;\n }else{\n return gcd(val2, val1%val2);\n }\n }\n\n public static int gcd(int... val){\n int len = val.length;\n int g = gcd(val[0], val[1]);\n for(int i=1; i<len-1; i++){\n g = gcd(g, val[i+1]);\n }\n return g;\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n scanner.close();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<=k; i++){\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }\n int sum = 0;\n for (Integer val : list) {\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }\n \n // int sum = 0;\n // for(int i=0; i<Math.pow(k, 3); i++){\n // List<Integer> input = list.get(i);\n // sum += gcd(input.get(0),input.get(1),input.get(2));\n // }\n System.out.print(sum);\n\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int k = scanner.nextInt();\n scanner.close();\n List<Integer> list = new ArrayList<>();\n for(int i=1; i<=k; i++){\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }\n int sum = 0;\n for (Integer val : list) {\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }\n \n // int sum = 0;\n // for(int i=0; i<Math.pow(k, 3); i++){\n // List<Integer> input = list.get(i);\n // sum += gcd(input.get(0),input.get(1),input.get(2));\n // }\n System.out.print(sum);\n\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int k = scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "scanner.close()", "scanner.close", "scanner", "List<Integer> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(int i=1; i<=k; i++){\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }", "{\n for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }\n }", "for(int j=1; j<=k; j++){\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }", "{\n list.add(gcd(i,j));\n // for(int l=1; l<=k; l++){\n // List<Integer> inputList = new ArrayList<>();\n // inputList.add(i);\n // inputList.add(j);\n // inputList.add(l);\n // list.add(inputList);\n // }\n }", "list.add(gcd(i,j))", "list.add", "list", "gcd(i,j)", "gcd", "i", "j", "int sum = 0;", "sum", "0", "for (Integer val : list) {\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }", "Integer val", "list", "{\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }", "{\n for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }\n }", "for(int i=1; i<=k; i++){\n sum += gcd(val, i);\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n sum += gcd(val, i);\n }", "{\n sum += gcd(val, i);\n }", "sum += gcd(val, i)", "sum", "gcd(val, i)", "gcd", "val", "i", "System.out.print(sum)", "System.out.print", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int val1, int val2){\n if(val2==0){\n return val1;\n }else{\n return gcd(val2, val1%val2);\n }\n }", "gcd", "{\n if(val2==0){\n return val1;\n }else{\n return gcd(val2, val1%val2);\n }\n }", "if(val2==0){\n return val1;\n }else{\n return gcd(val2, val1%val2);\n }", "val2==0", "val2", "0", "{\n return val1;\n }", "return val1;", "val1", "{\n return gcd(val2, val1%val2);\n }", "return gcd(val2, val1%val2);", "gcd(val2, val1%val2)", "gcd", "val2", "val1%val2", "val1", "val2", "int val1", "val1", "int val2", "val2", "public static int gcd(int... val){\n int len = val.length;\n int g = gcd(val[0], val[1]);\n for(int i=1; i<len-1; i++){\n g = gcd(g, val[i+1]);\n }\n return g;\n }", "gcd", "{\n int len = val.length;\n int g = gcd(val[0], val[1]);\n for(int i=1; i<len-1; i++){\n g = gcd(g, val[i+1]);\n }\n return g;\n }", "int len = val.length;", "len", "val.length", "val", "val.length", "int g = gcd(val[0], val[1]);", "g", "gcd(val[0], val[1])", "gcd", "val[0]", "val", "0", "val[1]", "val", "1", "for(int i=1; i<len-1; i++){\n g = gcd(g, val[i+1]);\n }", "int i=1;", "int i=1;", "i", "1", "i<len-1", "i", "len-1", "len", "1", "i++", "i++", "i", "{\n g = gcd(g, val[i+1]);\n }", "{\n g = gcd(g, val[i+1]);\n }", "g = gcd(g, val[i+1])", "g", "gcd(g, val[i+1])", "gcd", "g", "val[i+1]", "val", "i+1", "i", "1", "return g;", "g", "int... val", "val" ]
import java.util.List; import java.util.ArrayList; import java.util.Scanner; import java.lang.Math; class Main { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int k = scanner.nextInt(); scanner.close(); List<Integer> list = new ArrayList<>(); for(int i=1; i<=k; i++){ for(int j=1; j<=k; j++){ list.add(gcd(i,j)); // for(int l=1; l<=k; l++){ // List<Integer> inputList = new ArrayList<>(); // inputList.add(i); // inputList.add(j); // inputList.add(l); // list.add(inputList); // } } } int sum = 0; for (Integer val : list) { for(int i=1; i<=k; i++){ sum += gcd(val, i); } } // int sum = 0; // for(int i=0; i<Math.pow(k, 3); i++){ // List<Integer> input = list.get(i); // sum += gcd(input.get(0),input.get(1),input.get(2)); // } System.out.print(sum); } public static int gcd(int val1, int val2){ if(val2==0){ return val1; }else{ return gcd(val2, val1%val2); } } public static int gcd(int... val){ int len = val.length; int g = gcd(val[0], val[1]); for(int i=1; i<len-1; i++){ g = gcd(g, val[i+1]); } return g; } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 2, 17, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 2, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 42, 40, 4, 18, 13, 38, 5, 13, 30, 4, 18, 13, 30, 0, 13, 20, 29, 4, 18, 13, 12, 13, 30, 41, 13, 17, 42, 2, 13, 17, 30, 14, 2, 2, 13, 17, 17, 30, 0, 13, 2, 13, 13, 40, 13, 30, 0, 13, 2, 13, 13, 0, 13, 17, 29, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 4, 18, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 28, 13, 13, 30, 4, 18, 13, 13, 4, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 419, 8 ], [ 419, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 11, 13 ], [ 419, 14 ], [ 14, 15 ], [ 14, 16 ], [ 419, 17 ], [ 17, 18 ], [ 17, 19 ], [ 419, 20 ], [ 20, 21 ], [ 20, 22 ], [ 22, 23 ], [ 23, 24 ], [ 23, 25 ], [ 22, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 22, 31 ], [ 31, 32 ], [ 31, 33 ], [ 22, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 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 ], [ 73, 75 ], [ 75, 76 ], [ 75, 77 ], [ 77, 78 ], [ 78, 79 ], [ 77, 80 ], [ 77, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 81, 85 ], [ 22, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 86, 91 ], [ 20, 92 ], [ 92, 93 ], [ 0, 94 ], [ 94, 95 ], [ 94, 96 ], [ 96, 97 ], [ 96, 98 ], [ 94, 99 ], [ 99, 100 ], [ 99, 101 ], [ 94, 102 ], [ 102, 103 ], [ 102, 104 ], [ 104, 105 ], [ 105, 106 ], [ 106, 107 ], [ 107, 108 ], [ 108, 109 ], [ 105, 110 ], [ 110, 111 ], [ 111, 112 ], [ 111, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 110, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 104, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 94, 125 ], [ 125, 126 ], [ 125, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 131, 132 ], [ 132, 133 ], [ 132, 134 ], [ 131, 135 ], [ 135, 136 ], [ 136, 137 ], [ 137, 138 ], [ 138, 139 ], [ 138, 140 ], [ 137, 141 ], [ 136, 142 ], [ 142, 143 ], [ 143, 144 ], [ 143, 145 ], [ 145, 146 ], [ 145, 147 ], [ 142, 148 ], [ 148, 149 ], [ 136, 150 ], [ 150, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 153, 155 ], [ 150, 156 ], [ 156, 157 ], [ 156, 158 ], [ 127, 159 ], [ 159, 160 ], [ 125, 161 ], [ 161, 162 ], [ 125, 163 ], [ 163, 164 ], [ 94, 165 ], [ 165, 166 ], [ 165, 167 ], [ 167, 168 ], [ 168, 169 ], [ 169, 170 ], [ 169, 171 ], [ 168, 172 ], [ 172, 173 ], [ 173, 174 ], [ 167, 175 ], [ 175, 176 ], [ 176, 177 ], [ 176, 178 ], [ 176, 179 ], [ 179, 180 ], [ 179, 181 ], [ 165, 182 ], [ 182, 183 ], [ 165, 184 ], [ 184, 185 ], [ 94, 186 ], [ 186, 187 ], [ 186, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 193, 194 ], [ 194, 195 ], [ 188, 196 ], [ 196, 197 ], [ 197, 198 ], [ 197, 199 ], [ 197, 200 ], [ 200, 201 ], [ 200, 202 ], [ 186, 203 ], [ 203, 204 ], [ 186, 205 ], [ 205, 206 ], [ 94, 207 ], [ 207, 208 ], [ 207, 209 ], [ 209, 210 ], [ 210, 211 ], [ 210, 212 ], [ 209, 213 ], [ 213, 214 ], [ 213, 215 ], [ 213, 216 ], [ 216, 217 ], [ 217, 218 ], [ 218, 219 ], [ 217, 220 ], [ 209, 221 ], [ 221, 222 ], [ 222, 223 ], [ 221, 224 ], [ 209, 225 ], [ 225, 226 ], [ 226, 227 ], [ 227, 228 ], [ 227, 229 ], [ 225, 230 ], [ 230, 231 ], [ 230, 232 ], [ 232, 233 ], [ 232, 234 ], [ 225, 235 ], [ 235, 236 ], [ 236, 237 ], [ 225, 238 ], [ 239, 239 ], [ 239, 240 ], [ 240, 241 ], [ 241, 242 ], [ 241, 243 ], [ 240, 244 ], [ 244, 245 ], [ 245, 246 ], [ 244, 247 ], [ 209, 248 ], [ 248, 249 ], [ 207, 250 ], [ 250, 251 ], [ 94, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 255, 257 ], [ 254, 258 ], [ 258, 259 ], [ 258, 260 ], [ 258, 261 ], [ 261, 262 ], [ 262, 263 ], [ 263, 264 ], [ 262, 265 ], [ 254, 266 ], [ 266, 267 ], [ 267, 268 ], [ 266, 269 ], [ 254, 270 ], [ 270, 271 ], [ 271, 272 ], [ 272, 273 ], [ 272, 274 ], [ 270, 275 ], [ 275, 276 ], [ 275, 277 ], [ 277, 278 ], [ 278, 279 ], [ 270, 280 ], [ 280, 281 ], [ 281, 282 ], [ 270, 283 ], [ 284, 284 ], [ 284, 285 ], [ 285, 286 ], [ 286, 287 ], [ 286, 288 ], [ 285, 289 ], [ 289, 290 ], [ 290, 291 ], [ 289, 292 ], [ 254, 293 ], [ 293, 294 ], [ 252, 295 ], [ 295, 296 ], [ 94, 297 ], [ 297, 298 ], [ 297, 299 ], [ 299, 300 ], [ 300, 301 ], [ 300, 302 ], [ 299, 303 ], [ 303, 304 ], [ 303, 305 ], [ 303, 306 ], [ 306, 307 ], [ 307, 308 ], [ 308, 309 ], [ 307, 310 ], [ 299, 311 ], [ 311, 312 ], [ 312, 313 ], [ 311, 314 ], [ 299, 315 ], [ 315, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 315, 320 ], [ 320, 321 ], [ 320, 322 ], [ 322, 323 ], [ 322, 324 ], [ 315, 325 ], [ 325, 326 ], [ 326, 327 ], [ 315, 328 ], [ 329, 329 ], [ 329, 330 ], [ 330, 331 ], [ 331, 332 ], [ 331, 333 ], [ 330, 334 ], [ 334, 335 ], [ 335, 336 ], [ 334, 337 ], [ 299, 338 ], [ 338, 339 ], [ 297, 340 ], [ 340, 341 ], [ 94, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 345, 346 ], [ 346, 347 ], [ 347, 348 ], [ 346, 349 ], [ 349, 350 ], [ 94, 351 ], [ 351, 352 ], [ 351, 353 ], [ 353, 354 ], [ 354, 355 ], [ 354, 356 ], [ 353, 358 ], [ 358, 359 ], [ 359, 360 ], [ 360, 361 ], [ 360, 362 ], [ 358, 363 ], [ 363, 364 ], [ 363, 365 ], [ 358, 366 ], [ 366, 367 ], [ 367, 368 ], [ 358, 369 ], [ 369, 370 ], [ 370, 371 ], [ 371, 372 ], [ 371, 373 ], [ 370, 374 ], [ 374, 375 ], [ 353, 376 ], [ 376, 377 ], [ 351, 378 ], [ 378, 379 ], [ 94, 380 ], [ 380, 381 ], [ 380, 382 ], [ 382, 383 ], [ 383, 384 ], [ 384, 385 ], [ 385, 386 ], [ 384, 387 ], [ 387, 388 ], [ 94, 389 ], [ 389, 390 ], [ 389, 391 ], [ 391, 392 ], [ 392, 393 ], [ 392, 394 ], [ 391, 396 ], [ 396, 397 ], [ 397, 398 ], [ 398, 399 ], [ 398, 400 ], [ 396, 401 ], [ 401, 402 ], [ 401, 403 ], [ 396, 404 ], [ 404, 405 ], [ 405, 406 ], [ 396, 407 ], [ 407, 408 ], [ 408, 409 ], [ 409, 410 ], [ 409, 411 ], [ 408, 412 ], [ 412, 413 ], [ 391, 414 ], [ 414, 415 ], [ 389, 416 ], [ 416, 417 ], [ 0, 418 ], [ 418, 419 ], [ 418, 420 ] ]
[ "//package Atcoder;\nimport java.util.*;\nimport java.io.*;\npublic class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint k=fs.nextInt();\n\t\tlong s=0;\n\t\tfor(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}\nclass FastScanner \n{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\tpublic String next() \n\t\t{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tlong pow(long x,long n)\n\t\t{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\t\tint gcd(int a,int b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}\n\t\tlong longgcd(long a,long b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}\n\t\tint[] sort(int arr[])\n\t\t{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tchar[] charsort(char arr[])\n\t {\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }\n\t\tlong[] longsort(long arr[])\n\t\t{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tpublic int nextInt() \n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tpublic int[] readArray(int n)\n\t\t{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tpublic long[] longreadArray(int n) \n\t\t{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n}", "import java.util.*;", "util.*", "java", "import java.io.*;", "io.*", "java", "public class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint k=fs.nextInt();\n\t\tlong s=0;\n\t\tfor(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}", "Main", "static final int mod=(int)1e9+7;", "mod", "(int)1e9+7", "(int)1e9", "7", "static final int inf=(int)1e9;", "inf", "(int)1e9", "static final long INF=(long)1e18;", "INF", "(long)1e18", "public static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint k=fs.nextInt();\n\t\tlong s=0;\n\t\tfor(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}", "main", "{\n\t\tFastScanner fs=new FastScanner();\n\t\tint k=fs.nextInt();\n\t\tlong s=0;\n\t\tfor(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}", "FastScanner fs=new FastScanner();", "fs", "new FastScanner()", "int k=fs.nextInt();", "k", "fs.nextInt()", "fs.nextInt", "fs", "long s=0;", "s", "0", "for(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}", "for(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}", "int h=1;", "int h=1;", "h", "1", "h<=k", "h", "k", "h++", "h++", "h", "{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}", "{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}", "s=s+fs.gcd(i,fs.gcd(j,h))", "s", "s+fs.gcd(i,fs.gcd(j,h))", "s", "fs.gcd(i,fs.gcd(j,h))", "fs.gcd", "fs", "i", "fs.gcd(j,h)", "fs.gcd", "fs", "j", "h", "System.out.println(s)", "System.out.println", "System.out", "System", "System.out", "s", "String[] args", "args", "class FastScanner \n{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\tpublic String next() \n\t\t{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tlong pow(long x,long n)\n\t\t{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\t\tint gcd(int a,int b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}\n\t\tlong longgcd(long a,long b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}\n\t\tint[] sort(int arr[])\n\t\t{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tchar[] charsort(char arr[])\n\t {\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }\n\t\tlong[] longsort(long arr[])\n\t\t{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tpublic int nextInt() \n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tpublic int[] readArray(int n)\n\t\t{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tpublic long[] longreadArray(int n) \n\t\t{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n}", "FastScanner", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "StringTokenizer st = new StringTokenizer(\"\");", "st", "new StringTokenizer(\"\")", "public String next() \n\t\t{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}", "next", "{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}", "while (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "!st.hasMoreTokens()", "st.hasMoreTokens()", "st.hasMoreTokens", "st", "try {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "IOException e", "{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}", "e.printStackTrace()", "e.printStackTrace", "e", "{\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t}", "st=new StringTokenizer(br.readLine())", "st", "new StringTokenizer(br.readLine())", "return st.nextToken();", "st.nextToken()", "st.nextToken", "st", "long pow(long x,long n)\n\t\t{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}", "pow", "{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}", "long res=1;", "res", "1", "while(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}", "n>0", "n", "0", "{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}", "if(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}", "n%2!=0", "n%2", "n", "2", "0", "{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}", "res=(res*x)", "res", "(res*x)", "res", "x", "n--", "n", "{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}", "x=(x*x)", "x", "(x*x)", "x", "x", "n/=2", "n", "2", "return res;", "res", "long x", "x", "long n", "n", "int gcd(int a,int b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}", "gcd", "{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}", "if(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}", "b==0", "b", "0", "{\n\t\t\t\treturn a;\n\t\t\t}", "return a;", "a", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "long longgcd(long a,long b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}", "longgcd", "{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}", "if(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}", "b==0", "b", "0", "{\n\t\t\t\treturn a;\n\t\t\t}", "return a;", "a", "return longgcd(b,a%b);", "longgcd(b,a%b)", "longgcd", "b", "a%b", "a", "b", "long a", "a", "long b", "b", "int[] sort(int arr[])\n\t\t{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}", "sort", "{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}", "ArrayList<Integer> list = new ArrayList<Integer>();", "list", "new ArrayList<Integer>()", "for(int i:arr)list.add(i);", "int i", "arr", "list.add(i);", "list.add(i)", "list.add", "list", "i", "Collections.sort(list)", "Collections.sort", "Collections", "list", "for(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}", "{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}", "arr[i]=list.get(i)", "arr[i]", "arr", "i", "list.get(i)", "list.get", "list", "i", "return arr;", "arr", "int arr[]", "arr", "char[] charsort(char arr[])\n\t {\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }", "charsort", "{\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }", "ArrayList<Character> list = new ArrayList<>();", "list", "new ArrayList<>()", "for(char c:arr)list.add(c);", "char c", "arr", "list.add(c);", "list.add(c)", "list.add", "list", "c", "Collections.sort(list)", "Collections.sort", "Collections", "list", "for(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}", "int i=0;", "int i=0;", "i", "0", "i<list.size()", "i", "list.size()", "list.size", "list", "i++", "i++", "i", "{\n\t \t\tarr[i]=list.get(i);\n\t \t}", "{\n\t \t\tarr[i]=list.get(i);\n\t \t}", "arr[i]=list.get(i)", "arr[i]", "arr", "i", "list.get(i)", "list.get", "list", "i", "return arr;", "arr", "char arr[]", "arr", "long[] longsort(long arr[])\n\t\t{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}", "longsort", "{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}", "ArrayList<Long> list = new ArrayList<Long>();", "list", "new ArrayList<Long>()", "for(long i:arr)list.add(i);", "long i", "arr", "list.add(i);", "list.add(i)", "list.add", "list", "i", "Collections.sort(list)", "Collections.sort", "Collections", "list", "for(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}", "int i=0;", "int i=0;", "i", "0", "i<arr.length", "i", "arr.length", "arr", "arr.length", "i++", "i++", "i", "{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}", "{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}", "arr[i]=list.get(i)", "arr[i]", "arr", "i", "list.get(i)", "list.get", "list", "i", "return arr;", "arr", "long arr[]", "arr", "public int nextInt() \n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "nextInt", "{\n\t\t\treturn Integer.parseInt(next());\n\t\t}", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public int[] readArray(int n)\n\t\t{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}", "readArray", "{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}", "int[] arr=new int[n];", "arr", "new int[n]", "n", "for (int i=0; i<n; i++) arr[i]=nextInt();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "arr[i]=nextInt();", "arr[i]=nextInt()", "arr[i]", "arr", "i", "nextInt()", "nextInt", "return arr;", "arr", "int n", "n", "public long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}", "nextLong", "{\n\t\t\treturn Long.parseLong(next());\n\t\t}", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public long[] longreadArray(int n) \n\t\t{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}", "longreadArray", "{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}", "long[] a=new long[n];", "a", "new long[n]", "n", "for (int i=0; i<n; i++) a[i]=nextLong();", "int i=0;", "int i=0;", "i", "0", "i<n", "i", "n", "i++", "i++", "i", "a[i]=nextLong();", "a[i]=nextLong()", "a[i]", "a", "i", "nextLong()", "nextLong", "return a;", "a", "int n", "n", "public class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint k=fs.nextInt();\n\t\tlong s=0;\n\t\tfor(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}", "public class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint k=fs.nextInt();\n\t\tlong s=0;\n\t\tfor(int i=1;i<=k;i++)\n\t\t{\n\t\t\tfor(int j=1;j<=k;j++)\n\t\t\t{\n\t\t\t\tfor(int h=1;h<=k;h++)\n\t\t\t\t{\n\t\t\t\t\ts=s+fs.gcd(i,fs.gcd(j,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}", "Main" ]
//package Atcoder; import java.util.*; import java.io.*; public class Main { static final int mod=(int)1e9+7; static final int inf=(int)1e9; static final long INF=(long)1e18; public static void main(String[] args) { FastScanner fs=new FastScanner(); int k=fs.nextInt(); long s=0; for(int i=1;i<=k;i++) { for(int j=1;j<=k;j++) { for(int h=1;h<=k;h++) { s=s+fs.gcd(i,fs.gcd(j,h)); } } } System.out.println(s); } } class FastScanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public String next() { while (!st.hasMoreTokens()) try { st=new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } return st.nextToken(); } long pow(long x,long n) { long res=1; while(n>0) { if(n%2!=0) { res=(res*x);n--; } else { x=(x*x);n/=2; } } return res; } int gcd(int a,int b) { if(b==0) { return a; } return gcd(b,a%b); } long longgcd(long a,long b) { if(b==0) { return a; } return longgcd(b,a%b); } int[] sort(int arr[]) { ArrayList<Integer> list = new ArrayList<Integer>(); for(int i:arr)list.add(i); Collections.sort(list); for(int i=0;i<arr.length;i++) { arr[i]=list.get(i); } return arr; } char[] charsort(char arr[]) { ArrayList<Character> list = new ArrayList<>(); for(char c:arr)list.add(c); Collections.sort(list); for(int i=0;i<list.size();i++) { arr[i]=list.get(i); } return arr; } long[] longsort(long arr[]) { ArrayList<Long> list = new ArrayList<Long>(); for(long i:arr)list.add(i); Collections.sort(list); for(int i=0;i<arr.length;i++) { arr[i]=list.get(i); } return arr; } public int nextInt() { return Integer.parseInt(next()); } public int[] readArray(int n) { int[] arr=new int[n]; for (int i=0; i<n; i++) arr[i]=nextInt(); return arr; } public long nextLong() { return Long.parseLong(next()); } public long[] longreadArray(int n) { long[] a=new long[n]; for (int i=0; i<n; i++) a[i]=nextLong(); return a; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 0, 13, 2, 2, 13, 2, 13, 17, 17, 11, 1, 41, 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, 0, 13, 4, 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, 13, 1, 40, 13, 30, 30, 11, 1, 41, 13, 2, 13, 17, 2, 13, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 4, 13, 13, 13, 13, 0, 13, 2, 2, 13, 2, 13, 17, 2, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 30, 3, 40, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 13, 42, 2, 13, 17, 30, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 30, 3, 40, 13, 29, 13, 23, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 222, 5 ], [ 222, 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 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 34, 35 ], [ 34, 36 ], [ 31, 37 ], [ 8, 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 ], [ 60, 61 ], [ 60, 62 ], [ 51, 63 ], [ 63, 64 ], [ 64, 65 ], [ 51, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 8, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 81, 83 ], [ 74, 84 ], [ 84, 85 ], [ 85, 86 ], [ 74, 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 ], [ 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 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 123, 126 ], [ 123, 127 ], [ 8, 128 ], [ 128, 129 ], [ 128, 130 ], [ 131, 131 ], [ 131, 132 ], [ 131, 133 ], [ 133, 134 ], [ 133, 135 ], [ 131, 136 ], [ 136, 137 ], [ 136, 138 ], [ 8, 139 ], [ 139, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 139, 144 ], [ 6, 145 ], [ 145, 146 ], [ 222, 147 ], [ 147, 148 ], [ 147, 149 ], [ 149, 150 ], [ 150, 151 ], [ 150, 152 ], [ 149, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 158, 159 ], [ 159, 160 ], [ 160, 161 ], [ 161, 162 ], [ 161, 163 ], [ 160, 164 ], [ 159, 165 ], [ 165, 166 ], [ 166, 167 ], [ 166, 168 ], [ 165, 169 ], [ 158, 170 ], [ 170, 171 ], [ 157, 172 ], [ 172, 173 ], [ 149, 174 ], [ 174, 175 ], [ 147, 176 ], [ 176, 177 ], [ 147, 178 ], [ 178, 179 ], [ 222, 180 ], [ 180, 181 ], [ 180, 182 ], [ 182, 183 ], [ 183, 184 ], [ 183, 185 ], [ 182, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 186, 190 ], [ 190, 191 ], [ 191, 192 ], [ 193, 193 ], [ 193, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 194, 198 ], [ 193, 199 ], [ 199, 200 ], [ 200, 201 ], [ 200, 202 ], [ 199, 203 ], [ 193, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 204, 208 ], [ 191, 209 ], [ 209, 210 ], [ 190, 211 ], [ 211, 212 ], [ 182, 213 ], [ 213, 214 ], [ 180, 215 ], [ 215, 216 ], [ 180, 217 ], [ 217, 218 ], [ 180, 219 ], [ 219, 220 ], [ 0, 221 ], [ 221, 222 ], [ 221, 223 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint num1 = 0;\n\t\tint num2 = 0;\n\t\tint num3 = 0;\n\t\tint ans = 0;\n\n//a,b,cがすべて等しい.\n\t\tnum1 = K*(K+1) / 2;\n\n//a,b,cのうち2つが等しい.\n\t\tfor (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}\n\n\n//a,b,cがすべて異なる.\n\t\tfor (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tans = num1 + num2*6 + num3*6;\n\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic static int gcd2(int x, int y) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n\tpublic static int gcd3(int x, int y, int z) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint num1 = 0;\n\t\tint num2 = 0;\n\t\tint num3 = 0;\n\t\tint ans = 0;\n\n//a,b,cがすべて等しい.\n\t\tnum1 = K*(K+1) / 2;\n\n//a,b,cのうち2つが等しい.\n\t\tfor (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}\n\n\n//a,b,cがすべて異なる.\n\t\tfor (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tans = num1 + num2*6 + num3*6;\n\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic static int gcd2(int x, int y) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n\tpublic static int gcd3(int x, int y, int z) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n}", "Main", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint num1 = 0;\n\t\tint num2 = 0;\n\t\tint num3 = 0;\n\t\tint ans = 0;\n\n//a,b,cがすべて等しい.\n\t\tnum1 = K*(K+1) / 2;\n\n//a,b,cのうち2つが等しい.\n\t\tfor (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}\n\n\n//a,b,cがすべて異なる.\n\t\tfor (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tans = num1 + num2*6 + num3*6;\n\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint num1 = 0;\n\t\tint num2 = 0;\n\t\tint num3 = 0;\n\t\tint ans = 0;\n\n//a,b,cがすべて等しい.\n\t\tnum1 = K*(K+1) / 2;\n\n//a,b,cのうち2つが等しい.\n\t\tfor (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}\n\n\n//a,b,cがすべて異なる.\n\t\tfor (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tans = num1 + num2*6 + num3*6;\n\n\t\tSystem.out.println(ans);\n\t}", "Scanner scan = new Scanner(System.in);", "scan", "new Scanner(System.in)", "int K = scan.nextInt();", "K", "scan.nextInt()", "scan.nextInt", "scan", "int num1 = 0;", "num1", "0", "int num2 = 0;", "num2", "0", "int num3 = 0;", "num3", "0", "int ans = 0;", "ans", "0", "num1 = K*(K+1) / 2", "num1", "K*(K+1) / 2", "K*(K+1)", "K", "(K+1)", "K", "1", "2", "for (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a < K", "a", "K", "a++", "a++", "a", "{\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}", "for (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}", "int b = a+1;", "int b = a+1;", "b", "a+1", "a", "1", "b < K+1", "b", "K+1", "K", "1", "b++", "b++", "b", "{\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}", "{\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}", "num2 += gcd2(a, b)", "num2", "gcd2(a, b)", "gcd2", "a", "b", "for (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int a = 1;", "int a = 1;", "a", "1", "a < K-1", "a", "K-1", "K", "1", "a++", "a++", "a", "{\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}", "int b = a+1;", "int b = a+1;", "b", "a+1", "a", "1", "b < K", "b", "K", "b++", "b++", "b", "{\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}", "for (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}", "int c = b+1;", "int c = b+1;", "c", "b+1", "b", "1", "c < K+1", "c", "K+1", "K", "1", "c++", "c++", "c", "{\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}", "{\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}", "num3 += gcd3(a, b, c)", "num3", "gcd3(a, b, c)", "gcd3", "a", "b", "c", "ans = num1 + num2*6 + num3*6", "ans", "num1 + num2*6 + num3*6", "num1 + num2*6 + num3*6", "num1", "num2*6", "num2", "6", "num3*6", "num3", "6", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "public static int gcd2(int x, int y) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}", "gcd2", "{\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}", "int i = x;", "i", "x", "while (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}", "i > 1", "i", "1", "{\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}", "if (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "x%i == 0 && y%i == 0", "x%i == 0", "x%i", "x", "i", "0", "y%i == 0", "y%i", "y", "i", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "i--", "i", "return i;", "i", "int x", "x", "int y", "y", "public static int gcd3(int x, int y, int z) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}", "gcd3", "{\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}", "int i = x;", "i", "x", "while (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}", "i > 1", "i", "1", "{\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}", "if (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}", "x%i == 0 && y%i == 0 && z%i == 0", "x%i == 0 && y%i == 0 && z%i == 0", "x%i == 0", "x%i", "x", "i", "0", "y%i == 0", "y%i", "y", "i", "0", "z%i == 0", "z%i", "z", "i", "0", "{\n\t\t\t\tbreak;\n\t\t\t}", "break;", "i--", "i", "return i;", "i", "int x", "x", "int y", "y", "int z", "z", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint num1 = 0;\n\t\tint num2 = 0;\n\t\tint num3 = 0;\n\t\tint ans = 0;\n\n//a,b,cがすべて等しい.\n\t\tnum1 = K*(K+1) / 2;\n\n//a,b,cのうち2つが等しい.\n\t\tfor (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}\n\n\n//a,b,cがすべて異なる.\n\t\tfor (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tans = num1 + num2*6 + num3*6;\n\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic static int gcd2(int x, int y) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n\tpublic static int gcd3(int x, int y, int z) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n}", "public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tint K = scan.nextInt();\n\t\tint num1 = 0;\n\t\tint num2 = 0;\n\t\tint num3 = 0;\n\t\tint ans = 0;\n\n//a,b,cがすべて等しい.\n\t\tnum1 = K*(K+1) / 2;\n\n//a,b,cのうち2つが等しい.\n\t\tfor (int a = 1; a < K; a++) {\n\t\t\tfor (int b = a+1; b < K+1; b++) {\n\t\t\t\tnum2 += gcd2(a, b);\n\t\t\t}\n\t\t}\n\n\n//a,b,cがすべて異なる.\n\t\tfor (int a = 1; a < K-1; a++) {\n\t\t\tfor (int b = a+1; b < K; b++) {\n\t\t\t\tfor (int c = b+1; c < K+1; c++) {\n\t\t\t\t\tnum3 += gcd3(a, b, c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tans = num1 + num2*6 + num3*6;\n\n\t\tSystem.out.println(ans);\n\t}\n\n\tpublic static int gcd2(int x, int y) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\n\t}\n\n\tpublic static int gcd3(int x, int y, int z) {\n\t\tint i = x;\n\n\t\twhile (i > 1) {\n\t\t\tif (x%i == 0 && y%i == 0 && z%i == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\n\t\treturn i;\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 K = scan.nextInt(); int num1 = 0; int num2 = 0; int num3 = 0; int ans = 0; //a,b,cがすべて等しい. num1 = K*(K+1) / 2; //a,b,cのうち2つが等しい. for (int a = 1; a < K; a++) { for (int b = a+1; b < K+1; b++) { num2 += gcd2(a, b); } } //a,b,cがすべて異なる. for (int a = 1; a < K-1; a++) { for (int b = a+1; b < K; b++) { for (int c = b+1; c < K+1; c++) { num3 += gcd3(a, b, c); } } } ans = num1 + num2*6 + num3*6; System.out.println(ans); } public static int gcd2(int x, int y) { int i = x; while (i > 1) { if (x%i == 0 && y%i == 0) { break; } i--; } return i; } public static int gcd3(int x, int y, int z) { int i = x; while (i > 1) { if (x%i == 0 && y%i == 0 && z%i == 0) { break; } i--; } return i; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 18, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 18, 13, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 20, 17, 41, 13, 20, 41, 13, 4, 18, 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, 0, 18, 13, 17, 13, 0, 18, 13, 17, 13, 0, 18, 13, 17, 13, 0, 13, 4, 13, 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 ], [ 8, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 18, 20 ], [ 16, 21 ], [ 6, 22 ], [ 22, 23 ], [ 6, 24 ], [ 24, 25 ], [ 4, 26 ], [ 26, 27 ], [ 26, 28 ], [ 28, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 31, 33 ], [ 28, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 48, 49 ], [ 48, 50 ], [ 50, 51 ], [ 50, 52 ], [ 48, 53 ], [ 28, 54 ], [ 54, 55 ], [ 26, 56 ], [ 56, 57 ], [ 26, 58 ], [ 58, 59 ], [ 4, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 63, 65 ], [ 62, 66 ], [ 66, 67 ], [ 66, 68 ], [ 62, 70 ], [ 70, 71 ], [ 70, 72 ], [ 62, 73 ], [ 73, 74 ], [ 73, 75 ], [ 75, 76 ], [ 76, 77 ], [ 62, 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 ], [ 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 ], [ 104, 109 ], [ 109, 110 ], [ 109, 111 ], [ 104, 112 ], [ 112, 113 ], [ 113, 114 ], [ 104, 115 ], [ 116, 116 ], [ 116, 117 ], [ 117, 118 ], [ 118, 119 ], [ 118, 120 ], [ 117, 121 ], [ 116, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 116, 127 ], [ 127, 128 ], [ 128, 129 ], [ 128, 130 ], [ 127, 131 ], [ 116, 132 ], [ 132, 133 ], [ 132, 134 ], [ 134, 135 ], [ 134, 136 ], [ 134, 137 ], [ 62, 138 ], [ 138, 139 ], [ 139, 140 ], [ 140, 141 ], [ 140, 142 ], [ 138, 143 ], [ 60, 144 ], [ 144, 145 ] ]
[ "import java.util.*;\nclass Main\n{\n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n } \n public static void main(String args[])\n {\n long sum=0;\n int a[]=new int [3];\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n for(int i=1;i<=k;i++)\n {\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }\n System.out.println(sum); \n }\n}", "import java.util.*;", "util.*", "java", "class Main\n{\n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n } \n public static void main(String args[])\n {\n long sum=0;\n int a[]=new int [3];\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n for(int i=1;i<=k;i++)\n {\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }\n System.out.println(sum); \n }\n}", "Main", "static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "gcd", "{ \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }", "if (a == 0) \n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "int a", "a", "int b", "b", "static int findGCD(int arr[], int n) \n { \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n }", "findGCD", "{ \n int result = arr[0]; \n for (int i = 1; i < n; i++) \n result = gcd(arr[i], result); \n \n return result; \n }", "int result = arr[0];", "result", "arr[0]", "arr", "0", "for (int i = 1; i < n; i++) \n result = gcd(arr[i], result);", "int i = 1;", "int i = 1;", "i", "1", "i < n", "i", "n", "i++", "i++", "i", "result = gcd(arr[i], result);", "result = gcd(arr[i], result)", "result", "gcd(arr[i], result)", "gcd", "arr[i]", "arr", "i", "result", "return result;", "result", "int arr[]", "arr", "int n", "n", "public static void main(String args[])\n {\n long sum=0;\n int a[]=new int [3];\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n for(int i=1;i<=k;i++)\n {\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }\n System.out.println(sum); \n }", "main", "{\n long sum=0;\n int a[]=new int [3];\n Scanner sc=new Scanner(System.in);\n int k=sc.nextInt();\n for(int i=1;i<=k;i++)\n {\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }\n System.out.println(sum); \n }", "long sum=0;", "sum", "0", "int a[]=new int [3];", "a", "new int [3]", "3", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k=sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "for(int i=1;i<=k;i++)\n {\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=k", "i", "k", "i++", "i++", "i", "{\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }", "{\n for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }\n }", "for(int j=1;j<=k;j++)\n {\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=k", "j", "k", "j++", "j++", "j", "{\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }", "{\n for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }\n }", "for(int x=1;x<=k;x++)\n {\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }", "int x=1;", "int x=1;", "x", "1", "x<=k", "x", "k", "x++", "x++", "x", "{\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }", "{\n a[0]=i;\n \ta[1]=j;\n \ta[2]=x;\n \tsum+=findGCD(a,3);\n }", "a[0]=i", "a[0]", "a", "0", "i", "a[1]=j", "a[1]", "a", "1", "j", "a[2]=x", "a[2]", "a", "2", "x", "sum+=findGCD(a,3)", "sum", "findGCD(a,3)", "findGCD", "a", "3", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String args[]", "args" ]
import java.util.*; class Main { static int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } static int findGCD(int arr[], int n) { int result = arr[0]; for (int i = 1; i < n; i++) result = gcd(arr[i], result); return result; } public static void main(String args[]) { long sum=0; int a[]=new int [3]; Scanner sc=new Scanner(System.in); int k=sc.nextInt(); for(int i=1;i<=k;i++) { for(int j=1;j<=k;j++) { for(int x=1;x<=k;x++) { a[0]=i; a[1]=j; a[2]=x; sum+=findGCD(a,3); } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 0, 13, 2, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 27, 28 ], [ 27, 29 ], [ 20, 30 ], [ 30, 31 ], [ 31, 32 ], [ 20, 33 ], [ 34, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 35, 40 ], [ 40, 41 ], [ 40, 42 ], [ 42, 43 ], [ 42, 44 ], [ 35, 45 ], [ 45, 46 ], [ 46, 47 ], [ 35, 48 ], [ 49, 49 ], [ 49, 50 ], [ 50, 51 ], [ 51, 52 ], [ 52, 53 ], [ 52, 54 ], [ 50, 55 ], [ 55, 56 ], [ 55, 57 ], [ 57, 58 ], [ 57, 59 ], [ 50, 60 ], [ 60, 61 ], [ 61, 62 ], [ 50, 63 ], [ 64, 64 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 71, 72 ], [ 71, 73 ], [ 71, 74 ], [ 69, 75 ], [ 8, 76 ], [ 76, 77 ], [ 77, 78 ], [ 78, 79 ], [ 78, 80 ], [ 76, 81 ], [ 6, 82 ], [ 82, 83 ], [ 105, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 86, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 94, 97 ], [ 97, 98 ], [ 97, 99 ], [ 84, 100 ], [ 100, 101 ], [ 84, 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 scanner = new Scanner(System.in);\n int K = scanner.nextInt();\n int sum = 0;\n for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int a,int b){\n if(b == 0)\n return a;\n \n return gcd(b,a % b);\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 int K = scanner.nextInt();\n int sum = 0;\n for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int a,int b){\n if(b == 0)\n return a;\n \n return gcd(b,a % b);\n }\n}", "Main", "public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int K = scanner.nextInt();\n int sum = 0;\n for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner scanner = new Scanner(System.in);\n int K = scanner.nextInt();\n int sum = 0;\n for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n }", "Scanner scanner = new Scanner(System.in);", "scanner", "new Scanner(System.in)", "int K = scanner.nextInt();", "K", "scanner.nextInt()", "scanner.nextInt", "scanner", "int sum = 0;", "sum", "0", "for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i < K + 1", "i", "K + 1", "K", "1", "i++", "i++", "i", "{\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }", "{\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }", "for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j < K + 1", "j", "K + 1", "K", "1", "j++", "j++", "j", "{\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }", "{\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }", "for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k < K + 1", "k", "K + 1", "K", "1", "k++", "k++", "k", "{\n sum = sum + gcd(gcd(i,j),k);\n }", "{\n sum = sum + gcd(gcd(i,j),k);\n }", "sum = sum + gcd(gcd(i,j),k)", "sum", "sum + gcd(gcd(i,j),k)", "sum", "gcd(gcd(i,j),k)", "gcd", "gcd(i,j)", "gcd", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "static int gcd(int a,int b){\n if(b == 0)\n return a;\n \n return gcd(b,a % b);\n }", "gcd", "{\n if(b == 0)\n return a;\n \n return gcd(b,a % b);\n }", "if(b == 0)\n return a;", "b == 0", "b", "0", "return a;", "a", "return gcd(b,a % b);", "gcd(b,a % b)", "gcd", "b", "a % b", "a", "b", "int a", "a", "int b", "b", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int K = scanner.nextInt();\n int sum = 0;\n for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int a,int b){\n if(b == 0)\n return a;\n \n return gcd(b,a % b);\n }\n}", "public class Main{\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int K = scanner.nextInt();\n int sum = 0;\n for(int i = 1;i < K + 1;i++){\n for(int j = 1;j < K + 1;j++){\n for(int k = 1;k < K + 1;k++){\n sum = sum + gcd(gcd(i,j),k);\n }\n }\n }\n System.out.println(sum);\n }\n \n static int gcd(int a,int b){\n if(b == 0)\n return a;\n \n return gcd(b,a % b);\n }\n}", "Main" ]
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int K = scanner.nextInt(); int sum = 0; for(int i = 1;i < K + 1;i++){ for(int j = 1;j < K + 1;j++){ for(int k = 1;k < K + 1;k++){ sum = sum + gcd(gcd(i,j),k); } } } System.out.println(sum); } static int gcd(int a,int b){ if(b == 0) return a; return gcd(b,a % b); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 18, 13, 13, 18, 13, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 13, 13, 23, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 42, 2, 13, 17, 30, 41, 13, 13, 0, 13, 2, 13, 13, 0, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 159, 29 ], [ 159, 30 ], [ 30, 31 ], [ 30, 32 ], [ 32, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 30, 41 ], [ 41, 42 ], [ 159, 43 ], [ 43, 44 ], [ 43, 45 ], [ 45, 46 ], [ 46, 47 ], [ 46, 48 ], [ 45, 49 ], [ 49, 50 ], [ 49, 51 ], [ 51, 52 ], [ 52, 53 ], [ 45, 54 ], [ 54, 55 ], [ 54, 56 ], [ 45, 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 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 82, 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 ], [ 102, 104 ], [ 104, 105 ], [ 104, 106 ], [ 104, 107 ], [ 101, 108 ], [ 108, 109 ], [ 108, 110 ], [ 45, 111 ], [ 111, 112 ], [ 112, 113 ], [ 111, 114 ], [ 43, 115 ], [ 115, 116 ], [ 43, 117 ], [ 117, 118 ], [ 159, 119 ], [ 119, 120 ], [ 119, 121 ], [ 121, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 126, 130 ], [ 130, 131 ], [ 130, 132 ], [ 126, 133 ], [ 133, 134 ], [ 133, 135 ], [ 121, 136 ], [ 136, 137 ], [ 137, 138 ], [ 137, 139 ], [ 136, 140 ], [ 140, 141 ], [ 141, 142 ], [ 141, 143 ], [ 140, 144 ], [ 144, 145 ], [ 144, 146 ], [ 146, 147 ], [ 146, 148 ], [ 140, 149 ], [ 149, 150 ], [ 149, 151 ], [ 121, 152 ], [ 152, 153 ], [ 119, 154 ], [ 154, 155 ], [ 119, 156 ], [ 156, 157 ], [ 0, 158 ], [ 158, 159 ], [ 158, 160 ] ]
[ "\nimport java.io.InputStream;\nimport java.io.PrintStream;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.PriorityQueue;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n long K = scan.nextLong();\n\n long ans = 0;\n\n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }\n\n os.println(ans);\n\n }\n\n static public long gcd(long a, long b) {\n if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }\n return b;\n }\n}", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.PrintStream;", "PrintStream", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.Arrays;", "Arrays", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.PriorityQueue;", "PriorityQueue", "java.util", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n long K = scan.nextLong();\n\n long ans = 0;\n\n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }\n\n os.println(ans);\n\n }\n\n static public long gcd(long a, long b) {\n if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }\n return b;\n }\n}", "Main", "public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }", "main", "{\n solve(System.in, System.out);\n }", "solve(System.in, System.out)", "solve", "System.in", "System", "System.in", "System.out", "System", "System.out", "String[] args", "args", "static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n long K = scan.nextLong();\n\n long ans = 0;\n\n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }\n\n os.println(ans);\n\n }", "solve", "{\n // Your code here!\n Scanner scan = new Scanner(is);\n long K = scan.nextLong();\n\n long ans = 0;\n\n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }\n\n os.println(ans);\n\n }", "Scanner scan = new Scanner(is);", "scan", "new Scanner(is)", "long K = scan.nextLong();", "K", "scan.nextLong()", "scan.nextLong", "scan", "long ans = 0;", "ans", "0", "for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "{\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }", "{\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }", "for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "{\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }", "{\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }", "long gcd1 = gcd(i, j);", "gcd1", "gcd(i, j)", "gcd", "i", "j", "for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "{\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }", "{\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }", "long gcd2 = gcd(gcd1, k);", "gcd2", "gcd(gcd1, k)", "gcd", "gcd1", "k", "ans += gcd2", "ans", "gcd2", "os.println(ans)", "os.println", "os", "ans", "InputStream is", "is", "PrintStream os", "os", "static public long gcd(long a, long b) {\n if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }\n return b;\n }", "gcd", "{\n if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }\n return b;\n }", "if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }", "a > b", "a", "b", "{\n long tmp = a;\n a = b;\n b = tmp;\n }", "long tmp = a;", "tmp", "a", "a = b", "a", "b", "b = tmp", "b", "tmp", "while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }", "a > 0", "a", "0", "{\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }", "long tmpa = a;", "tmpa", "a", "a = b % a", "a", "b % a", "b", "a", "b = tmpa", "b", "tmpa", "return b;", "b", "long a", "a", "long b", "b", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n long K = scan.nextLong();\n\n long ans = 0;\n\n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }\n\n os.println(ans);\n\n }\n\n static public long gcd(long a, long b) {\n if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }\n return b;\n }\n}", "public class Main {\n public static void main(String[] args) throws Exception {\n solve(System.in, System.out);\n }\n\n static void solve(InputStream is, PrintStream os) {\n // Your code here!\n Scanner scan = new Scanner(is);\n long K = scan.nextLong();\n\n long ans = 0;\n\n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n long gcd1 = gcd(i, j);\n for(int k = 1; k <= K; k++) {\n long gcd2 = gcd(gcd1, k);\n ans += gcd2;\n }\n }\n }\n\n os.println(ans);\n\n }\n\n static public long gcd(long a, long b) {\n if(a > b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n while(a > 0) {\n long tmpa = a;\n a = b % a;\n b = tmpa;\n }\n return b;\n }\n}", "Main" ]
import java.io.InputStream; import java.io.PrintStream; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { solve(System.in, System.out); } static void solve(InputStream is, PrintStream os) { // Your code here! Scanner scan = new Scanner(is); long K = scan.nextLong(); long ans = 0; for(int i = 1; i <= K; i++) { for(int j = 1; j <= K; j++) { long gcd1 = gcd(i, j); for(int k = 1; k <= K; k++) { long gcd2 = gcd(gcd1, k); ans += gcd2; } } } os.println(ans); } static public long gcd(long a, long b) { if(a > b) { long tmp = a; a = b; b = tmp; } while(a > 0) { long tmpa = a; a = b % a; b = tmpa; } return b; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 29, 4, 13, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 4, 18, 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 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], [ 14, 15 ], [ 14, 16 ], [ 14, 17 ], [ 8, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 18, 22 ], [ 22, 23 ], [ 8, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 25, 28 ], [ 28, 29 ], [ 28, 30 ], [ 6, 31 ], [ 31, 32 ], [ 6, 33 ], [ 33, 34 ], [ 109, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 38, 40 ], [ 37, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 37, 46 ], [ 46, 47 ], [ 46, 48 ], [ 37, 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 ], [ 62, 67 ], [ 67, 68 ], [ 67, 69 ], [ 62, 70 ], [ 70, 71 ], [ 71, 72 ], [ 62, 73 ], [ 74, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 77, 78 ], [ 77, 79 ], [ 75, 80 ], [ 80, 81 ], [ 80, 82 ], [ 75, 83 ], [ 83, 84 ], [ 84, 85 ], [ 75, 86 ], [ 87, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 90, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 93, 96 ], [ 37, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 97, 102 ], [ 37, 103 ], [ 103, 104 ], [ 104, 105 ], [ 35, 106 ], [ 106, 107 ], [ 0, 108 ], [ 108, 109 ], [ 108, 110 ] ]
[ "import java.util.*;\npublic class Main {\n\n private static long gcd(long m, long n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n\n int k = sc.nextInt();\n int ans = 0;\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(ans);\n\n sc.close();\n\n }\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\n private static long gcd(long m, long n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n\n int k = sc.nextInt();\n int ans = 0;\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(ans);\n\n sc.close();\n\n }\n}", "Main", "private static long gcd(long m, long n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }", "gcd", "{\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }", "if(m < n) return gcd(n, m);", "m < n", "m", "n", "return gcd(n, m);", "gcd(n, m)", "gcd", "n", "m", "if(n == 0) return m;", "n == 0", "n", "0", "return m;", "m", "return gcd(n, m % n);", "gcd(n, m % n)", "gcd", "n", "m % n", "m", "n", "long m", "m", "long n", "n", "public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n\n int k = sc.nextInt();\n int ans = 0;\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(ans);\n\n sc.close();\n\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n\n int k = sc.nextInt();\n int ans = 0;\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(ans);\n\n sc.close();\n\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }", "for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }", "{\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }", "for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n ans += gcd(a, gcd(b,c));\n }", "{\n ans += gcd(a, gcd(b,c));\n }", "ans += gcd(a, gcd(b,c))", "ans", "gcd(a, gcd(b,c))", "gcd", "a", "gcd(b,c)", "gcd", "b", "c", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "sc.close()", "sc.close", "sc", "String args[]", "args", "public class Main {\n\n private static long gcd(long m, long n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n\n int k = sc.nextInt();\n int ans = 0;\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(ans);\n\n sc.close();\n\n }\n}", "public class Main {\n\n private static long gcd(long m, long n) {\n if(m < n) return gcd(n, m);\n if(n == 0) return m;\n return gcd(n, m % n);\n }\n\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n\n int k = sc.nextInt();\n int ans = 0;\n\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b,c));\n }\n }\n }\n System.out.println(ans);\n\n sc.close();\n\n }\n}", "Main" ]
import java.util.*; public class Main { private static long gcd(long m, long n) { if(m < n) return gcd(n, m); if(n == 0) return m; return gcd(n, m % n); } public static void main(String args[]) { Scanner sc = new Scanner(System.in); int k = sc.nextInt(); int ans = 0; for (int a = 1; a <= k; a++) { for (int b = 1; b <= k; b++) { for (int c = 1; c <= k; c++) { ans += gcd(a, gcd(b,c)); } } } System.out.println(ans); sc.close(); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 13, 17, 41, 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, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 136, 5 ], [ 136, 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 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 8, 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 ], [ 71, 72 ], [ 72, 73 ], [ 72, 74 ], [ 74, 75 ], [ 74, 76 ], [ 71, 77 ], [ 70, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 78, 82 ], [ 82, 83 ], [ 82, 84 ], [ 69, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 89, 90 ], [ 89, 91 ], [ 86, 92 ], [ 85, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 97, 99 ], [ 69, 100 ], [ 100, 101 ], [ 100, 102 ], [ 69, 103 ], [ 103, 104 ], [ 103, 105 ], [ 69, 106 ], [ 106, 107 ], [ 106, 108 ], [ 69, 109 ], [ 109, 110 ], [ 109, 111 ], [ 69, 112 ], [ 112, 113 ], [ 112, 114 ], [ 56, 115 ], [ 115, 116 ], [ 115, 117 ], [ 56, 118 ], [ 118, 119 ], [ 118, 120 ], [ 43, 121 ], [ 121, 122 ], [ 121, 123 ], [ 43, 124 ], [ 124, 125 ], [ 124, 126 ], [ 8, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 127, 132 ], [ 6, 133 ], [ 133, 134 ], [ 0, 135 ], [ 135, 136 ], [ 135, 137 ] ]
[ "import java.util.*;\n \npublic class Main {\n public static void main(String[] args) throws Exception {\nScanner sc=new Scanner(System.in);\nint a=sc.nextInt();\nint b=0;\nint c=1;\nint d=1;\nint e=1;\nint r;\nfor(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}\nSystem.out.println(b);\n}\n}", "import java.util.*;", "util.*", "java", "public class Main {\n public static void main(String[] args) throws Exception {\nScanner sc=new Scanner(System.in);\nint a=sc.nextInt();\nint b=0;\nint c=1;\nint d=1;\nint e=1;\nint r;\nfor(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}\nSystem.out.println(b);\n}\n}", "Main", "public static void main(String[] args) throws Exception {\nScanner sc=new Scanner(System.in);\nint a=sc.nextInt();\nint b=0;\nint c=1;\nint d=1;\nint e=1;\nint r;\nfor(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}\nSystem.out.println(b);\n}", "main", "{\nScanner sc=new Scanner(System.in);\nint a=sc.nextInt();\nint b=0;\nint c=1;\nint d=1;\nint e=1;\nint r;\nfor(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}\nSystem.out.println(b);\n}", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int a=sc.nextInt();", "a", "sc.nextInt()", "sc.nextInt", "sc", "int b=0;", "b", "0", "int c=1;", "c", "1", "int d=1;", "d", "1", "int e=1;", "e", "1", "int r;", "r", "for(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}", "int i=1;", "int i=1;", "i", "1", "i<=a", "i", "a", "i++", "i++", "i", "{\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}", "{\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}", "for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}", "int j=1;", "int j=1;", "j", "1", "j<=a", "j", "a", "j++", "j++", "j", "{\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}", "{\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}", "for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}", "int k=1;", "int k=1;", "k", "1", "k<=a", "k", "a", "k++", "k++", "k", "{\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}", "{\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}", "while((r=c%d)!=0){\n c=d;\n d=r;\n}", "(r=c%d)!=0", "(r=c%d)", "r", "c%d", "c", "d", "0", "{\n c=d;\n d=r;\n}", "c=d", "c", "d", "d=r", "d", "r", "while((r=d%e)!=0){\n d=e;\n e=r;\n}", "(r=d%e)!=0", "(r=d%e)", "r", "d%e", "d", "e", "0", "{\n d=e;\n e=r;\n}", "d=e", "d", "e", "e=r", "e", "r", "b+=e", "b", "e", "c=k", "c", "k", "d=j", "d", "j", "e=i", "e", "i", "c+=1", "c", "1", "c=1", "c", "1", "d+=1", "d", "1", "d=1", "d", "1", "e+=1", "e", "1", "System.out.println(b)", "System.out.println", "System.out", "System", "System.out", "b", "String[] args", "args", "public class Main {\n public static void main(String[] args) throws Exception {\nScanner sc=new Scanner(System.in);\nint a=sc.nextInt();\nint b=0;\nint c=1;\nint d=1;\nint e=1;\nint r;\nfor(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}\nSystem.out.println(b);\n}\n}", "public class Main {\n public static void main(String[] args) throws Exception {\nScanner sc=new Scanner(System.in);\nint a=sc.nextInt();\nint b=0;\nint c=1;\nint d=1;\nint e=1;\nint r;\nfor(int i=1;i<=a;i++){\n for(int j=1;j<=a;j++){\n for(int k=1;k<=a;k++){\nwhile((r=c%d)!=0){\n c=d;\n d=r;\n}\nwhile((r=d%e)!=0){\n d=e;\n e=r;\n}\nb+=e;\nc=k;\nd=j;\ne=i;\n c+=1;\n}\n c=1;\n d+=1;\n}\n d=1;\n e+=1;\n}\nSystem.out.println(b);\n}\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int b=0; int c=1; int d=1; int e=1; int r; for(int i=1;i<=a;i++){ for(int j=1;j<=a;j++){ for(int k=1;k<=a;k++){ while((r=c%d)!=0){ c=d; d=r; } while((r=d%e)!=0){ d=e; e=r; } b+=e; c=k; d=j; e=i; c+=1; } c=1; d+=1; } d=1; e+=1; } System.out.println(b); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 2, 17, 4, 18, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 41, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 13, 14, 2, 13, 17, 30, 29, 13, 14, 2, 13, 13, 30, 29, 4, 13, 2, 13, 13, 13, 29, 4, 13, 13, 2, 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 ], [ 147, 11 ], [ 147, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 19, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 19, 24 ], [ 24, 25 ], [ 24, 26 ], [ 26, 27 ], [ 27, 28 ], [ 15, 29 ], [ 29, 30 ], [ 30, 31 ], [ 30, 32 ], [ 29, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 35, 38 ], [ 38, 39 ], [ 39, 40 ], [ 29, 41 ], [ 41, 42 ], [ 41, 43 ], [ 29, 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 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 82, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 82, 95 ], [ 95, 96 ], [ 95, 97 ], [ 29, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 12, 104 ], [ 104, 105 ], [ 147, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 109, 110 ], [ 110, 111 ], [ 110, 112 ], [ 109, 113 ], [ 113, 114 ], [ 114, 115 ], [ 108, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 121, 122 ], [ 108, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 128, 129 ], [ 129, 130 ], [ 129, 131 ], [ 131, 132 ], [ 131, 133 ], [ 129, 134 ], [ 108, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 136, 139 ], [ 139, 140 ], [ 139, 141 ], [ 106, 142 ], [ 142, 143 ], [ 106, 144 ], [ 144, 145 ], [ 0, 146 ], [ 146, 147 ], [ 146, 148 ] ]
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\n\npublic class Main {\n public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }\n static int gcd(int a,int b){\n if(a==0){\n return b;\n }\n if(b==0){\n return a;\n }\n if(a>b){\n return gcd(a%b,b);\n }\n return gcd(a,b%a);\n\n }\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.HashMap;", "HashMap", "java.util", "public class Main {\n public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }\n static int gcd(int a,int b){\n if(a==0){\n return b;\n }\n if(b==0){\n return a;\n }\n if(a>b){\n return gcd(a%b,b);\n }\n return gcd(a,b%a);\n\n }\n}", "Main", "public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }", "main", "{\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }", "try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }", "catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }", "Exception e", "{\n System.out.println(\"KKKK \"+e.getMessage());\n }", "System.out.println(\"KKKK \"+e.getMessage())", "System.out.println", "System.out", "System", "System.out", "\"KKKK \"+e.getMessage()", "\"KKKK \"", "e.getMessage()", "e.getMessage", "e", "{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }", "BufferedReader br=new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int t=Integer.parseInt(br.readLine());", "t", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "long sum=0;", "sum", "0", "for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=t", "i", "t", "i++", "i++", "i", "{\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }", "{\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }", "for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=t", "j", "t", "j++", "j++", "j", "{\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }", "{\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }", "for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }", "int k=1;", "int k=1;", "k", "1", "k<=t", "k", "t", "k++", "k++", "k", "{\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }", "{\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }", "int u=gcd(j,k);", "u", "gcd(j,k)", "gcd", "j", "k", "int p=gcd(i,u);", "p", "gcd(i,u)", "gcd", "i", "u", "sum+=p", "sum", "p", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "static int gcd(int a,int b){\n if(a==0){\n return b;\n }\n if(b==0){\n return a;\n }\n if(a>b){\n return gcd(a%b,b);\n }\n return gcd(a,b%a);\n\n }", "gcd", "{\n if(a==0){\n return b;\n }\n if(b==0){\n return a;\n }\n if(a>b){\n return gcd(a%b,b);\n }\n return gcd(a,b%a);\n\n }", "if(a==0){\n return b;\n }", "a==0", "a", "0", "{\n return b;\n }", "return b;", "b", "if(b==0){\n return a;\n }", "b==0", "b", "0", "{\n return a;\n }", "return a;", "a", "if(a>b){\n return gcd(a%b,b);\n }", "a>b", "a", "b", "{\n return gcd(a%b,b);\n }", "return gcd(a%b,b);", "gcd(a%b,b)", "gcd", "a%b", "a", "b", "b", "return gcd(a,b%a);", "gcd(a,b%a)", "gcd", "a", "b%a", "b", "a", "int a", "a", "int b", "b", "public class Main {\n public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }\n static int gcd(int a,int b){\n if(a==0){\n return b;\n }\n if(b==0){\n return a;\n }\n if(a>b){\n return gcd(a%b,b);\n }\n return gcd(a,b%a);\n\n }\n}", "public class Main {\n public static void main(String[] args){\n try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n int t=Integer.parseInt(br.readLine());\n long sum=0;\n for(int i=1;i<=t;i++){\n for(int j=1;j<=t;j++){\n for(int k=1;k<=t;k++){\n int u=gcd(j,k);\n int p=gcd(i,u);\n sum+=p;\n }\n }\n }\n System.out.println(sum);\n\n }catch(Exception e){\n System.out.println(\"KKKK \"+e.getMessage());\n }\n }\n static int gcd(int a,int b){\n if(a==0){\n return b;\n }\n if(b==0){\n return a;\n }\n if(a>b){\n return gcd(a%b,b);\n }\n return gcd(a,b%a);\n\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.HashMap; public class Main { public static void main(String[] args){ try{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int t=Integer.parseInt(br.readLine()); long sum=0; for(int i=1;i<=t;i++){ for(int j=1;j<=t;j++){ for(int k=1;k<=t;k++){ int u=gcd(j,k); int p=gcd(i,u); sum+=p; } } } System.out.println(sum); }catch(Exception e){ System.out.println("KKKK "+e.getMessage()); } } static int gcd(int a,int b){ if(a==0){ return b; } if(b==0){ return a; } if(a>b){ return gcd(a%b,b); } return gcd(a,b%a); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 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, 0, 13, 13, 0, 13, 13, 0, 13, 13, 41, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 2, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 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 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 67, 71 ], [ 71, 72 ], [ 71, 73 ], [ 67, 74 ], [ 74, 75 ], [ 74, 76 ], [ 67, 77 ], [ 77, 78 ], [ 77, 79 ], [ 79, 80 ], [ 80, 81 ], [ 79, 82 ], [ 79, 83 ], [ 67, 84 ], [ 84, 85 ], [ 84, 86 ], [ 86, 87 ], [ 87, 88 ], [ 86, 89 ], [ 86, 90 ], [ 67, 91 ], [ 91, 92 ], [ 91, 93 ], [ 93, 94 ], [ 93, 95 ], [ 8, 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{\n public static void main(String [] args)\n {\n Scanner key = new Scanner(System.in);\n int num = key.nextInt();\n long sum = 0;\n int a = 1;\n int b = 1;\n int c = 1;\n for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }\n System.out.println(sum);\n }\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main\n{\n public static void main(String [] args)\n {\n Scanner key = new Scanner(System.in);\n int num = key.nextInt();\n long sum = 0;\n int a = 1;\n int b = 1;\n int c = 1;\n for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }\n System.out.println(sum);\n }\n}", "Main", "public static void main(String [] args)\n {\n Scanner key = new Scanner(System.in);\n int num = key.nextInt();\n long sum = 0;\n int a = 1;\n int b = 1;\n int c = 1;\n for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }\n System.out.println(sum);\n }", "main", "{\n Scanner key = new Scanner(System.in);\n int num = key.nextInt();\n long sum = 0;\n int a = 1;\n int b = 1;\n int c = 1;\n for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }\n System.out.println(sum);\n }", "Scanner key = new Scanner(System.in);", "key", "new Scanner(System.in)", "int num = key.nextInt();", "num", "key.nextInt()", "key.nextInt", "key", "long sum = 0;", "sum", "0", "int a = 1;", "a", "1", "int b = 1;", "b", "1", "int c = 1;", "c", "1", "for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }", "int i =1;", "int i =1;", "i", "1", "i<=num", "i", "num", "i++", "i++", "i", "{\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }", "{\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }", "for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }", "int j = 1 ;", "int j = 1 ;", "j", "1", "j<=num", "j", "num", "j++", "j++", "j", "{\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }", "{\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }", "for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }", "int k = 1;", "int k = 1;", "k", "1", "k<=num", "k", "num", "k++", "k++", "k", "{\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }", "{\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }", "a = i", "a", "i", "b = j", "b", "j", "c = k", "c", "k", "int min = Math.min(a,b);", "min", "Math.min(a,b)", "Math.min", "Math", "a", "b", "min = Math.min(min,c)", "min", "Math.min(min,c)", "Math.min", "Math", "min", "c", "sum = sum +min", "sum", "sum +min", "sum", "min", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String [] args", "args", "public class Main\n{\n public static void main(String [] args)\n {\n Scanner key = new Scanner(System.in);\n int num = key.nextInt();\n long sum = 0;\n int a = 1;\n int b = 1;\n int c = 1;\n for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }\n System.out.println(sum);\n }\n}", "public class Main\n{\n public static void main(String [] args)\n {\n Scanner key = new Scanner(System.in);\n int num = key.nextInt();\n long sum = 0;\n int a = 1;\n int b = 1;\n int c = 1;\n for(int i =1; i<=num ; i++)\n {\n for(int j = 1 ; j<=num ; j++)\n {\n for(int k = 1; k<=num; k++)\n {\n a = i;\n b = j;\n c = k;\n int min = Math.min(a,b);\n min = Math.min(min,c);\n end:\n for(int l = min; l>=1; l--)\n {\n if((a % l == 0) && (b % l == 0 )&& (c % l == 0))\n {\n min = l;\n break end;\n }\n }\n \n \n sum = sum +min;\n \n \n \n }\n }\n }\n System.out.println(sum);\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String [] args) { Scanner key = new Scanner(System.in); int num = key.nextInt(); long sum = 0; int a = 1; int b = 1; int c = 1; for(int i =1; i<=num ; i++) { for(int j = 1 ; j<=num ; j++) { for(int k = 1; k<=num; k++) { a = i; b = j; c = k; int min = Math.min(a,b); min = Math.min(min,c); end: for(int l = min; l>=1; l--) { if((a % l == 0) && (b % l == 0 )&& (c % l == 0)) { min = l; break end; } } sum = sum +min; } } } System.out.println(sum); } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 0, 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, 41, 13, 4, 18, 13, 13, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 40, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 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 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 145, 14 ], [ 145, 15 ], [ 15, 16 ], [ 145, 17 ], [ 17, 18 ], [ 17, 19 ], [ 19, 20 ], [ 20, 21 ], [ 20, 22 ], [ 19, 23 ], [ 23, 24 ], [ 23, 25 ], [ 25, 26 ], [ 26, 27 ], [ 19, 28 ], [ 28, 29 ], [ 28, 30 ], [ 19, 31 ], [ 31, 32 ], [ 31, 33 ], [ 19, 34 ], [ 34, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 34, 39 ], [ 39, 40 ], [ 39, 41 ], [ 34, 42 ], [ 42, 43 ], [ 43, 44 ], [ 34, 45 ], [ 46, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 49, 50 ], [ 49, 51 ], [ 47, 52 ], [ 52, 53 ], [ 52, 54 ], [ 47, 55 ], [ 55, 56 ], [ 56, 57 ], [ 47, 58 ], [ 59, 59 ], [ 59, 60 ], [ 60, 61 ], [ 60, 62 ], [ 62, 63 ], [ 63, 64 ], [ 62, 65 ], [ 62, 66 ], [ 59, 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 ], [ 80, 82 ], [ 82, 83 ], [ 83, 84 ], [ 82, 85 ], [ 82, 86 ], [ 19, 87 ], [ 87, 88 ], [ 88, 89 ], [ 89, 90 ], [ 89, 91 ], [ 87, 92 ], [ 17, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 97, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 99, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 99, 107 ], [ 107, 108 ], [ 108, 109 ], [ 108, 110 ], [ 107, 111 ], [ 111, 112 ], [ 112, 113 ], [ 112, 114 ], [ 111, 115 ], [ 115, 116 ], [ 115, 117 ], [ 107, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 99, 122 ], [ 122, 123 ], [ 123, 124 ], [ 123, 125 ], [ 122, 126 ], [ 126, 127 ], [ 127, 128 ], [ 127, 129 ], [ 129, 130 ], [ 129, 131 ], [ 126, 132 ], [ 132, 133 ], [ 132, 134 ], [ 126, 135 ], [ 135, 136 ], [ 135, 137 ], [ 99, 138 ], [ 138, 139 ], [ 97, 140 ], [ 140, 141 ], [ 97, 142 ], [ 142, 143 ], [ 0, 144 ], [ 144, 145 ], [ 144, 146 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\n \npublic class Main {\n \tstatic Gcd gc;\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n \tint result = 0;\n gc = new Gcd();\n \tfor(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }\n System.out.println(result);\n }\n}\n\nclass Gcd{\n\tpublic int gcd(int a,int b){\n \t\tint tmp = 0;\n \t\tint amari=-1;\n \t\tif(a>=b){\n \t\ttmp = a;\n \t\ta = b;\n \t\t}else{\n \t\ttmp = b;\n \t\t}\n\n \t\t while(amari != 0){\n \t\tamari = a%tmp;\n \ta = tmp;\n \ttmp = amari;\n \t\t }\n \t\treturn a;\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.*;", "util.*", "java", "public class Main {\n \tstatic Gcd gc;\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n \tint result = 0;\n gc = new Gcd();\n \tfor(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }\n System.out.println(result);\n }\n}", "Main", "static Gcd gc;", "gc", "public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n \tint result = 0;\n gc = new Gcd();\n \tfor(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }\n System.out.println(result);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n \tint result = 0;\n gc = new Gcd();\n \tfor(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }\n System.out.println(result);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int num = sc.nextInt();", "num", "sc.nextInt()", "sc.nextInt", "sc", "int result = 0;", "result", "0", "gc = new Gcd()", "gc", "new Gcd()", "for(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }", "int i=1;", "int i=1;", "i", "1", "i<=num", "i", "num", "i++", "i++", "i", "{\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }", "{\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }", "for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }", "int j=1;", "int j=1;", "j", "1", "j<=num", "j", "num", "j++", "j++", "j", "{\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }", "{\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }", "int tmp = gc.gcd(i,j);", "tmp", "gc.gcd(i,j)", "gc.gcd", "gc", "i", "j", "for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }", "int k=1;", "int k=1;", "k", "1", "k<=num", "k", "num", "k++", "k++", "k", "{\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }", "{\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }", "result += gc.gcd(tmp,k)", "result", "gc.gcd(tmp,k)", "gc.gcd", "gc", "tmp", "k", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "class Gcd{\n\tpublic int gcd(int a,int b){\n \t\tint tmp = 0;\n \t\tint amari=-1;\n \t\tif(a>=b){\n \t\ttmp = a;\n \t\ta = b;\n \t\t}else{\n \t\ttmp = b;\n \t\t}\n\n \t\t while(amari != 0){\n \t\tamari = a%tmp;\n \ta = tmp;\n \ttmp = amari;\n \t\t }\n \t\treturn a;\n\t}\n}", "Gcd", "public int gcd(int a,int b){\n \t\tint tmp = 0;\n \t\tint amari=-1;\n \t\tif(a>=b){\n \t\ttmp = a;\n \t\ta = b;\n \t\t}else{\n \t\ttmp = b;\n \t\t}\n\n \t\t while(amari != 0){\n \t\tamari = a%tmp;\n \ta = tmp;\n \ttmp = amari;\n \t\t }\n \t\treturn a;\n\t}", "gcd", "{\n \t\tint tmp = 0;\n \t\tint amari=-1;\n \t\tif(a>=b){\n \t\ttmp = a;\n \t\ta = b;\n \t\t}else{\n \t\ttmp = b;\n \t\t}\n\n \t\t while(amari != 0){\n \t\tamari = a%tmp;\n \ta = tmp;\n \ttmp = amari;\n \t\t }\n \t\treturn a;\n\t}", "int tmp = 0;", "tmp", "0", "int amari=-1;", "amari", "-1", "1", "if(a>=b){\n \t\ttmp = a;\n \t\ta = b;\n \t\t}else{\n \t\ttmp = b;\n \t\t}", "a>=b", "a", "b", "{\n \t\ttmp = a;\n \t\ta = b;\n \t\t}", "tmp = a", "tmp", "a", "a = b", "a", "b", "{\n \t\ttmp = b;\n \t\t}", "tmp = b", "tmp", "b", "while(amari != 0){\n \t\tamari = a%tmp;\n \ta = tmp;\n \ttmp = amari;\n \t\t }", "amari != 0", "amari", "0", "{\n \t\tamari = a%tmp;\n \ta = tmp;\n \ttmp = amari;\n \t\t }", "amari = a%tmp", "amari", "a%tmp", "a", "tmp", "a = tmp", "a", "tmp", "tmp = amari", "tmp", "amari", "return a;", "a", "int a", "a", "int b", "b", "public class Main {\n \tstatic Gcd gc;\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n \tint result = 0;\n gc = new Gcd();\n \tfor(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }\n System.out.println(result);\n }\n}", "public class Main {\n \tstatic Gcd gc;\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n \tint result = 0;\n gc = new Gcd();\n \tfor(int i=1;i<=num;i++){\n for(int j=1;j<=num;j++){\n int tmp = gc.gcd(i,j);\n for(int k=1;k<=num;k++){\n \t\t//最初の2数の最大公約数を取得\n \t\t\tresult += gc.gcd(tmp,k);\n }\n }\n }\n System.out.println(result);\n }\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { static Gcd gc; public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int result = 0; gc = new Gcd(); for(int i=1;i<=num;i++){ for(int j=1;j<=num;j++){ int tmp = gc.gcd(i,j); for(int k=1;k<=num;k++){ //最初の2数の最大公約数を取得 result += gc.gcd(tmp,k); } } } System.out.println(result); } } class Gcd{ public int gcd(int a,int b){ int tmp = 0; int amari=-1; if(a>=b){ tmp = a; a = b; }else{ tmp = b; } while(amari != 0){ amari = a%tmp; a = tmp; tmp = amari; } return a; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 13, 0, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 41, 13, 2, 13, 13, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 13, 23, 13, 23, 13, 6, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 18, 36, 13, 13, 20, 23, 13, 12, 13, 30, 0, 18, 36, 13, 18, 13, 13, 0, 18, 36, 13, 20, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 18, 36, 13, 13, 20, 23, 13, 12, 13, 30, 4, 18, 36, 13, 13, 17, 23, 13, 23, 13, 12, 13, 30, 4, 18, 18, 18, 36, 13, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 0, 18, 36, 13, 20, 18, 36, 13, 12, 13, 30, 0, 18, 18, 36, 13, 13, 17, 41, 13, 17, 28, 13, 4, 18, 18, 18, 36, 13, 13, 30, 30, 14, 2, 4, 18, 13, 13, 30, 9, 14, 18, 13, 4, 18, 13, 30, 0, 13, 17, 30, 0, 13, 2, 13, 4, 13, 4, 18, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 18, 18, 36, 13, 13, 23, 13, 6, 13, 41, 13, 41, 13, 20, 12, 13, 30, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 0, 18, 36, 13, 13, 23, 13, 12, 13, 30, 4, 18, 13, 20, 23, 13, 23, 13, 12, 13, 30, 29, 18, 36, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 13, 0, 18, 36, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 18, 36, 13, 12, 13, 30, 29, 18, 36, 13, 6, 13, 41, 13, 41, 13, 12, 13, 30, 0, 18, 36, 13, 20, 23, 13, 12, 13, 30, 41, 13, 4, 13, 41, 13, 20, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 18, 13, 13, 29, 13, 12, 13, 30, 29, 4, 18, 4, 13, 17, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 37, 20, 30, 29, 4, 18, 13, 12, 13, 30, 14, 2, 2, 18, 36, 13, 17, 40, 4, 18, 18, 36, 13, 30, 38, 5, 13, 30, 4, 18, 13, 37, 20, 30, 0, 18, 36, 13, 20, 29, 4, 18, 18, 36, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 29, 4, 18, 13, 4, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 12, 13, 30, 41, 13, 20, 13, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 13, 29, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 19, 20 ], [ 19, 21 ], [ 0, 22 ], [ 22, 23 ], [ 22, 24 ], [ 0, 25 ], [ 25, 26 ], [ 25, 27 ], [ 0, 28 ], [ 701, 29 ], [ 701, 30 ], [ 30, 31 ], [ 30, 32 ], [ 701, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 39, 40 ], [ 35, 41 ], [ 41, 42 ], [ 41, 43 ], [ 35, 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 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 85, 88 ], [ 82, 89 ], [ 89, 90 ], [ 89, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 35, 95 ], [ 95, 96 ], [ 96, 97 ], [ 97, 98 ], [ 97, 99 ], [ 95, 100 ], [ 33, 101 ], [ 101, 102 ], [ 701, 103 ], [ 103, 104 ], [ 103, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 105, 109 ], [ 109, 110 ], [ 109, 111 ], [ 105, 112 ], [ 112, 113 ], [ 113, 114 ], [ 113, 115 ], [ 112, 116 ], [ 116, 117 ], [ 117, 118 ], [ 117, 119 ], [ 116, 120 ], [ 120, 121 ], [ 120, 122 ], [ 112, 123 ], [ 123, 124 ], [ 124, 125 ], [ 124, 126 ], [ 123, 127 ], [ 127, 128 ], [ 127, 129 ], [ 105, 130 ], [ 130, 131 ], [ 130, 132 ], [ 132, 133 ], [ 132, 134 ], [ 105, 135 ], [ 135, 136 ], [ 136, 137 ], [ 136, 138 ], [ 135, 139 ], [ 139, 140 ], [ 105, 141 ], [ 141, 142 ], [ 142, 143 ], [ 142, 144 ], [ 142, 145 ], [ 103, 146 ], [ 146, 147 ], [ 103, 148 ], [ 148, 149 ], [ 701, 150 ], [ 150, 151 ], [ 150, 152 ], [ 152, 153 ], [ 150, 154 ], [ 154, 155 ], [ 150, 156 ], [ 156, 157 ], [ 150, 158 ], [ 158, 159 ], [ 158, 160 ], [ 160, 161 ], [ 161, 162 ], [ 162, 163 ], [ 162, 164 ], [ 161, 165 ], [ 160, 166 ], [ 166, 167 ], [ 167, 168 ], [ 167, 169 ], [ 166, 170 ], [ 160, 172 ], [ 172, 173 ], [ 173, 174 ], [ 174, 175 ], [ 174, 176 ], [ 172, 177 ], [ 177, 178 ], [ 177, 179 ], [ 172, 180 ], [ 180, 181 ], [ 181, 182 ], [ 172, 183 ], [ 184, 184 ], [ 184, 185 ], [ 185, 186 ], [ 186, 187 ], [ 187, 188 ], [ 187, 189 ], [ 186, 190 ], [ 185, 191 ], [ 158, 192 ], [ 192, 193 ], [ 150, 194 ], [ 194, 195 ], [ 194, 196 ], [ 196, 197 ], [ 197, 198 ], [ 198, 199 ], [ 198, 200 ], [ 197, 201 ], [ 201, 202 ], [ 201, 203 ], [ 196, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 204, 208 ], [ 209, 210 ], [ 209, 211 ], [ 196, 212 ], [ 212, 213 ], [ 213, 214 ], [ 214, 215 ], [ 214, 216 ], [ 212, 217 ], [ 217, 218 ], [ 217, 219 ], [ 219, 220 ], [ 219, 221 ], [ 212, 222 ], [ 222, 223 ], [ 223, 224 ], [ 212, 225 ], [ 226, 226 ], [ 226, 227 ], [ 227, 228 ], [ 228, 229 ], [ 229, 230 ], [ 229, 231 ], [ 228, 232 ], [ 227, 233 ], [ 194, 234 ], [ 234, 235 ], [ 150, 236 ], [ 236, 237 ], [ 236, 238 ], [ 238, 239 ], [ 239, 240 ], [ 240, 241 ], [ 239, 242 ], [ 239, 243 ], [ 239, 244 ], [ 236, 245 ], [ 245, 246 ], [ 236, 247 ], [ 247, 248 ], [ 150, 249 ], [ 249, 250 ], [ 249, 251 ], [ 251, 252 ], [ 252, 253 ], [ 253, 254 ], [ 254, 255 ], [ 255, 256 ], [ 255, 257 ], [ 254, 258 ], [ 252, 259 ], [ 252, 260 ], [ 249, 261 ], [ 261, 262 ], [ 249, 263 ], [ 263, 264 ], [ 249, 265 ], [ 265, 266 ], [ 150, 267 ], [ 267, 268 ], [ 267, 269 ], [ 269, 270 ], [ 270, 271 ], [ 271, 272 ], [ 271, 273 ], [ 270, 274 ], [ 275, 276 ], [ 275, 277 ], [ 150, 278 ], [ 278, 279 ], [ 278, 280 ], [ 280, 281 ], [ 281, 282 ], [ 282, 283 ], [ 283, 284 ], [ 283, 285 ], [ 282, 286 ], [ 281, 287 ], [ 280, 288 ], [ 288, 289 ], [ 288, 290 ], [ 280, 291 ], [ 291, 292 ], [ 291, 293 ], [ 293, 294 ], [ 294, 295 ], [ 295, 296 ], [ 296, 297 ], [ 296, 298 ], [ 295, 299 ], [ 291, 300 ], [ 301, 301 ], [ 301, 302 ], [ 302, 303 ], [ 303, 304 ], [ 304, 305 ], [ 305, 306 ], [ 303, 307 ], [ 302, 308 ], [ 308, 309 ], [ 301, 310 ], [ 310, 311 ], [ 311, 312 ], [ 311, 313 ], [ 313, 314 ], [ 314, 315 ], [ 310, 316 ], [ 316, 317 ], [ 317, 318 ], [ 317, 319 ], [ 310, 320 ], [ 320, 321 ], [ 321, 322 ], [ 321, 323 ], [ 323, 324 ], [ 323, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 328, 329 ], [ 325, 330 ], [ 280, 331 ], [ 331, 332 ], [ 278, 333 ], [ 333, 334 ], [ 278, 335 ], [ 335, 336 ], [ 150, 337 ], [ 337, 338 ], [ 337, 339 ], [ 339, 340 ], [ 340, 341 ], [ 341, 342 ], [ 342, 343 ], [ 342, 344 ], [ 341, 345 ], [ 337, 346 ], [ 346, 347 ], [ 701, 348 ], [ 348, 349 ], [ 348, 350 ], [ 350, 351 ], [ 348, 352 ], [ 352, 353 ], [ 352, 354 ], [ 348, 355 ], [ 355, 356 ], [ 355, 357 ], [ 348, 358 ], [ 358, 359 ], [ 358, 360 ], [ 360, 361 ], [ 361, 362 ], [ 362, 363 ], [ 362, 364 ], [ 361, 365 ], [ 358, 366 ], [ 366, 367 ], [ 348, 368 ], [ 368, 369 ], [ 368, 370 ], [ 370, 371 ], [ 371, 372 ], [ 372, 373 ], [ 372, 374 ], [ 371, 375 ], [ 368, 376 ], [ 376, 377 ], [ 348, 378 ], [ 378, 379 ], [ 378, 380 ], [ 380, 381 ], [ 381, 382 ], [ 382, 383 ], [ 381, 384 ], [ 378, 385 ], [ 385, 386 ], [ 378, 387 ], [ 387, 388 ], [ 348, 389 ], [ 389, 390 ], [ 389, 391 ], [ 391, 392 ], [ 392, 393 ], [ 393, 394 ], [ 393, 395 ], [ 701, 396 ], [ 396, 397 ], [ 396, 398 ], [ 398, 399 ], [ 396, 400 ], [ 400, 401 ], [ 396, 402 ], [ 402, 403 ], [ 402, 404 ], [ 404, 405 ], [ 405, 406 ], [ 406, 407 ], [ 406, 408 ], [ 405, 409 ], [ 404, 410 ], [ 410, 411 ], [ 411, 412 ], [ 411, 413 ], [ 410, 414 ], [ 402, 415 ], [ 415, 416 ], [ 402, 417 ], [ 417, 418 ], [ 396, 419 ], [ 419, 420 ], [ 419, 421 ], [ 421, 422 ], [ 422, 423 ], [ 423, 424 ], [ 423, 425 ], [ 396, 426 ], [ 426, 427 ], [ 426, 428 ], [ 428, 429 ], [ 429, 430 ], [ 430, 431 ], [ 430, 432 ], [ 701, 433 ], [ 433, 434 ], [ 433, 435 ], [ 435, 436 ], [ 433, 437 ], [ 437, 438 ], [ 433, 439 ], [ 439, 440 ], [ 439, 441 ], [ 441, 442 ], [ 442, 443 ], [ 443, 444 ], [ 443, 445 ], [ 442, 446 ], [ 439, 447 ], [ 447, 448 ], [ 433, 449 ], [ 449, 450 ], [ 449, 451 ], [ 451, 452 ], [ 452, 453 ], [ 452, 454 ], [ 454, 455 ], [ 451, 456 ], [ 456, 457 ], [ 456, 458 ], [ 459, 460 ], [ 459, 461 ], [ 451, 462 ], [ 462, 463 ], [ 463, 464 ], [ 464, 465 ], [ 464, 466 ], [ 462, 467 ], [ 467, 468 ], [ 467, 469 ], [ 469, 470 ], [ 469, 471 ], [ 462, 472 ], [ 472, 473 ], [ 473, 474 ], [ 462, 475 ], [ 476, 476 ], [ 476, 477 ], [ 477, 478 ], [ 478, 479 ], [ 478, 480 ], [ 477, 481 ], [ 481, 482 ], [ 482, 483 ], [ 481, 484 ], [ 484, 485 ], [ 484, 486 ], [ 451, 487 ], [ 487, 488 ], [ 433, 489 ], [ 489, 490 ], [ 489, 491 ], [ 491, 492 ], [ 492, 493 ], [ 493, 494 ], [ 494, 495 ], [ 495, 496 ], [ 493, 497 ], [ 433, 498 ], [ 498, 499 ], [ 498, 500 ], [ 500, 501 ], [ 501, 502 ], [ 502, 503 ], [ 502, 504 ], [ 504, 505 ], [ 505, 506 ], [ 506, 507 ], [ 504, 508 ], [ 508, 509 ], [ 501, 510 ], [ 510, 511 ], [ 511, 512 ], [ 512, 513 ], [ 513, 514 ], [ 433, 515 ], [ 515, 516 ], [ 515, 517 ], [ 517, 518 ], [ 518, 519 ], [ 519, 520 ], [ 520, 521 ], [ 521, 522 ], [ 521, 523 ], [ 520, 524 ], [ 519, 525 ], [ 525, 526 ], [ 526, 527 ], [ 527, 528 ], [ 528, 529 ], [ 528, 530 ], [ 518, 531 ], [ 531, 532 ], [ 532, 533 ], [ 533, 534 ], [ 533, 535 ], [ 535, 536 ], [ 536, 537 ], [ 537, 538 ], [ 535, 539 ], [ 539, 540 ], [ 532, 541 ], [ 541, 542 ], [ 542, 543 ], [ 543, 544 ], [ 543, 545 ], [ 542, 546 ], [ 517, 547 ], [ 547, 548 ], [ 548, 549 ], [ 549, 550 ], [ 550, 551 ], [ 550, 552 ], [ 433, 553 ], [ 553, 554 ], [ 553, 555 ], [ 555, 556 ], [ 556, 557 ], [ 557, 558 ], [ 558, 559 ], [ 557, 560 ], [ 560, 561 ], [ 433, 562 ], [ 562, 563 ], [ 562, 564 ], [ 564, 565 ], [ 565, 566 ], [ 566, 567 ], [ 567, 568 ], [ 566, 569 ], [ 569, 570 ], [ 433, 571 ], [ 571, 572 ], [ 571, 573 ], [ 573, 574 ], [ 574, 575 ], [ 575, 576 ], [ 576, 577 ], [ 575, 578 ], [ 578, 579 ], [ 433, 580 ], [ 580, 581 ], [ 580, 582 ], [ 582, 583 ], [ 583, 584 ], [ 583, 585 ], [ 582, 587 ], [ 587, 588 ], [ 588, 589 ], [ 589, 590 ], [ 589, 591 ], [ 587, 592 ], [ 592, 593 ], [ 592, 594 ], [ 587, 595 ], [ 595, 596 ], [ 596, 597 ], [ 587, 598 ], [ 599, 599 ], [ 599, 600 ], [ 600, 601 ], [ 601, 602 ], [ 601, 603 ], [ 600, 604 ], [ 604, 605 ], [ 582, 606 ], [ 606, 607 ], [ 580, 608 ], [ 608, 609 ], [ 433, 610 ], [ 610, 611 ], [ 610, 612 ], [ 612, 613 ], [ 613, 614 ], [ 613, 615 ], [ 612, 617 ], [ 617, 618 ], [ 618, 619 ], [ 619, 620 ], [ 619, 621 ], [ 617, 622 ], [ 622, 623 ], [ 622, 624 ], [ 617, 625 ], [ 625, 626 ], [ 626, 627 ], [ 617, 628 ], [ 629, 629 ], [ 629, 630 ], [ 630, 631 ], [ 631, 632 ], [ 631, 633 ], [ 630, 634 ], [ 634, 635 ], [ 612, 636 ], [ 636, 637 ], [ 610, 638 ], [ 638, 639 ], [ 433, 640 ], [ 640, 641 ], [ 640, 642 ], [ 642, 643 ], [ 643, 644 ], [ 643, 645 ], [ 642, 647 ], [ 647, 648 ], [ 648, 649 ], [ 649, 650 ], [ 649, 651 ], [ 647, 652 ], [ 652, 653 ], [ 652, 654 ], [ 647, 655 ], [ 655, 656 ], [ 656, 657 ], [ 647, 658 ], [ 659, 659 ], [ 659, 660 ], [ 660, 661 ], [ 661, 662 ], [ 661, 663 ], [ 660, 664 ], [ 664, 665 ], [ 642, 666 ], [ 666, 667 ], [ 640, 668 ], [ 668, 669 ], [ 433, 670 ], [ 670, 671 ], [ 670, 672 ], [ 672, 673 ], [ 673, 674 ], [ 673, 675 ], [ 672, 677 ], [ 677, 678 ], [ 678, 679 ], [ 679, 680 ], [ 679, 681 ], [ 677, 682 ], [ 682, 683 ], [ 682, 684 ], [ 677, 685 ], [ 685, 686 ], [ 686, 687 ], [ 677, 688 ], [ 689, 689 ], [ 689, 690 ], [ 690, 691 ], [ 691, 692 ], [ 691, 693 ], [ 690, 694 ], [ 694, 695 ], [ 672, 696 ], [ 696, 697 ], [ 670, 698 ], [ 698, 699 ], [ 0, 700 ], [ 700, 701 ], [ 700, 702 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n private static FastScanner scanner = new FastScanner(System.in);\n\n public static void main(String[] args) {\n int k = scanner.nextInt();\n\n int result = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }\n System.out.println(result);\n }\n\n// private static class Gcd3 {\n//\n// Map<Integer, Integer> amap = new HashMap<>();\n// Map<Integer, Integer> bmap = new HashMap<>();\n// Map<Integer, Integer> cmap = new HashMap<>();\n// int aa;\n// int bb;\n// int cc;\n//\n// public Gcd3(int a, int b, int c) {\n// yakubuna(a);\n// yakubunb(b);\n// yakubunc(c);\n// aa = a;\n// bb = b;\n// cc = c;\n// }\n//\n// private void yakubuna(int a) {\n// int a1 = 0;\n// int a2 = 0;\n// boolean isYakubun = false;\n// for (int i = a - 1; i > 1; i--) {\n// if (a % i == 0) {\n// a1 = i;\n// a2 = a / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubuna(a1);\n// yakubuna(a2);\n// } else {\n// if (amap.containsKey(a)) {\n// amap.put(a, amap.get(a) + 1);\n// } else {\n// amap.put(a, 1);\n// }\n// }\n// }\n// private void yakubunb(int b) {\n// int b1 = 0;\n// int b2 = 0;\n// boolean isYakubun = false;\n// for (int i = b - 1; i > 1; i--) {\n// if (b % i == 0) {\n// b1 = i;\n// b2 = b / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunb(b1);\n// yakubunb(b2);\n// } else {\n// if (bmap.containsKey(b)) {\n// bmap.put(b, bmap.get(b) + 1);\n// } else {\n// bmap.put(b, 1);\n// }\n// }\n// }\n// private void yakubunc(int c) {\n// int c1 = 0;\n// int c2 = 0;\n// boolean isYakubun = false;\n// for (int i = c - 1; i > 1; i--) {\n// if (c % i == 0) {\n// c1 = i;\n// c2 = c / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunc(c1);\n// yakubunc(c2);\n// } else {\n// if (cmap.containsKey(c)) {\n// cmap.put(c, cmap.get(c) + 1);\n// } else {\n// cmap.put(c, 1);\n// }\n// }\n// }\n//\n// public int gcd() {\n// int result = 1;\n//\n// for (Integer i : amap.keySet()) {\n// if (bmap.containsKey(i) && cmap.containsKey(i)) {\n// result = result * i * Math.min(Math.min(amap.get(i), bmap.get(i)), cmap.get(i));\n// }\n// }\n//// System.out.println(\"(\"+ aa + \",\" + bb + \",\" + cc + \") => \" + result);\n// return result;\n// }\n// }\n\n private static int gcd(int s, int t) {\n\n int high = 0;\n int low = 0;\n if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }\n\n int r = high % low;\n if (r == 0) return low;\n return gcd(low, r);\n }\n\n private static class Graph {\n private Vertex[] vertexes;\n private int size;\n private boolean[] seen;\n\n public Graph(int n) {\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }\n\n public Graph(int[] vertexes) {\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }\n\n public void addEdge(int from, int to) {\n this.addEdge(from, to, 0);\n }\n\n public void addEdge(int from, int to, int weight) {\n this.vertexes[from].addEdge(to, weight);\n }\n\n public void initDfs() {\n this.seen = new boolean[this.size];\n }\n\n // 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする\n public boolean dfs(int now, int from) {\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }\n\n public boolean seen(int now) {\n return this.seen[now];\n }\n\n }\n\n private static class Vertex {\n private int value;\n private List<Edge> edges = new ArrayList<>();\n\n public Vertex() {};\n public Vertex(int value) {\n this.value = value;\n }\n\n public void setValue(int value) {\n this.value = value;\n }\n\n public void addEdge(int to, int weight) {\n edges.add(new Edge(to, weight));\n }\n\n public List<Edge> getEdges() {\n return this.edges;\n }\n }\n\n private static class Edge {\n private int to;\n private int weight;\n\n public Edge(int to, int weight) {\n this.to = to;\n this.weight = weight;\n }\n\n public int getTo() {\n return this.to;\n }\n\n public int getWeight() {\n return this.weight;\n }\n }\n\n private static class FastScanner {\n private BufferedReader reader;\n private StringTokenizer tokenizer;\n\n public FastScanner(InputStream in) {\n this.reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public int[] nextLineToIntArray() {\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }\n\n public String[] nextLineToStringArray() {\n return nextLine().split(\"\");\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n\n public String next() {\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String[] nextStringArray(int n) {\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }\n\n public int[] nextIntArray(int n) {\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }\n\n public long[] nextLongArray(int n) {\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }\n\n public double[] nextDoubleArray(int n) {\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }\n }\n\n}", "import java.io.BufferedReader;", "BufferedReader", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStream;", "InputStream", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.util.ArrayList;", "ArrayList", "java.util", "import java.util.HashMap;", "HashMap", "java.util", "import java.util.List;", "List", "java.util", "import java.util.Map;", "Map", "java.util", "import java.util.StringTokenizer;", "StringTokenizer", "java.util", "public class Main {\n\n private static FastScanner scanner = new FastScanner(System.in);\n\n public static void main(String[] args) {\n int k = scanner.nextInt();\n\n int result = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }\n System.out.println(result);\n }\n\n// private static class Gcd3 {\n//\n// Map<Integer, Integer> amap = new HashMap<>();\n// Map<Integer, Integer> bmap = new HashMap<>();\n// Map<Integer, Integer> cmap = new HashMap<>();\n// int aa;\n// int bb;\n// int cc;\n//\n// public Gcd3(int a, int b, int c) {\n// yakubuna(a);\n// yakubunb(b);\n// yakubunc(c);\n// aa = a;\n// bb = b;\n// cc = c;\n// }\n//\n// private void yakubuna(int a) {\n// int a1 = 0;\n// int a2 = 0;\n// boolean isYakubun = false;\n// for (int i = a - 1; i > 1; i--) {\n// if (a % i == 0) {\n// a1 = i;\n// a2 = a / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubuna(a1);\n// yakubuna(a2);\n// } else {\n// if (amap.containsKey(a)) {\n// amap.put(a, amap.get(a) + 1);\n// } else {\n// amap.put(a, 1);\n// }\n// }\n// }\n// private void yakubunb(int b) {\n// int b1 = 0;\n// int b2 = 0;\n// boolean isYakubun = false;\n// for (int i = b - 1; i > 1; i--) {\n// if (b % i == 0) {\n// b1 = i;\n// b2 = b / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunb(b1);\n// yakubunb(b2);\n// } else {\n// if (bmap.containsKey(b)) {\n// bmap.put(b, bmap.get(b) + 1);\n// } else {\n// bmap.put(b, 1);\n// }\n// }\n// }\n// private void yakubunc(int c) {\n// int c1 = 0;\n// int c2 = 0;\n// boolean isYakubun = false;\n// for (int i = c - 1; i > 1; i--) {\n// if (c % i == 0) {\n// c1 = i;\n// c2 = c / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunc(c1);\n// yakubunc(c2);\n// } else {\n// if (cmap.containsKey(c)) {\n// cmap.put(c, cmap.get(c) + 1);\n// } else {\n// cmap.put(c, 1);\n// }\n// }\n// }\n//\n// public int gcd() {\n// int result = 1;\n//\n// for (Integer i : amap.keySet()) {\n// if (bmap.containsKey(i) && cmap.containsKey(i)) {\n// result = result * i * Math.min(Math.min(amap.get(i), bmap.get(i)), cmap.get(i));\n// }\n// }\n//// System.out.println(\"(\"+ aa + \",\" + bb + \",\" + cc + \") => \" + result);\n// return result;\n// }\n// }\n\n private static int gcd(int s, int t) {\n\n int high = 0;\n int low = 0;\n if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }\n\n int r = high % low;\n if (r == 0) return low;\n return gcd(low, r);\n }\n\n private static class Graph {\n private Vertex[] vertexes;\n private int size;\n private boolean[] seen;\n\n public Graph(int n) {\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }\n\n public Graph(int[] vertexes) {\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }\n\n public void addEdge(int from, int to) {\n this.addEdge(from, to, 0);\n }\n\n public void addEdge(int from, int to, int weight) {\n this.vertexes[from].addEdge(to, weight);\n }\n\n public void initDfs() {\n this.seen = new boolean[this.size];\n }\n\n // 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする\n public boolean dfs(int now, int from) {\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }\n\n public boolean seen(int now) {\n return this.seen[now];\n }\n\n }\n\n private static class Vertex {\n private int value;\n private List<Edge> edges = new ArrayList<>();\n\n public Vertex() {};\n public Vertex(int value) {\n this.value = value;\n }\n\n public void setValue(int value) {\n this.value = value;\n }\n\n public void addEdge(int to, int weight) {\n edges.add(new Edge(to, weight));\n }\n\n public List<Edge> getEdges() {\n return this.edges;\n }\n }\n\n private static class Edge {\n private int to;\n private int weight;\n\n public Edge(int to, int weight) {\n this.to = to;\n this.weight = weight;\n }\n\n public int getTo() {\n return this.to;\n }\n\n public int getWeight() {\n return this.weight;\n }\n }\n\n private static class FastScanner {\n private BufferedReader reader;\n private StringTokenizer tokenizer;\n\n public FastScanner(InputStream in) {\n this.reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public int[] nextLineToIntArray() {\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }\n\n public String[] nextLineToStringArray() {\n return nextLine().split(\"\");\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n\n public String next() {\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String[] nextStringArray(int n) {\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }\n\n public int[] nextIntArray(int n) {\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }\n\n public long[] nextLongArray(int n) {\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }\n\n public double[] nextDoubleArray(int n) {\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }\n }\n\n}", "Main", "private static FastScanner scanner = new FastScanner(System.in);", "scanner", "new FastScanner(System.in)", "public static void main(String[] args) {\n int k = scanner.nextInt();\n\n int result = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }\n System.out.println(result);\n }", "main", "{\n int k = scanner.nextInt();\n\n int result = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }\n System.out.println(result);\n }", "int k = scanner.nextInt();", "k", "scanner.nextInt()", "scanner.nextInt", "scanner", "int result = 0;", "result", "0", "for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }", "for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }", "{\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }", "for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }", "{\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }", "int tmp = gcd(a, b);", "tmp", "gcd(a, b)", "gcd", "a", "b", "result += gcd(tmp, c)", "result", "gcd(tmp, c)", "gcd", "tmp", "c", "System.out.println(result)", "System.out.println", "System.out", "System", "System.out", "result", "String[] args", "args", "private static int gcd(int s, int t) {\n\n int high = 0;\n int low = 0;\n if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }\n\n int r = high % low;\n if (r == 0) return low;\n return gcd(low, r);\n }", "gcd", "{\n\n int high = 0;\n int low = 0;\n if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }\n\n int r = high % low;\n if (r == 0) return low;\n return gcd(low, r);\n }", "int high = 0;", "high", "0", "int low = 0;", "low", "0", "if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }", "s > t", "s", "t", "{\n high = s;\n low = t;\n }", "high = s", "high", "s", "low = t", "low", "t", "{\n high = t;\n low = s;\n }", "high = t", "high", "t", "low = s", "low", "s", "int r = high % low;", "r", "high % low", "high", "low", "if (r == 0) return low;", "r == 0", "r", "0", "return low;", "low", "return gcd(low, r);", "gcd(low, r)", "gcd", "low", "r", "int s", "s", "int t", "t", "private static class Graph {\n private Vertex[] vertexes;\n private int size;\n private boolean[] seen;\n\n public Graph(int n) {\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }\n\n public Graph(int[] vertexes) {\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }\n\n public void addEdge(int from, int to) {\n this.addEdge(from, to, 0);\n }\n\n public void addEdge(int from, int to, int weight) {\n this.vertexes[from].addEdge(to, weight);\n }\n\n public void initDfs() {\n this.seen = new boolean[this.size];\n }\n\n // 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする\n public boolean dfs(int now, int from) {\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }\n\n public boolean seen(int now) {\n return this.seen[now];\n }\n\n }", "Graph", "private Vertex[] vertexes;", "vertexes", "private int size;", "size", "private boolean[] seen;", "seen", "public Graph(int n) {\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }", "Graph", "{\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }", "this.size = n", "this.size", "this", "this.size", "n", "this.vertexes = new Vertex[n]", "this.vertexes", "this", "this.vertexes", "new Vertex[n]", "n", "for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n this.vertexes[i] = new Vertex();\n }", "{\n this.vertexes[i] = new Vertex();\n }", "this.vertexes[i] = new Vertex()", "this.vertexes[i]", "this.vertexes", "this", "this.vertexes", "i", "new Vertex()", "int n", "n", "public Graph(int[] vertexes) {\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }", "Graph", "{\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }", "this.size = vertexes.length", "this.size", "this", "this.size", "vertexes.length", "vertexes", "vertexes.length", "this. vertexes = new Vertex[vertexes.length]", "this. vertexes", "this", "this. vertexes", "new Vertex[vertexes.length]", "vertexes.length", "vertexes", "vertexes.length", "for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < vertexes.length", "i", "vertexes.length", "vertexes", "vertexes.length", "i++", "i++", "i", "{\n this.vertexes[i] = new Vertex(vertexes[i]);\n }", "{\n this.vertexes[i] = new Vertex(vertexes[i]);\n }", "this.vertexes[i] = new Vertex(vertexes[i])", "this.vertexes[i]", "this.vertexes", "this", "this.vertexes", "i", "new Vertex(vertexes[i])", "int[] vertexes", "vertexes", "public void addEdge(int from, int to) {\n this.addEdge(from, to, 0);\n }", "addEdge", "{\n this.addEdge(from, to, 0);\n }", "this.addEdge(from, to, 0)", "this.addEdge", "this", "from", "to", "0", "int from", "from", "int to", "to", "public void addEdge(int from, int to, int weight) {\n this.vertexes[from].addEdge(to, weight);\n }", "addEdge", "{\n this.vertexes[from].addEdge(to, weight);\n }", "this.vertexes[from].addEdge(to, weight)", "this.vertexes[from].addEdge", "this.vertexes[from]", "this.vertexes", "this", "this.vertexes", "from", "to", "weight", "int from", "from", "int to", "to", "int weight", "weight", "public void initDfs() {\n this.seen = new boolean[this.size];\n }", "initDfs", "{\n this.seen = new boolean[this.size];\n }", "this.seen = new boolean[this.size]", "this.seen", "this", "this.seen", "new boolean[this.size]", "this.size", "this", "this.size", "// 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする\n public boolean dfs(int now, int from) {\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }", "dfs", "{\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }", "this.seen[now] = true", "this.seen[now]", "this.seen", "this", "this.seen", "now", "true", "boolean isCycle = false;", "isCycle", "false", "for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }", "Edge e", "this.vertexes[now].getEdges()", "this.vertexes[now].getEdges", "this.vertexes[now]", "this.vertexes", "this", "this.vertexes", "now", "{\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }", "{\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }", "if (e.getTo() == from) {\n continue;\n }", "e.getTo() == from", "e.getTo()", "e.getTo", "e", "from", "{\n continue;\n }", "continue;", "if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }", "seen[e.getTo()]", "seen", "e.getTo()", "e.getTo", "e", "{\n isCycle = true;\n }", "isCycle = true", "isCycle", "true", "{\n isCycle = isCycle || dfs(e.getTo(), now);\n }", "isCycle = isCycle || dfs(e.getTo(), now)", "isCycle", "isCycle || dfs(e.getTo(), now)", "isCycle", "dfs(e.getTo(), now)", "dfs", "e.getTo()", "e.getTo", "e", "now", "return isCycle;", "isCycle", "int now", "now", "int from", "from", "public boolean seen(int now) {\n return this.seen[now];\n }", "seen", "{\n return this.seen[now];\n }", "return this.seen[now];", "this.seen[now]", "this.seen", "this", "this.seen", "now", "int now", "now", "private static class Vertex {\n private int value;\n private List<Edge> edges = new ArrayList<>();\n\n public Vertex() {};\n public Vertex(int value) {\n this.value = value;\n }\n\n public void setValue(int value) {\n this.value = value;\n }\n\n public void addEdge(int to, int weight) {\n edges.add(new Edge(to, weight));\n }\n\n public List<Edge> getEdges() {\n return this.edges;\n }\n }", "Vertex", "private int value;", "value", "private List<Edge> edges = new ArrayList<>();", "edges", "new ArrayList<>()", "public Vertex() {}", "Vertex", "{}", "public Vertex(int value) {\n this.value = value;\n }", "Vertex", "{\n this.value = value;\n }", "this.value = value", "this.value", "this", "this.value", "value", "int value", "value", "public void setValue(int value) {\n this.value = value;\n }", "setValue", "{\n this.value = value;\n }", "this.value = value", "this.value", "this", "this.value", "value", "int value", "value", "public void addEdge(int to, int weight) {\n edges.add(new Edge(to, weight));\n }", "addEdge", "{\n edges.add(new Edge(to, weight));\n }", "edges.add(new Edge(to, weight))", "edges.add", "edges", "new Edge(to, weight)", "int to", "to", "int weight", "weight", "public List<Edge> getEdges() {\n return this.edges;\n }", "getEdges", "{\n return this.edges;\n }", "return this.edges;", "this.edges", "this", "this.edges", "private static class Edge {\n private int to;\n private int weight;\n\n public Edge(int to, int weight) {\n this.to = to;\n this.weight = weight;\n }\n\n public int getTo() {\n return this.to;\n }\n\n public int getWeight() {\n return this.weight;\n }\n }", "Edge", "private int to;", "to", "private int weight;", "weight", "public Edge(int to, int weight) {\n this.to = to;\n this.weight = weight;\n }", "Edge", "{\n this.to = to;\n this.weight = weight;\n }", "this.to = to", "this.to", "this", "this.to", "to", "this.weight = weight", "this.weight", "this", "this.weight", "weight", "int to", "to", "int weight", "weight", "public int getTo() {\n return this.to;\n }", "getTo", "{\n return this.to;\n }", "return this.to;", "this.to", "this", "this.to", "public int getWeight() {\n return this.weight;\n }", "getWeight", "{\n return this.weight;\n }", "return this.weight;", "this.weight", "this", "this.weight", "private static class FastScanner {\n private BufferedReader reader;\n private StringTokenizer tokenizer;\n\n public FastScanner(InputStream in) {\n this.reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public int[] nextLineToIntArray() {\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }\n\n public String[] nextLineToStringArray() {\n return nextLine().split(\"\");\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n\n public String next() {\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String[] nextStringArray(int n) {\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }\n\n public int[] nextIntArray(int n) {\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }\n\n public long[] nextLongArray(int n) {\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }\n\n public double[] nextDoubleArray(int n) {\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }\n }", "FastScanner", "private BufferedReader reader;", "reader", "private StringTokenizer tokenizer;", "tokenizer", "public FastScanner(InputStream in) {\n this.reader = new BufferedReader(new InputStreamReader(in));\n }", "FastScanner", "{\n this.reader = new BufferedReader(new InputStreamReader(in));\n }", "this.reader = new BufferedReader(new InputStreamReader(in))", "this.reader", "this", "this.reader", "new BufferedReader(new InputStreamReader(in))", "InputStream in", "in", "public int[] nextLineToIntArray() {\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }", "nextLineToIntArray", "{\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }", "String[] stringArray = nextLineToStringArray();", "stringArray", "nextLineToStringArray()", "nextLineToStringArray", "int[] intArray = new int[stringArray.length];", "intArray", "new int[stringArray.length]", "stringArray.length", "stringArray", "stringArray.length", "for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }", "int i = 0;", "int i = 0;", "i", "0", "i < stringArray.length", "i", "stringArray.length", "stringArray", "stringArray.length", "i++", "i++", "i", "{\n intArray[i] = Integer.parseInt(stringArray[i]);\n }", "{\n intArray[i] = Integer.parseInt(stringArray[i]);\n }", "intArray[i] = Integer.parseInt(stringArray[i])", "intArray[i]", "intArray", "i", "Integer.parseInt(stringArray[i])", "Integer.parseInt", "Integer", "stringArray[i]", "stringArray", "i", "return intArray;", "intArray", "public String[] nextLineToStringArray() {\n return nextLine().split(\"\");\n }", "nextLineToStringArray", "{\n return nextLine().split(\"\");\n }", "return nextLine().split(\"\");", "nextLine().split(\"\")", "nextLine().split", "nextLine()", "nextLine", "\"\"", "public String nextLine() {\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "nextLine", "{\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }", "IOException e", "{\n e.printStackTrace();\n throw new RuntimeException(e);\n }", "e.printStackTrace()", "e.printStackTrace", "e", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n return reader.readLine();\n }", "return reader.readLine();", "reader.readLine()", "reader.readLine", "reader", "public String next() {\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }", "next", "{\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }", "if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "this.tokenizer == null || !this.tokenizer.hasMoreElements()", "this.tokenizer == null", "this.tokenizer", "this", "this.tokenizer", "null", "!this.tokenizer.hasMoreElements()", "this.tokenizer.hasMoreElements()", "this.tokenizer.hasMoreElements", "this.tokenizer", "this", "this.tokenizer", "{\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }", "catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }", "IOException e", "{\n e.printStackTrace();\n throw new RuntimeException(e);\n }", "e.printStackTrace()", "e.printStackTrace", "e", "throw new RuntimeException(e);", "new RuntimeException(e)", "{\n this.tokenizer = new StringTokenizer(reader.readLine());\n }", "this.tokenizer = new StringTokenizer(reader.readLine())", "this.tokenizer", "this", "this.tokenizer", "new StringTokenizer(reader.readLine())", "return this.tokenizer.nextToken();", "this.tokenizer.nextToken()", "this.tokenizer.nextToken", "this.tokenizer", "this", "this.tokenizer", "public int nextInt() {\n return Integer.parseInt(next());\n }", "nextInt", "{\n return Integer.parseInt(next());\n }", "return Integer.parseInt(next());", "Integer.parseInt(next())", "Integer.parseInt", "Integer", "next()", "next", "public long nextLong() {\n return Long.parseLong(next());\n }", "nextLong", "{\n return Long.parseLong(next());\n }", "return Long.parseLong(next());", "Long.parseLong(next())", "Long.parseLong", "Long", "next()", "next", "public double nextDouble() {\n return Double.parseDouble(next());\n }", "nextDouble", "{\n return Double.parseDouble(next());\n }", "return Double.parseDouble(next());", "Double.parseDouble(next())", "Double.parseDouble", "Double", "next()", "next", "public String[] nextStringArray(int n) {\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }", "nextStringArray", "{\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }", "String[] stringArray = new String[n];", "stringArray", "new String[n]", "n", "for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n stringArray[i] = next();\n }", "{\n stringArray[i] = next();\n }", "stringArray[i] = next()", "stringArray[i]", "stringArray", "i", "next()", "next", "return stringArray;", "stringArray", "int n", "n", "public int[] nextIntArray(int n) {\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }", "nextIntArray", "{\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }", "int[] intArray = new int[n];", "intArray", "new int[n]", "n", "for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n intArray[i] = nextInt();\n }", "{\n intArray[i] = nextInt();\n }", "intArray[i] = nextInt()", "intArray[i]", "intArray", "i", "nextInt()", "nextInt", "return intArray;", "intArray", "int n", "n", "public long[] nextLongArray(int n) {\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }", "nextLongArray", "{\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }", "long[] longArray = new long[n];", "longArray", "new long[n]", "n", "for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n longArray[i] = nextLong();\n }", "{\n longArray[i] = nextLong();\n }", "longArray[i] = nextLong()", "longArray[i]", "longArray", "i", "nextLong()", "nextLong", "return longArray;", "longArray", "int n", "n", "public double[] nextDoubleArray(int n) {\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }", "nextDoubleArray", "{\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }", "double[] doubleArray = new double[n];", "doubleArray", "new double[n]", "n", "for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }", "int i = 0;", "int i = 0;", "i", "0", "i < n", "i", "n", "i++", "i++", "i", "{\n doubleArray[i] = nextDouble();\n }", "{\n doubleArray[i] = nextDouble();\n }", "doubleArray[i] = nextDouble()", "doubleArray[i]", "doubleArray", "i", "nextDouble()", "nextDouble", "return doubleArray;", "doubleArray", "int n", "n", "public class Main {\n\n private static FastScanner scanner = new FastScanner(System.in);\n\n public static void main(String[] args) {\n int k = scanner.nextInt();\n\n int result = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }\n System.out.println(result);\n }\n\n// private static class Gcd3 {\n//\n// Map<Integer, Integer> amap = new HashMap<>();\n// Map<Integer, Integer> bmap = new HashMap<>();\n// Map<Integer, Integer> cmap = new HashMap<>();\n// int aa;\n// int bb;\n// int cc;\n//\n// public Gcd3(int a, int b, int c) {\n// yakubuna(a);\n// yakubunb(b);\n// yakubunc(c);\n// aa = a;\n// bb = b;\n// cc = c;\n// }\n//\n// private void yakubuna(int a) {\n// int a1 = 0;\n// int a2 = 0;\n// boolean isYakubun = false;\n// for (int i = a - 1; i > 1; i--) {\n// if (a % i == 0) {\n// a1 = i;\n// a2 = a / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubuna(a1);\n// yakubuna(a2);\n// } else {\n// if (amap.containsKey(a)) {\n// amap.put(a, amap.get(a) + 1);\n// } else {\n// amap.put(a, 1);\n// }\n// }\n// }\n// private void yakubunb(int b) {\n// int b1 = 0;\n// int b2 = 0;\n// boolean isYakubun = false;\n// for (int i = b - 1; i > 1; i--) {\n// if (b % i == 0) {\n// b1 = i;\n// b2 = b / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunb(b1);\n// yakubunb(b2);\n// } else {\n// if (bmap.containsKey(b)) {\n// bmap.put(b, bmap.get(b) + 1);\n// } else {\n// bmap.put(b, 1);\n// }\n// }\n// }\n// private void yakubunc(int c) {\n// int c1 = 0;\n// int c2 = 0;\n// boolean isYakubun = false;\n// for (int i = c - 1; i > 1; i--) {\n// if (c % i == 0) {\n// c1 = i;\n// c2 = c / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunc(c1);\n// yakubunc(c2);\n// } else {\n// if (cmap.containsKey(c)) {\n// cmap.put(c, cmap.get(c) + 1);\n// } else {\n// cmap.put(c, 1);\n// }\n// }\n// }\n//\n// public int gcd() {\n// int result = 1;\n//\n// for (Integer i : amap.keySet()) {\n// if (bmap.containsKey(i) && cmap.containsKey(i)) {\n// result = result * i * Math.min(Math.min(amap.get(i), bmap.get(i)), cmap.get(i));\n// }\n// }\n//// System.out.println(\"(\"+ aa + \",\" + bb + \",\" + cc + \") => \" + result);\n// return result;\n// }\n// }\n\n private static int gcd(int s, int t) {\n\n int high = 0;\n int low = 0;\n if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }\n\n int r = high % low;\n if (r == 0) return low;\n return gcd(low, r);\n }\n\n private static class Graph {\n private Vertex[] vertexes;\n private int size;\n private boolean[] seen;\n\n public Graph(int n) {\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }\n\n public Graph(int[] vertexes) {\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }\n\n public void addEdge(int from, int to) {\n this.addEdge(from, to, 0);\n }\n\n public void addEdge(int from, int to, int weight) {\n this.vertexes[from].addEdge(to, weight);\n }\n\n public void initDfs() {\n this.seen = new boolean[this.size];\n }\n\n // 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする\n public boolean dfs(int now, int from) {\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }\n\n public boolean seen(int now) {\n return this.seen[now];\n }\n\n }\n\n private static class Vertex {\n private int value;\n private List<Edge> edges = new ArrayList<>();\n\n public Vertex() {};\n public Vertex(int value) {\n this.value = value;\n }\n\n public void setValue(int value) {\n this.value = value;\n }\n\n public void addEdge(int to, int weight) {\n edges.add(new Edge(to, weight));\n }\n\n public List<Edge> getEdges() {\n return this.edges;\n }\n }\n\n private static class Edge {\n private int to;\n private int weight;\n\n public Edge(int to, int weight) {\n this.to = to;\n this.weight = weight;\n }\n\n public int getTo() {\n return this.to;\n }\n\n public int getWeight() {\n return this.weight;\n }\n }\n\n private static class FastScanner {\n private BufferedReader reader;\n private StringTokenizer tokenizer;\n\n public FastScanner(InputStream in) {\n this.reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public int[] nextLineToIntArray() {\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }\n\n public String[] nextLineToStringArray() {\n return nextLine().split(\"\");\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n\n public String next() {\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String[] nextStringArray(int n) {\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }\n\n public int[] nextIntArray(int n) {\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }\n\n public long[] nextLongArray(int n) {\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }\n\n public double[] nextDoubleArray(int n) {\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }\n }\n\n}", "public class Main {\n\n private static FastScanner scanner = new FastScanner(System.in);\n\n public static void main(String[] args) {\n int k = scanner.nextInt();\n\n int result = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n int tmp = gcd(a, b);\n result += gcd(tmp, c);\n }\n }\n }\n System.out.println(result);\n }\n\n// private static class Gcd3 {\n//\n// Map<Integer, Integer> amap = new HashMap<>();\n// Map<Integer, Integer> bmap = new HashMap<>();\n// Map<Integer, Integer> cmap = new HashMap<>();\n// int aa;\n// int bb;\n// int cc;\n//\n// public Gcd3(int a, int b, int c) {\n// yakubuna(a);\n// yakubunb(b);\n// yakubunc(c);\n// aa = a;\n// bb = b;\n// cc = c;\n// }\n//\n// private void yakubuna(int a) {\n// int a1 = 0;\n// int a2 = 0;\n// boolean isYakubun = false;\n// for (int i = a - 1; i > 1; i--) {\n// if (a % i == 0) {\n// a1 = i;\n// a2 = a / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubuna(a1);\n// yakubuna(a2);\n// } else {\n// if (amap.containsKey(a)) {\n// amap.put(a, amap.get(a) + 1);\n// } else {\n// amap.put(a, 1);\n// }\n// }\n// }\n// private void yakubunb(int b) {\n// int b1 = 0;\n// int b2 = 0;\n// boolean isYakubun = false;\n// for (int i = b - 1; i > 1; i--) {\n// if (b % i == 0) {\n// b1 = i;\n// b2 = b / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunb(b1);\n// yakubunb(b2);\n// } else {\n// if (bmap.containsKey(b)) {\n// bmap.put(b, bmap.get(b) + 1);\n// } else {\n// bmap.put(b, 1);\n// }\n// }\n// }\n// private void yakubunc(int c) {\n// int c1 = 0;\n// int c2 = 0;\n// boolean isYakubun = false;\n// for (int i = c - 1; i > 1; i--) {\n// if (c % i == 0) {\n// c1 = i;\n// c2 = c / i;\n// isYakubun = true;\n// break;\n// }\n// }\n// if (isYakubun) {\n// yakubunc(c1);\n// yakubunc(c2);\n// } else {\n// if (cmap.containsKey(c)) {\n// cmap.put(c, cmap.get(c) + 1);\n// } else {\n// cmap.put(c, 1);\n// }\n// }\n// }\n//\n// public int gcd() {\n// int result = 1;\n//\n// for (Integer i : amap.keySet()) {\n// if (bmap.containsKey(i) && cmap.containsKey(i)) {\n// result = result * i * Math.min(Math.min(amap.get(i), bmap.get(i)), cmap.get(i));\n// }\n// }\n//// System.out.println(\"(\"+ aa + \",\" + bb + \",\" + cc + \") => \" + result);\n// return result;\n// }\n// }\n\n private static int gcd(int s, int t) {\n\n int high = 0;\n int low = 0;\n if (s > t) {\n high = s;\n low = t;\n } else {\n high = t;\n low = s;\n }\n\n int r = high % low;\n if (r == 0) return low;\n return gcd(low, r);\n }\n\n private static class Graph {\n private Vertex[] vertexes;\n private int size;\n private boolean[] seen;\n\n public Graph(int n) {\n this.size = n;\n this.vertexes = new Vertex[n];\n for (int i = 0; i < n; i++) {\n this.vertexes[i] = new Vertex();\n }\n }\n\n public Graph(int[] vertexes) {\n this.size = vertexes.length;\n this. vertexes = new Vertex[vertexes.length];\n for (int i = 0; i < vertexes.length; i++) {\n this.vertexes[i] = new Vertex(vertexes[i]);\n }\n }\n\n public void addEdge(int from, int to) {\n this.addEdge(from, to, 0);\n }\n\n public void addEdge(int from, int to, int weight) {\n this.vertexes[from].addEdge(to, weight);\n }\n\n public void initDfs() {\n this.seen = new boolean[this.size];\n }\n\n // 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする\n public boolean dfs(int now, int from) {\n this.seen[now] = true;\n boolean isCycle = false;\n for (Edge e : this.vertexes[now].getEdges()) {\n if (e.getTo() == from) {\n continue;\n }\n if (seen[e.getTo()]) {\n isCycle = true;\n } else {\n isCycle = isCycle || dfs(e.getTo(), now);\n }\n }\n return isCycle;\n }\n\n public boolean seen(int now) {\n return this.seen[now];\n }\n\n }\n\n private static class Vertex {\n private int value;\n private List<Edge> edges = new ArrayList<>();\n\n public Vertex() {};\n public Vertex(int value) {\n this.value = value;\n }\n\n public void setValue(int value) {\n this.value = value;\n }\n\n public void addEdge(int to, int weight) {\n edges.add(new Edge(to, weight));\n }\n\n public List<Edge> getEdges() {\n return this.edges;\n }\n }\n\n private static class Edge {\n private int to;\n private int weight;\n\n public Edge(int to, int weight) {\n this.to = to;\n this.weight = weight;\n }\n\n public int getTo() {\n return this.to;\n }\n\n public int getWeight() {\n return this.weight;\n }\n }\n\n private static class FastScanner {\n private BufferedReader reader;\n private StringTokenizer tokenizer;\n\n public FastScanner(InputStream in) {\n this.reader = new BufferedReader(new InputStreamReader(in));\n }\n\n public int[] nextLineToIntArray() {\n String[] stringArray = nextLineToStringArray();\n int[] intArray = new int[stringArray.length];\n for (int i = 0; i < stringArray.length; i++) {\n intArray[i] = Integer.parseInt(stringArray[i]);\n }\n return intArray;\n }\n\n public String[] nextLineToStringArray() {\n return nextLine().split(\"\");\n }\n\n public String nextLine() {\n try {\n return reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n\n public String next() {\n if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) {\n try {\n this.tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }\n return this.tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String[] nextStringArray(int n) {\n String[] stringArray = new String[n];\n for (int i = 0; i < n; i++) {\n stringArray[i] = next();\n }\n return stringArray;\n }\n\n public int[] nextIntArray(int n) {\n int[] intArray = new int[n];\n for (int i = 0; i < n; i++) {\n intArray[i] = nextInt();\n }\n return intArray;\n }\n\n public long[] nextLongArray(int n) {\n long[] longArray = new long[n];\n for (int i = 0; i < n; i++) {\n longArray[i] = nextLong();\n }\n return longArray;\n }\n\n public double[] nextDoubleArray(int n) {\n double[] doubleArray = new double[n];\n for (int i = 0; i < n; i++) {\n doubleArray[i] = nextDouble();\n }\n return doubleArray;\n }\n }\n\n}", "Main" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.StringTokenizer; public class Main { private static FastScanner scanner = new FastScanner(System.in); public static void main(String[] args) { int k = scanner.nextInt(); int result = 0; for (int a = 1; a <= k; a++) { for (int b = 1; b <= k; b++) { for (int c = 1; c <= k; c++) { int tmp = gcd(a, b); result += gcd(tmp, c); } } } System.out.println(result); } // private static class Gcd3 { // // Map<Integer, Integer> amap = new HashMap<>(); // Map<Integer, Integer> bmap = new HashMap<>(); // Map<Integer, Integer> cmap = new HashMap<>(); // int aa; // int bb; // int cc; // // public Gcd3(int a, int b, int c) { // yakubuna(a); // yakubunb(b); // yakubunc(c); // aa = a; // bb = b; // cc = c; // } // // private void yakubuna(int a) { // int a1 = 0; // int a2 = 0; // boolean isYakubun = false; // for (int i = a - 1; i > 1; i--) { // if (a % i == 0) { // a1 = i; // a2 = a / i; // isYakubun = true; // break; // } // } // if (isYakubun) { // yakubuna(a1); // yakubuna(a2); // } else { // if (amap.containsKey(a)) { // amap.put(a, amap.get(a) + 1); // } else { // amap.put(a, 1); // } // } // } // private void yakubunb(int b) { // int b1 = 0; // int b2 = 0; // boolean isYakubun = false; // for (int i = b - 1; i > 1; i--) { // if (b % i == 0) { // b1 = i; // b2 = b / i; // isYakubun = true; // break; // } // } // if (isYakubun) { // yakubunb(b1); // yakubunb(b2); // } else { // if (bmap.containsKey(b)) { // bmap.put(b, bmap.get(b) + 1); // } else { // bmap.put(b, 1); // } // } // } // private void yakubunc(int c) { // int c1 = 0; // int c2 = 0; // boolean isYakubun = false; // for (int i = c - 1; i > 1; i--) { // if (c % i == 0) { // c1 = i; // c2 = c / i; // isYakubun = true; // break; // } // } // if (isYakubun) { // yakubunc(c1); // yakubunc(c2); // } else { // if (cmap.containsKey(c)) { // cmap.put(c, cmap.get(c) + 1); // } else { // cmap.put(c, 1); // } // } // } // // public int gcd() { // int result = 1; // // for (Integer i : amap.keySet()) { // if (bmap.containsKey(i) && cmap.containsKey(i)) { // result = result * i * Math.min(Math.min(amap.get(i), bmap.get(i)), cmap.get(i)); // } // } //// System.out.println("("+ aa + "," + bb + "," + cc + ") => " + result); // return result; // } // } private static int gcd(int s, int t) { int high = 0; int low = 0; if (s > t) { high = s; low = t; } else { high = t; low = s; } int r = high % low; if (r == 0) return low; return gcd(low, r); } private static class Graph { private Vertex[] vertexes; private int size; private boolean[] seen; public Graph(int n) { this.size = n; this.vertexes = new Vertex[n]; for (int i = 0; i < n; i++) { this.vertexes[i] = new Vertex(); } } public Graph(int[] vertexes) { this.size = vertexes.length; this. vertexes = new Vertex[vertexes.length]; for (int i = 0; i < vertexes.length; i++) { this.vertexes[i] = new Vertex(vertexes[i]); } } public void addEdge(int from, int to) { this.addEdge(from, to, 0); } public void addEdge(int from, int to, int weight) { this.vertexes[from].addEdge(to, weight); } public void initDfs() { this.seen = new boolean[this.size]; } // 深さ優先探索を実施し、到達可能な頂点をすべて辿り閉路かどうかをチェックする public boolean dfs(int now, int from) { this.seen[now] = true; boolean isCycle = false; for (Edge e : this.vertexes[now].getEdges()) { if (e.getTo() == from) { continue; } if (seen[e.getTo()]) { isCycle = true; } else { isCycle = isCycle || dfs(e.getTo(), now); } } return isCycle; } public boolean seen(int now) { return this.seen[now]; } } private static class Vertex { private int value; private List<Edge> edges = new ArrayList<>(); public Vertex() {}; public Vertex(int value) { this.value = value; } public void setValue(int value) { this.value = value; } public void addEdge(int to, int weight) { edges.add(new Edge(to, weight)); } public List<Edge> getEdges() { return this.edges; } } private static class Edge { private int to; private int weight; public Edge(int to, int weight) { this.to = to; this.weight = weight; } public int getTo() { return this.to; } public int getWeight() { return this.weight; } } private static class FastScanner { private BufferedReader reader; private StringTokenizer tokenizer; public FastScanner(InputStream in) { this.reader = new BufferedReader(new InputStreamReader(in)); } public int[] nextLineToIntArray() { String[] stringArray = nextLineToStringArray(); int[] intArray = new int[stringArray.length]; for (int i = 0; i < stringArray.length; i++) { intArray[i] = Integer.parseInt(stringArray[i]); } return intArray; } public String[] nextLineToStringArray() { return nextLine().split(""); } public String nextLine() { try { return reader.readLine(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException(e); } } public String next() { if (this.tokenizer == null || !this.tokenizer.hasMoreElements()) { try { this.tokenizer = new StringTokenizer(reader.readLine()); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException(e); } } return this.tokenizer.nextToken(); } public int nextInt() { return Integer.parseInt(next()); } public long nextLong() { return Long.parseLong(next()); } public double nextDouble() { return Double.parseDouble(next()); } public String[] nextStringArray(int n) { String[] stringArray = new String[n]; for (int i = 0; i < n; i++) { stringArray[i] = next(); } return stringArray; } public int[] nextIntArray(int n) { int[] intArray = new int[n]; for (int i = 0; i < n; i++) { intArray[i] = nextInt(); } return intArray; } public long[] nextLongArray(int n) { long[] longArray = new long[n]; for (int i = 0; i < n; i++) { longArray[i] = nextLong(); } return longArray; } public double[] nextDoubleArray(int n) { double[] doubleArray = new double[n]; for (int i = 0; i < n; i++) { doubleArray[i] = nextDouble(); } return doubleArray; } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 42, 2, 2, 13, 13, 17, 30, 41, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 41, 13, 4, 13, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 107, 5 ], [ 107, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ], [ 9, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 18, 20 ], [ 15, 21 ], [ 21, 22 ], [ 21, 23 ], [ 15, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 6, 29 ], [ 29, 30 ], [ 6, 31 ], [ 31, 32 ], [ 107, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 35, 39 ], [ 39, 40 ], [ 39, 41 ], [ 41, 42 ], [ 42, 43 ], [ 35, 44 ], [ 44, 45 ], [ 44, 46 ], [ 35, 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 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 91, 92 ], [ 91, 93 ], [ 91, 94 ], [ 85, 95 ], [ 95, 96 ], [ 95, 97 ], [ 35, 98 ], [ 98, 99 ], [ 99, 100 ], [ 100, 101 ], [ 100, 102 ], [ 98, 103 ], [ 33, 104 ], [ 104, 105 ], [ 0, 106 ], [ 106, 107 ], [ 106, 108 ] ]
[ "import java.util.*;\npublic class Main{\n\tstatic int gcd(int p,int q){\n\t\twhile((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint k=sc.nextInt();\n \tint sum=0;\n \tfor(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.print(sum);\n }\n}", "import java.util.*;", "util.*", "java", "public class Main{\n\tstatic int gcd(int p,int q){\n\t\twhile((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint k=sc.nextInt();\n \tint sum=0;\n \tfor(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.print(sum);\n }\n}", "Main", "static int gcd(int p,int q){\n\t\twhile((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}", "gcd", "{\n\t\twhile((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}", "while((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}", "(p%q)!=0", "(p%q)", "p", "q", "0", "{\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}", "int r=p%q;", "r", "p%q", "p", "q", "p=q", "p", "q", "q=r", "q", "r", "return q;", "q", "int p", "p", "int q", "q", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint k=sc.nextInt();\n \tint sum=0;\n \tfor(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.print(sum);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n \tint k=sc.nextInt();\n \tint sum=0;\n \tfor(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.print(sum);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k=sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "int sum=0;", "sum", "0", "for(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}", "int a=1;", "int a=1;", "a", "1", "a<=k", "a", "k", "a++", "a++", "a", "{\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}", "{\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}", "for(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}", "int b=1;", "int b=1;", "b", "1", "b<=k", "b", "k", "b++", "b++", "b", "{\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}", "{\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}", "for(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}", "int c=1;", "int c=1;", "c", "1", "c<=k", "c", "k", "c++", "c++", "c", "{\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}", "{\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}", "int d= gcd(c,gcd(b,a));", "d", "gcd(c,gcd(b,a))", "gcd", "c", "gcd(b,a)", "gcd", "b", "a", "sum +=d", "sum", "d", "System.out.print(sum)", "System.out.print", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main{\n\tstatic int gcd(int p,int q){\n\t\twhile((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint k=sc.nextInt();\n \tint sum=0;\n \tfor(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.print(sum);\n }\n}", "public class Main{\n\tstatic int gcd(int p,int q){\n\t\twhile((p%q)!=0){\n\t\t\tint r=p%q;\n\t\t\tp=q;\n\t\t\tq=r;\n\t\t}\n\t\treturn q;\n\t}\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \tint k=sc.nextInt();\n \tint sum=0;\n \tfor(int a=1;a<=k;a++){\n \t\tfor(int b=1;b<=k;b++){\n \t\t\tfor(int c=1;c<=k;c++){\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tint d= gcd(c,gcd(b,a));\n \t\t\t\t\tsum +=d;\n \t\t\t}\n \t\t}\n \t}\n \tSystem.out.print(sum);\n }\n}", "Main" ]
import java.util.*; public class Main{ static int gcd(int p,int q){ while((p%q)!=0){ int r=p%q; p=q; q=r; } return q; } public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k=sc.nextInt(); int sum=0; for(int a=1;a<=k;a++){ for(int b=1;b<=k;b++){ for(int c=1;c<=k;c++){ int d= gcd(c,gcd(b,a)); sum +=d; } } } System.out.print(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 13, 41, 13, 4, 18, 13, 13, 13, 14, 2, 13, 17, 30, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 63, 64 ], [ 63, 65 ], [ 63, 66 ], [ 61, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 112, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 81, 82 ], [ 82, 83 ], [ 81, 84 ], [ 81, 85 ], [ 78, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 89, 90 ], [ 88, 91 ], [ 88, 92 ], [ 78, 93 ], [ 93, 94 ], [ 94, 95 ], [ 94, 96 ], [ 93, 97 ], [ 97, 98 ], [ 98, 99 ], [ 78, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 101, 104 ], [ 104, 105 ], [ 104, 106 ], [ 76, 107 ], [ 107, 108 ], [ 76, 109 ], [ 109, 110 ], [ 0, 111 ], [ 111, 112 ], [ 111, 113 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n//java11\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint K = sc.nextInt();\n\n\t\tint ans = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\t//最大公約数\n\tstatic int gcd(int a, int b) {\n\t\tint big = Math.max(a, b);\n\t\tint small = Math.min(a, b);\n\n\t\tif(small == 0) {\n\t\t\treturn big;\n\t\t}\n\n\t\treturn gcd(small, big % small);\n\t}\n\n}", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n//java11\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint K = sc.nextInt();\n\n\t\tint ans = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\t//最大公約数\n\tstatic int gcd(int a, int b) {\n\t\tint big = Math.max(a, b);\n\t\tint small = Math.min(a, b);\n\n\t\tif(small == 0) {\n\t\t\treturn big;\n\t\t}\n\n\t\treturn gcd(small, big % small);\n\t}\n\n}", "Main", "//java11\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint K = sc.nextInt();\n\n\t\tint ans = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint K = sc.nextInt();\n\n\t\tint ans = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int ans = 0;", "ans", "0", "for(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=K", "i", "K", "i++", "i++", "i", "{\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}", "int j=1;", "int j=1;", "j", "1", "j<=K", "j", "K", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}", "for(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}", "int k=1;", "int k=1;", "k", "1", "k<=K", "k", "K", "k++", "k++", "k", "{\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}", "{\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}", "ans += gcd(gcd(i, j), k)", "ans", "gcd(gcd(i, j), k)", "gcd", "gcd(i, j)", "gcd", "i", "j", "k", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "//最大公約数\n\tstatic int gcd(int a, int b) {\n\t\tint big = Math.max(a, b);\n\t\tint small = Math.min(a, b);\n\n\t\tif(small == 0) {\n\t\t\treturn big;\n\t\t}\n\n\t\treturn gcd(small, big % small);\n\t}", "gcd", "{\n\t\tint big = Math.max(a, b);\n\t\tint small = Math.min(a, b);\n\n\t\tif(small == 0) {\n\t\t\treturn big;\n\t\t}\n\n\t\treturn gcd(small, big % small);\n\t}", "int big = Math.max(a, b);", "big", "Math.max(a, b)", "Math.max", "Math", "a", "b", "int small = Math.min(a, b);", "small", "Math.min(a, b)", "Math.min", "Math", "a", "b", "if(small == 0) {\n\t\t\treturn big;\n\t\t}", "small == 0", "small", "0", "{\n\t\t\treturn big;\n\t\t}", "return big;", "big", "return gcd(small, big % small);", "gcd(small, big % small)", "gcd", "small", "big % small", "big", "small", "int a", "a", "int b", "b", "public class Main {\n//java11\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint K = sc.nextInt();\n\n\t\tint ans = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\t//最大公約数\n\tstatic int gcd(int a, int b) {\n\t\tint big = Math.max(a, b);\n\t\tint small = Math.min(a, b);\n\n\t\tif(small == 0) {\n\t\t\treturn big;\n\t\t}\n\n\t\treturn gcd(small, big % small);\n\t}\n\n}", "public class Main {\n//java11\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint K = sc.nextInt();\n\n\t\tint ans = 0;\n\t\tfor(int i=1; i<=K; i++) {\n\t\t\tfor(int j=1; j<=K; j++) {\n\t\t\t\tfor(int k=1; k<=K; k++) {\n\t\t\t\t\tans += gcd(gcd(i, j), k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\t//最大公約数\n\tstatic int gcd(int a, int b) {\n\t\tint big = Math.max(a, b);\n\t\tint small = Math.min(a, b);\n\n\t\tif(small == 0) {\n\t\t\treturn big;\n\t\t}\n\n\t\treturn gcd(small, big % small);\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { //java11 public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int ans = 0; for(int i=1; i<=K; i++) { for(int j=1; j<=K; j++) { for(int k=1; k<=K; k++) { ans += gcd(gcd(i, j), k); } } } System.out.println(ans); } //最大公約数 static int gcd(int a, int b) { int big = Math.max(a, b); int small = Math.min(a, b); if(small == 0) { return big; } return gcd(small, big % small); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 42, 2, 13, 17, 30, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 4, 13, 13, 13, 29, 4, 13, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 122, 5 ], [ 122, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], [ 11, 15 ], [ 15, 16 ], [ 16, 17 ], [ 16, 18 ], [ 18, 19 ], [ 18, 20 ], [ 15, 21 ], [ 21, 22 ], [ 21, 23 ], [ 15, 24 ], [ 24, 25 ], [ 24, 26 ], [ 8, 27 ], [ 27, 28 ], [ 6, 29 ], [ 29, 30 ], [ 6, 31 ], [ 31, 32 ], [ 122, 33 ], [ 33, 34 ], [ 33, 35 ], [ 35, 36 ], [ 36, 37 ], [ 36, 38 ], [ 38, 39 ], [ 38, 40 ], [ 38, 41 ], [ 35, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 43, 46 ], [ 33, 47 ], [ 47, 48 ], [ 33, 49 ], [ 49, 50 ], [ 33, 51 ], [ 51, 52 ], [ 122, 53 ], [ 53, 54 ], [ 53, 55 ], [ 55, 56 ], [ 56, 57 ], [ 56, 58 ], [ 55, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 62, 63 ], [ 55, 64 ], [ 64, 65 ], [ 64, 66 ], [ 55, 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 ], [ 94, 95 ], [ 95, 96 ], [ 95, 97 ], [ 93, 98 ], [ 98, 99 ], [ 98, 100 ], [ 93, 101 ], [ 101, 102 ], [ 102, 103 ], [ 93, 104 ], [ 105, 105 ], [ 105, 106 ], [ 106, 107 ], [ 106, 108 ], [ 108, 109 ], [ 108, 110 ], [ 108, 111 ], [ 108, 112 ], [ 55, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 53, 119 ], [ 119, 120 ], [ 0, 121 ], [ 121, 122 ], [ 121, 123 ] ]
[ "import java.util.*;\npublic class Main {\n\tpublic static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n\tpublic static int gcd(int m, int n,int p) {\n\t\tint r=gcd(m,n);\n\t\treturn gcd(r,p);\n \n }\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint c = sc.nextInt();\n\t\tint t=0;\n\t\tfor(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(t);\n\n\n\t}\n\n}", "import java.util.*;", "util.*", "java", "public class Main {\n\tpublic static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n\tpublic static int gcd(int m, int n,int p) {\n\t\tint r=gcd(m,n);\n\t\treturn gcd(r,p);\n \n }\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint c = sc.nextInt();\n\t\tint t=0;\n\t\tfor(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(t);\n\n\n\t}\n\n}", "Main", "public static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }", "gcd", "{\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }", "int r;", "r", "while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }", "n > 0", "n", "0", "{\n r = m % n;\n m = n;\n n = r;\n }", "r = m % n", "r", "m % n", "m", "n", "m = n", "m", "n", "n = r", "n", "r", "return m;", "m", "int m", "m", "int n", "n", "public static int gcd(int m, int n,int p) {\n\t\tint r=gcd(m,n);\n\t\treturn gcd(r,p);\n \n }", "gcd", "{\n\t\tint r=gcd(m,n);\n\t\treturn gcd(r,p);\n \n }", "int r=gcd(m,n);", "r", "gcd(m,n)", "gcd", "m", "n", "return gcd(r,p);", "gcd(r,p)", "gcd", "r", "p", "int m", "m", "int n", "n", "int p", "p", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint c = sc.nextInt();\n\t\tint t=0;\n\t\tfor(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(t);\n\n\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint c = sc.nextInt();\n\t\tint t=0;\n\t\tfor(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(t);\n\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int c = sc.nextInt();", "c", "sc.nextInt()", "sc.nextInt", "sc", "int t=0;", "t", "0", "for(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "int i=1;", "int i=1;", "i", "1", "i<=c", "i", "c", "i++", "i++", "i", "{\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "{\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "for(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}", "int j=1;", "int j=1;", "j", "1", "j<=c", "j", "c", "j++", "j++", "j", "{\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}", "for(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}", "int k=1;", "int k=1;", "k", "1", "k<=c", "k", "c", "k++", "k++", "k", "{\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}", "{\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}", "t+=gcd(i,j,k)", "t", "gcd(i,j,k)", "gcd", "i", "j", "k", "System.out.println(t)", "System.out.println", "System.out", "System", "System.out", "t", "String[] args", "args", "public class Main {\n\tpublic static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n\tpublic static int gcd(int m, int n,int p) {\n\t\tint r=gcd(m,n);\n\t\treturn gcd(r,p);\n \n }\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint c = sc.nextInt();\n\t\tint t=0;\n\t\tfor(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(t);\n\n\n\t}\n\n}", "public class Main {\n\tpublic static int gcd(int m, int n) {\n int r;\n while (n > 0) {\n r = m % n;\n m = n;\n n = r;\n }\n return m;\n }\n\tpublic static int gcd(int m, int n,int p) {\n\t\tint r=gcd(m,n);\n\t\treturn gcd(r,p);\n \n }\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint c = sc.nextInt();\n\t\tint t=0;\n\t\tfor(int i=1;i<=c;i++) {\n\t\t\tfor(int j=1;j<=c;j++) {\n\t\t\t\tfor(int k=1;k<=c;k++) {\n\t\t\t\tt+=gcd(i,j,k);\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(t);\n\n\n\t}\n\n}", "Main" ]
import java.util.*; public class Main { public static int gcd(int m, int n) { int r; while (n > 0) { r = m % n; m = n; n = r; } return m; } public static int gcd(int m, int n,int p) { int r=gcd(m,n); return gcd(r,p); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); int c = sc.nextInt(); int t=0; for(int i=1;i<=c;i++) { for(int j=1;j<=c;j++) { for(int k=1;k<=c;k++) { t+=gcd(i,j,k); } } } System.out.println(t); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 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 ], [ 99, 8 ], [ 99, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ], [ 13, 15 ], [ 12, 16 ], [ 16, 17 ], [ 12, 18 ], [ 18, 19 ], [ 19, 20 ], [ 19, 21 ], [ 19, 22 ], [ 22, 23 ], [ 22, 24 ], [ 9, 25 ], [ 25, 26 ], [ 9, 27 ], [ 27, 28 ], [ 99, 29 ], [ 29, 30 ], [ 29, 31 ], [ 31, 32 ], [ 32, 33 ], [ 32, 34 ], [ 31, 35 ], [ 35, 36 ], [ 35, 37 ], [ 37, 38 ], [ 38, 39 ], [ 31, 40 ], [ 40, 41 ], [ 40, 42 ], [ 31, 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 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 83, 84 ], [ 83, 85 ], [ 83, 86 ], [ 86, 87 ], [ 86, 88 ], [ 86, 89 ], [ 31, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 90, 95 ], [ 29, 96 ], [ 96, 97 ], [ 0, 98 ], [ 98, 99 ], [ 98, 100 ] ]
[ "\nimport java.math.BigInteger;\nimport java.util.Scanner;\n\n\npublic class Main {\n public static int gcd(int a,int b)\n {\n if(b==0)\n return a;\n else\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n long sum=0;\n for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }\n\n System.out.println(sum);\n\n }\n}", "import java.math.BigInteger;", "BigInteger", "java.math", "import java.util.Scanner;", "Scanner", "java.util", "public class Main {\n public static int gcd(int a,int b)\n {\n if(b==0)\n return a;\n else\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n long sum=0;\n for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }\n\n System.out.println(sum);\n\n }\n}", "Main", "public static int gcd(int a,int b)\n {\n if(b==0)\n return a;\n else\n return gcd(b,a%b);\n }", "gcd", "{\n if(b==0)\n return a;\n else\n return gcd(b,a%b);\n }", "if(b==0)\n return a;\n else\n return gcd(b,a%b);", "b==0", "b", "0", "return a;", "a", "return gcd(b,a%b);", "gcd(b,a%b)", "gcd", "b", "a%b", "a", "b", "int a", "a", "int b", "b", "public static void main(String[] args) {\n\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n long sum=0;\n for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }\n\n System.out.println(sum);\n\n }", "main", "{\n\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n long sum=0;\n for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }\n\n System.out.println(sum);\n\n }", "Scanner sc=new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n=sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "long sum=0;", "sum", "0", "for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\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 {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }", "{\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }", "for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\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 sum+=gcd(i,gcd(j,k));\n }", "{\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }", "for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));", "int k=1;", "int k=1;", "k", "1", "k<=n", "k", "n", "k++", "k++", "k", "sum+=gcd(i,gcd(j,k));", "sum+=gcd(i,gcd(j,k))", "sum", "gcd(i,gcd(j,k))", "gcd", "i", "gcd(j,k)", "gcd", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public class Main {\n public static int gcd(int a,int b)\n {\n if(b==0)\n return a;\n else\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n long sum=0;\n for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }\n\n System.out.println(sum);\n\n }\n}", "public class Main {\n public static int gcd(int a,int b)\n {\n if(b==0)\n return a;\n else\n return gcd(b,a%b);\n }\n\n public static void main(String[] args) {\n\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n long sum=0;\n for(int i = 1; i<=n; i++)\n {\n for(int j=1;j<=n;j++)\n {\n for(int k=1;k<=n;k++)\n sum+=gcd(i,gcd(j,k));\n }\n\n }\n\n System.out.println(sum);\n\n }\n}", "Main" ]
import java.math.BigInteger; import java.util.Scanner; public class Main { public static int gcd(int a,int b) { if(b==0) return a; else return gcd(b,a%b); } public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long sum=0; for(int i = 1; i<=n; i++) { for(int j=1;j<=n;j++) { for(int k=1;k<=n;k++) sum+=gcd(i,gcd(j,k)); } } System.out.println(sum); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 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, 2, 13, 17, 1, 40, 13, 30, 30, 41, 13, 4, 13, 13, 4, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 13, 2, 13, 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 ], [ 14, 17 ], [ 17, 18 ], [ 18, 19 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 23, 28 ], [ 28, 29 ], [ 28, 30 ], [ 30, 31 ], [ 30, 32 ], [ 23, 33 ], [ 33, 34 ], [ 34, 35 ], [ 23, 36 ], [ 37, 37 ], [ 37, 38 ], [ 38, 39 ], [ 39, 40 ], [ 40, 41 ], [ 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 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 70, 73 ], [ 73, 74 ], [ 73, 75 ], [ 73, 76 ], [ 67, 77 ], [ 77, 78 ], [ 77, 79 ], [ 8, 80 ], [ 80, 81 ], [ 81, 82 ], [ 82, 83 ], [ 82, 84 ], [ 80, 85 ], [ 6, 86 ], [ 86, 87 ], [ 4, 88 ], [ 88, 89 ], [ 88, 90 ], [ 90, 91 ], [ 91, 92 ], [ 92, 93 ], [ 92, 94 ], [ 91, 95 ], [ 95, 96 ], [ 91, 97 ], [ 97, 98 ], [ 98, 99 ], [ 98, 100 ], [ 98, 101 ], [ 101, 102 ], [ 101, 103 ], [ 88, 104 ], [ 104, 105 ], [ 88, 106 ], [ 106, 107 ] ]
[ "import java.util.*;\nclass Main\n{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint k = Integer.parseInt(sc.next());\n\t\t\n\t\tlong sum = 0;\n\t\t\n\t\tfor(int i = 1 ; i < k+1; ++i) {\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t} \n\t\t\n\t\tSystem.out.println(sum);\n\t}\n\t\n\tpublic static int gcd(int num1,int num2) {\n if(num2==0) return num1;\n else return gcd(num2,num1%num2);\n\t}\n \n}", "import java.util.*;", "util.*", "java", "class Main\n{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint k = Integer.parseInt(sc.next());\n\t\t\n\t\tlong sum = 0;\n\t\t\n\t\tfor(int i = 1 ; i < k+1; ++i) {\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t} \n\t\t\n\t\tSystem.out.println(sum);\n\t}\n\t\n\tpublic static int gcd(int num1,int num2) {\n if(num2==0) return num1;\n else return gcd(num2,num1%num2);\n\t}\n \n}", "Main", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint k = Integer.parseInt(sc.next());\n\t\t\n\t\tlong sum = 0;\n\t\t\n\t\tfor(int i = 1 ; i < k+1; ++i) {\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t} \n\t\t\n\t\tSystem.out.println(sum);\n\t}", "main", "{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint k = Integer.parseInt(sc.next());\n\t\t\n\t\tlong sum = 0;\n\t\t\n\t\tfor(int i = 1 ; i < k+1; ++i) {\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t} \n\t\t\n\t\tSystem.out.println(sum);\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = Integer.parseInt(sc.next());", "k", "Integer.parseInt(sc.next())", "Integer.parseInt", "Integer", "sc.next()", "sc.next", "sc", "long sum = 0;", "sum", "0", "for(int i = 1 ; i < k+1; ++i) {\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t}", "int i = 1 ;", "int i = 1 ;", "i", "1", "i < k+1", "i", "k+1", "k", "1", "++i", "++i", "i", "{\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t}", "{\n\t\t for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }\n\t\t}", "for(int j = 1; j < k+1; ++j) {\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }", "int j = 1;", "int j = 1;", "j", "1", "j < k+1", "j", "k+1", "k", "1", "++j", "++j", "j", "{\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }", "{\n\t\t for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }\n\t\t }", "for(int l = 1; l < k+1; ++l) {\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }", "int l = 1;", "int l = 1;", "l", "1", "l < k+1", "l", "k+1", "k", "1", "++l", "++l", "l", "{\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }", "{\n\t\t int tmp = gcd(i, gcd(j, l));\n\t\t sum += tmp;\n\t\t }", "int tmp = gcd(i, gcd(j, l));", "tmp", "gcd(i, gcd(j, l))", "gcd", "i", "gcd(j, l)", "gcd", "j", "l", "sum += tmp", "sum", "tmp", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "public static int gcd(int num1,int num2) {\n if(num2==0) return num1;\n else return gcd(num2,num1%num2);\n\t}", "gcd", "{\n if(num2==0) return num1;\n else return gcd(num2,num1%num2);\n\t}", "if(num2==0) return num1;\n else return gcd(num2,num1%num2);", "num2==0", "num2", "0", "return num1;", "num1", "return gcd(num2,num1%num2);", "gcd(num2,num1%num2)", "gcd", "num2", "num1%num2", "num1", "num2", "int num1", "num1", "int num2", "num2" ]
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k = Integer.parseInt(sc.next()); long sum = 0; for(int i = 1 ; i < k+1; ++i) { for(int j = 1; j < k+1; ++j) { for(int l = 1; l < k+1; ++l) { int tmp = gcd(i, gcd(j, l)); sum += tmp; } } } System.out.println(sum); } public static int gcd(int num1,int num2) { if(num2==0) return num1; else return gcd(num2,num1%num2); } }
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 20, 4, 18, 18, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 29, 13, 12, 13, 30, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 42, 2, 2, 13, 13, 17, 30, 41, 13, 13, 0, 13, 2, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 137, 8 ], [ 137, 9 ], [ 9, 10 ], [ 9, 11 ], [ 137, 12 ], [ 12, 13 ], [ 12, 14 ], [ 137, 15 ], [ 15, 16 ], [ 15, 17 ], [ 137, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 21, 23 ], [ 20, 24 ], [ 24, 25 ], [ 25, 26 ], [ 26, 27 ], [ 26, 28 ], [ 24, 29 ], [ 29, 30 ], [ 30, 31 ], [ 18, 32 ], [ 32, 33 ], [ 137, 34 ], [ 34, 35 ], [ 34, 36 ], [ 36, 37 ], [ 37, 38 ], [ 37, 39 ], [ 39, 40 ], [ 40, 41 ], [ 36, 42 ], [ 42, 43 ], [ 42, 44 ], [ 36, 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 ], [ 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 ], [ 84, 86 ], [ 86, 87 ], [ 86, 88 ], [ 88, 89 ], [ 88, 90 ], [ 88, 91 ], [ 86, 92 ], [ 36, 93 ], [ 93, 94 ], [ 137, 95 ], [ 95, 96 ], [ 95, 97 ], [ 97, 98 ], [ 98, 99 ], [ 99, 100 ], [ 99, 101 ], [ 98, 102 ], [ 102, 103 ], [ 103, 104 ], [ 103, 105 ], [ 102, 106 ], [ 106, 107 ], [ 106, 108 ], [ 102, 109 ], [ 109, 110 ], [ 109, 111 ], [ 97, 112 ], [ 112, 113 ], [ 113, 114 ], [ 114, 115 ], [ 114, 116 ], [ 113, 117 ], [ 112, 118 ], [ 118, 119 ], [ 119, 120 ], [ 119, 121 ], [ 118, 122 ], [ 122, 123 ], [ 122, 124 ], [ 124, 125 ], [ 124, 126 ], [ 118, 127 ], [ 127, 128 ], [ 127, 129 ], [ 97, 130 ], [ 130, 131 ], [ 95, 132 ], [ 132, 133 ], [ 95, 134 ], [ 134, 135 ], [ 0, 136 ], [ 136, 137 ], [ 136, 138 ] ]
[ "import java.io.*;\nimport java.util.*;\n\npublic class Main {\n static PrintWriter out = new PrintWriter(System.out);\n static Scanner sc = new Scanner(System.in);\n static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] args) throws IOException {\n Main main = new Main();\n// main.solve();\n// out.flush();\n System.out.println(main.solve());\n }\n long solve() throws IOException{\n int k = sc.nextInt();\n long ans = 0;\n for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }\n return ans;\n }\n int gcd(int a, int b){\n if(a<b){\n int c = a; a=b;b=c;\n }\n while(a%b!=0){\n int c = b; b=a%b;a=c;\n }\n return b;\n }\n}\n", "import java.io.*;", "io.*", "java", "import java.util.*;", "util.*", "java", "public class Main {\n static PrintWriter out = new PrintWriter(System.out);\n static Scanner sc = new Scanner(System.in);\n static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] args) throws IOException {\n Main main = new Main();\n// main.solve();\n// out.flush();\n System.out.println(main.solve());\n }\n long solve() throws IOException{\n int k = sc.nextInt();\n long ans = 0;\n for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }\n return ans;\n }\n int gcd(int a, int b){\n if(a<b){\n int c = a; a=b;b=c;\n }\n while(a%b!=0){\n int c = b; b=a%b;a=c;\n }\n return b;\n }\n}", "Main", "static PrintWriter out = new PrintWriter(System.out);", "out", "new PrintWriter(System.out)", "static Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));", "reader", "new BufferedReader(new InputStreamReader(System.in))", "public static void main(String[] args) throws IOException {\n Main main = new Main();\n// main.solve();\n// out.flush();\n System.out.println(main.solve());\n }", "main", "{\n Main main = new Main();\n// main.solve();\n// out.flush();\n System.out.println(main.solve());\n }", "Main main = new Main();", "main", "new Main()", "System.out.println(main.solve())", "System.out.println", "System.out", "System", "System.out", "main.solve()", "main.solve", "main", "String[] args", "args", "long solve() throws IOException{\n int k = sc.nextInt();\n long ans = 0;\n for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }\n return ans;\n }", "solve", "{\n int k = sc.nextInt();\n long ans = 0;\n for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }\n return ans;\n }", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }", "int a=1;", "int a=1;", "a", "1", "a<=k", "a", "k", "a++", "a++", "a", "{\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }", "{\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }", "for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }", "int b=1;", "int b=1;", "b", "1", "b<=k", "b", "k", "b++", "b++", "b", "{\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }", "{\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }", "for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }", "int c=1;", "int c=1;", "c", "1", "c<=k", "c", "k", "c++", "c++", "c", "{\n ans += gcd(gcd(a,b),c);\n }", "{\n ans += gcd(gcd(a,b),c);\n }", "ans += gcd(gcd(a,b),c)", "ans", "gcd(gcd(a,b),c)", "gcd", "gcd(a,b)", "gcd", "a", "b", "c", "return ans;", "ans", "int gcd(int a, int b){\n if(a<b){\n int c = a; a=b;b=c;\n }\n while(a%b!=0){\n int c = b; b=a%b;a=c;\n }\n return b;\n }", "gcd", "{\n if(a<b){\n int c = a; a=b;b=c;\n }\n while(a%b!=0){\n int c = b; b=a%b;a=c;\n }\n return b;\n }", "if(a<b){\n int c = a; a=b;b=c;\n }", "a<b", "a", "b", "{\n int c = a; a=b;b=c;\n }", "int c = a;", "c", "a", "a=b", "a", "b", "b=c", "b", "c", "while(a%b!=0){\n int c = b; b=a%b;a=c;\n }", "a%b!=0", "a%b", "a", "b", "0", "{\n int c = b; b=a%b;a=c;\n }", "int c = b;", "c", "b", "b=a%b", "b", "a%b", "a", "b", "a=c", "a", "c", "return b;", "b", "int a", "a", "int b", "b", "public class Main {\n static PrintWriter out = new PrintWriter(System.out);\n static Scanner sc = new Scanner(System.in);\n static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] args) throws IOException {\n Main main = new Main();\n// main.solve();\n// out.flush();\n System.out.println(main.solve());\n }\n long solve() throws IOException{\n int k = sc.nextInt();\n long ans = 0;\n for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }\n return ans;\n }\n int gcd(int a, int b){\n if(a<b){\n int c = a; a=b;b=c;\n }\n while(a%b!=0){\n int c = b; b=a%b;a=c;\n }\n return b;\n }\n}", "public class Main {\n static PrintWriter out = new PrintWriter(System.out);\n static Scanner sc = new Scanner(System.in);\n static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] args) throws IOException {\n Main main = new Main();\n// main.solve();\n// out.flush();\n System.out.println(main.solve());\n }\n long solve() throws IOException{\n int k = sc.nextInt();\n long ans = 0;\n for(int a=1;a<=k;a++){\n for(int b=1;b<=k;b++){\n for(int c=1;c<=k;c++){\n ans += gcd(gcd(a,b),c);\n }\n }\n }\n return ans;\n }\n int gcd(int a, int b){\n if(a<b){\n int c = a; a=b;b=c;\n }\n while(a%b!=0){\n int c = b; b=a%b;a=c;\n }\n return b;\n }\n}", "Main" ]
import java.io.*; import java.util.*; public class Main { static PrintWriter out = new PrintWriter(System.out); static Scanner sc = new Scanner(System.in); static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { Main main = new Main(); // main.solve(); // out.flush(); System.out.println(main.solve()); } long solve() throws IOException{ int k = sc.nextInt(); long ans = 0; for(int a=1;a<=k;a++){ for(int b=1;b<=k;b++){ for(int c=1;c<=k;c++){ ans += gcd(gcd(a,b),c); } } } return ans; } int gcd(int a, int b){ if(a<b){ int c = a; a=b;b=c; } while(a%b!=0){ int c = b; b=a%b;a=c; } return b; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 17, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 11, 1, 41, 13, 17, 2, 13, 13, 1, 40, 13, 30, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 4, 13, 13, 2, 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 ], [ 102, 11 ], [ 102, 12 ], [ 12, 13 ], [ 12, 14 ], [ 14, 15 ], [ 15, 16 ], [ 15, 17 ], [ 14, 18 ], [ 18, 19 ], [ 18, 20 ], [ 20, 21 ], [ 21, 22 ], [ 20, 23 ], [ 23, 24 ], [ 24, 25 ], [ 14, 26 ], [ 26, 27 ], [ 26, 28 ], [ 14, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 40, 41 ], [ 41, 42 ], [ 42, 43 ], [ 43, 44 ], [ 43, 45 ], [ 41, 46 ], [ 46, 47 ], [ 46, 48 ], [ 41, 49 ], [ 49, 50 ], [ 50, 51 ], [ 41, 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 ], [ 64, 65 ], [ 65, 66 ], [ 65, 67 ], [ 67, 68 ], [ 67, 69 ], [ 69, 70 ], [ 69, 71 ], [ 69, 72 ], [ 67, 73 ], [ 14, 74 ], [ 74, 75 ], [ 75, 76 ], [ 76, 77 ], [ 76, 78 ], [ 74, 79 ], [ 12, 80 ], [ 80, 81 ], [ 102, 82 ], [ 82, 83 ], [ 82, 84 ], [ 84, 85 ], [ 85, 86 ], [ 86, 87 ], [ 87, 88 ], [ 87, 89 ], [ 86, 90 ], [ 90, 91 ], [ 90, 92 ], [ 90, 93 ], [ 93, 94 ], [ 93, 95 ], [ 86, 96 ], [ 82, 97 ], [ 97, 98 ], [ 82, 99 ], [ 99, 100 ], [ 0, 101 ], [ 101, 102 ], [ 101, 103 ] ]
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n \n long sum = 0L;\n for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j) {\n \treturn j > 0 ? gcd(j, i % j) : i;\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 public static void main(String[] args) throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n \n long sum = 0L;\n for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j) {\n \treturn j > 0 ? gcd(j, i % j) : i;\n }\n}", "Main", "public static void main(String[] args) throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n \n long sum = 0L;\n for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);\n \n System.out.print(sum);\n }", "main", "{\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n \n long sum = 0L;\n for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);\n \n System.out.print(sum);\n }", "BufferedReader br = new BufferedReader(new InputStreamReader(System.in));", "br", "new BufferedReader(new InputStreamReader(System.in))", "int k = Integer.parseInt(br.readLine());", "k", "Integer.parseInt(br.readLine())", "Integer.parseInt", "Integer", "br.readLine()", "br.readLine", "br", "long sum = 0L;", "sum", "0L", "for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);", "for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);", "int j = 1;", "int j = 1;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);", "for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);", "int s = 1;", "int s = 1;", "s", "1", "s <= k", "s", "k", "s++", "s++", "s", "sum += gcd(gcd(i, j), s);", "sum += gcd(gcd(i, j), s)", "sum", "gcd(gcd(i, j), s)", "gcd", "gcd(i, j)", "gcd", "i", "j", "s", "System.out.print(sum)", "System.out.print", "System.out", "System", "System.out", "sum", "String[] args", "args", "private static int gcd(int i, int j) {\n \treturn j > 0 ? gcd(j, i % j) : i;\n }", "gcd", "{\n \treturn j > 0 ? gcd(j, i % j) : i;\n }", "return j > 0 ? gcd(j, i % j) : i;", "j > 0 ? gcd(j, i % j) : i", "j > 0", "j", "0", "gcd(j, i % j)", "gcd", "j", "i % j", "i", "j", "i", "int i", "i", "int j", "j", "public class Main {\n public static void main(String[] args) throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n \n long sum = 0L;\n for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j) {\n \treturn j > 0 ? gcd(j, i % j) : i;\n }\n}", "public class Main {\n public static void main(String[] args) throws IOException {\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n int k = Integer.parseInt(br.readLine());\n \n long sum = 0L;\n for (int i = 1; i <= k; i++)\n for (int j = 1; j <= k; j++)\n for (int s = 1; s <= k; s++)\n sum += gcd(gcd(i, j), s);\n \n System.out.print(sum);\n }\n \n private static int gcd(int i, int j) {\n \treturn j > 0 ? gcd(j, i % j) : i;\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)); int k = Integer.parseInt(br.readLine()); long sum = 0L; for (int i = 1; i <= k; i++) for (int j = 1; j <= k; j++) for (int s = 1; s <= k; s++) sum += gcd(gcd(i, j), s); System.out.print(sum); } private static int gcd(int i, int j) { return j > 0 ? gcd(j, i % j) : i; } }
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 20, 2, 2, 2, 13, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 6, 13, 41, 13, 2, 17, 17, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 0, 13, 20, 0, 13, 20, 13, 0, 13, 0, 13, 17, 12, 13, 30, 0, 13, 20, 0, 13, 20, 13, 0, 13, 0, 13, 17, 23, 13, 12, 13, 30, 41, 13, 20, 17, 41, 13, 17, 41, 13, 42, 2, 0, 13, 4, 13, 40, 17, 30, 14, 2, 13, 17, 3, 0, 18, 13, 40, 13, 13, 29, 20, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 41, 13, 17, 41, 13, 17, 41, 13, 4, 13, 42, 2, 13, 17, 0, 13, 4, 13, 41, 13, 2, 13, 17, 14, 13, 0, 13, 4, 13, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 2, 13, 17, 13, 17, 14, 2, 13, 17, 30, 42, 2, 2, 0, 13, 4, 13, 17, 2, 13, 17, 30, 0, 13, 2, 2, 13, 17, 0, 13, 17, 14, 13, 29, 40, 13, 29, 13, 12, 13, 30, 0, 13, 4, 18, 13, 13, 0, 13, 17, 13, 14, 2, 13, 40, 17, 0, 18, 13, 17, 40, 17, 12, 13, 30, 14, 2, 13, 13, 4, 13, 29, 18, 13, 40, 13, 12, 13, 30, 14, 2, 13, 17, 29, 4, 18, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], [ 13, 15 ], [ 0, 16 ], [ 16, 17 ], [ 16, 18 ], [ 0, 19 ], [ 452, 20 ], [ 452, 21 ], [ 21, 22 ], [ 21, 23 ], [ 23, 24 ], [ 24, 25 ], [ 25, 26 ], [ 25, 27 ], [ 24, 28 ], [ 28, 29 ], [ 23, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 33, 34 ], [ 33, 35 ], [ 31, 36 ], [ 21, 37 ], [ 37, 38 ], [ 21, 39 ], [ 39, 40 ], [ 452, 41 ], [ 41, 42 ], [ 41, 43 ], [ 43, 44 ], [ 44, 45 ], [ 44, 46 ], [ 43, 47 ], [ 47, 48 ], [ 47, 49 ], [ 49, 50 ], [ 50, 51 ], [ 43, 52 ], [ 52, 53 ], [ 52, 54 ], [ 55, 56 ], [ 56, 57 ], [ 57, 58 ], [ 57, 59 ], [ 56, 60 ], [ 55, 61 ], [ 43, 62 ], [ 62, 63 ], [ 62, 64 ], [ 43, 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 ], [ 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 ], [ 91, 96 ], [ 96, 97 ], [ 96, 98 ], [ 91, 99 ], [ 99, 100 ], [ 100, 101 ], [ 91, 102 ], [ 103, 103 ], [ 103, 104 ], [ 104, 105 ], [ 104, 106 ], [ 106, 107 ], [ 106, 108 ], [ 106, 109 ], [ 109, 110 ], [ 109, 111 ], [ 109, 112 ], [ 43, 113 ], [ 113, 114 ], [ 114, 115 ], [ 115, 116 ], [ 115, 117 ], [ 113, 118 ], [ 41, 119 ], [ 119, 120 ], [ 452, 121 ], [ 121, 122 ], [ 121, 123 ], [ 123, 124 ], [ 123, 125 ], [ 125, 126 ], [ 125, 127 ], [ 121, 128 ], [ 128, 129 ], [ 121, 130 ], [ 130, 131 ], [ 121, 132 ], [ 132, 133 ], [ 121, 134 ], [ 134, 135 ], [ 121, 136 ], [ 136, 137 ], [ 136, 138 ], [ 138, 139 ], [ 139, 140 ], [ 139, 141 ], [ 138, 142 ], [ 142, 143 ], [ 142, 144 ], [ 138, 146 ], [ 146, 147 ], [ 146, 148 ], [ 148, 149 ], [ 148, 150 ], [ 121, 151 ], [ 151, 152 ], [ 151, 153 ], [ 153, 154 ], [ 154, 155 ], [ 154, 156 ], [ 153, 157 ], [ 157, 158 ], [ 157, 159 ], [ 153, 161 ], [ 161, 162 ], [ 161, 163 ], [ 163, 164 ], [ 163, 165 ], [ 151, 166 ], [ 166, 167 ], [ 121, 168 ], [ 168, 169 ], [ 168, 170 ], [ 170, 171 ], [ 171, 172 ], [ 171, 173 ], [ 170, 175 ], [ 175, 176 ], [ 175, 177 ], [ 170, 178 ], [ 178, 179 ], [ 170, 180 ], [ 180, 181 ], [ 181, 182 ], [ 182, 183 ], [ 182, 184 ], [ 184, 185 ], [ 181, 186 ], [ 186, 187 ], [ 180, 188 ], [ 188, 189 ], [ 189, 190 ], [ 190, 191 ], [ 190, 192 ], [ 189, 193 ], [ 188, 194 ], [ 194, 195 ], [ 195, 196 ], [ 195, 197 ], [ 197, 198 ], [ 194, 199 ], [ 170, 200 ], [ 200, 201 ], [ 121, 202 ], [ 202, 203 ], [ 202, 204 ], [ 204, 205 ], [ 205, 206 ], [ 205, 207 ], [ 204, 208 ], [ 208, 209 ], [ 208, 210 ], [ 210, 211 ], [ 204, 212 ], [ 212, 213 ], [ 213, 214 ], [ 213, 215 ], [ 212, 216 ], [ 216, 217 ], [ 216, 218 ], [ 218, 219 ], [ 204, 220 ], [ 220, 221 ], [ 220, 222 ], [ 222, 223 ], [ 222, 224 ], [ 204, 225 ], [ 225, 226 ], [ 225, 227 ], [ 227, 228 ], [ 227, 229 ], [ 229, 230 ], [ 204, 231 ], [ 231, 232 ], [ 232, 233 ], [ 233, 234 ], [ 234, 235 ], [ 234, 236 ], [ 236, 237 ], [ 233, 238 ], [ 232, 239 ], [ 239, 240 ], [ 239, 241 ], [ 231, 242 ], [ 242, 243 ], [ 243, 244 ], [ 243, 245 ], [ 245, 246 ], [ 246, 247 ], [ 247, 248 ], [ 247, 249 ], [ 246, 250 ], [ 245, 251 ], [ 204, 252 ], [ 252, 253 ], [ 252, 254 ], [ 254, 255 ], [ 255, 256 ], [ 204, 257 ], [ 257, 258 ], [ 121, 259 ], [ 259, 260 ], [ 259, 261 ], [ 261, 262 ], [ 262, 263 ], [ 262, 264 ], [ 261, 265 ], [ 265, 266 ], [ 265, 267 ], [ 267, 268 ], [ 261, 269 ], [ 269, 270 ], [ 270, 271 ], [ 270, 272 ], [ 269, 273 ], [ 273, 274 ], [ 273, 275 ], [ 275, 276 ], [ 261, 277 ], [ 277, 278 ], [ 277, 279 ], [ 279, 280 ], [ 279, 281 ], [ 261, 282 ], [ 282, 283 ], [ 282, 284 ], [ 284, 285 ], [ 284, 286 ], [ 286, 287 ], [ 261, 288 ], [ 288, 289 ], [ 289, 290 ], [ 290, 291 ], [ 291, 292 ], [ 291, 293 ], [ 293, 294 ], [ 290, 295 ], [ 289, 296 ], [ 296, 297 ], [ 296, 298 ], [ 288, 299 ], [ 299, 300 ], [ 300, 301 ], [ 300, 302 ], [ 302, 303 ], [ 303, 304 ], [ 304, 305 ], [ 304, 306 ], [ 303, 307 ], [ 302, 308 ], [ 261, 309 ], [ 309, 310 ], [ 309, 311 ], [ 311, 312 ], [ 312, 313 ], [ 261, 314 ], [ 314, 315 ], [ 121, 316 ], [ 316, 317 ], [ 316, 318 ], [ 318, 319 ], [ 319, 320 ], [ 319, 321 ], [ 318, 322 ], [ 322, 323 ], [ 322, 324 ], [ 318, 325 ], [ 325, 326 ], [ 325, 327 ], [ 327, 328 ], [ 318, 329 ], [ 329, 330 ], [ 330, 331 ], [ 330, 332 ], [ 329, 333 ], [ 333, 334 ], [ 333, 335 ], [ 335, 336 ], [ 318, 337 ], [ 337, 338 ], [ 337, 339 ], [ 339, 340 ], [ 339, 341 ], [ 318, 342 ], [ 342, 343 ], [ 342, 344 ], [ 344, 345 ], [ 344, 346 ], [ 346, 347 ], [ 318, 348 ], [ 348, 349 ], [ 349, 350 ], [ 350, 351 ], [ 351, 352 ], [ 351, 353 ], [ 353, 354 ], [ 350, 355 ], [ 349, 356 ], [ 356, 357 ], [ 356, 358 ], [ 348, 359 ], [ 359, 360 ], [ 360, 361 ], [ 360, 362 ], [ 362, 363 ], [ 363, 364 ], [ 364, 365 ], [ 364, 366 ], [ 363, 367 ], [ 362, 368 ], [ 318, 369 ], [ 369, 370 ], [ 370, 371 ], [ 370, 372 ], [ 369, 373 ], [ 373, 374 ], [ 374, 375 ], [ 375, 376 ], [ 376, 377 ], [ 377, 378 ], [ 377, 379 ], [ 379, 380 ], [ 376, 381 ], [ 375, 382 ], [ 382, 383 ], [ 382, 384 ], [ 374, 385 ], [ 385, 386 ], [ 386, 387 ], [ 386, 388 ], [ 388, 389 ], [ 389, 390 ], [ 389, 391 ], [ 388, 392 ], [ 392, 393 ], [ 392, 394 ], [ 318, 395 ], [ 395, 396 ], [ 395, 397 ], [ 397, 398 ], [ 398, 399 ], [ 318, 400 ], [ 400, 401 ], [ 121, 402 ], [ 402, 403 ], [ 402, 404 ], [ 404, 405 ], [ 405, 406 ], [ 405, 407 ], [ 407, 408 ], [ 408, 409 ], [ 407, 410 ], [ 407, 411 ], [ 411, 412 ], [ 411, 413 ], [ 407, 414 ], [ 404, 415 ], [ 415, 416 ], [ 416, 417 ], [ 416, 418 ], [ 418, 419 ], [ 415, 420 ], [ 420, 421 ], [ 421, 422 ], [ 421, 423 ], [ 420, 424 ], [ 424, 425 ], [ 121, 426 ], [ 426, 427 ], [ 426, 428 ], [ 428, 429 ], [ 429, 430 ], [ 430, 431 ], [ 430, 432 ], [ 429, 433 ], [ 433, 434 ], [ 428, 435 ], [ 435, 436 ], [ 436, 437 ], [ 436, 438 ], [ 438, 439 ], [ 121, 440 ], [ 440, 441 ], [ 440, 442 ], [ 442, 443 ], [ 443, 444 ], [ 444, 445 ], [ 444, 446 ], [ 443, 447 ], [ 442, 448 ], [ 448, 449 ], [ 449, 450 ], [ 0, 451 ], [ 451, 452 ], [ 451, 453 ] ]
[ "import java.io.DataInputStream;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.lang.reflect.Array;\nimport java.util.*;\n\npublic class Main {\n\n\n static class Reader {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n public static void main(String[] args) throws IOException {\n Reader r = new Reader();\n int k = r.nextInt();\n int[] dp = new int[(k*k*k)+1];\n long ans = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }\n System.out.println(ans);\n }\n}", "import java.io.DataInputStream;", "DataInputStream", "java.io", "import java.io.FileInputStream;", "FileInputStream", "java.io", "import java.io.IOException;", "IOException", "java.io", "import java.io.InputStreamReader;", "InputStreamReader", "java.io", "import java.lang.reflect.Array;", "Array", "java.lang.reflect", "import java.util.*;", "util.*", "java", "public class Main {\n\n\n static class Reader {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n public static void main(String[] args) throws IOException {\n Reader r = new Reader();\n int k = r.nextInt();\n int[] dp = new int[(k*k*k)+1];\n long ans = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main", "static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }", "gcd", "{\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }", "if (a == 0)\n return b;", "a == 0", "a", "0", "return b;", "b", "return gcd(b % a, a);", "gcd(b % a, a)", "gcd", "b % a", "b", "a", "a", "int a", "a", "int b", "b", "public static void main(String[] args) throws IOException {\n Reader r = new Reader();\n int k = r.nextInt();\n int[] dp = new int[(k*k*k)+1];\n long ans = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }\n System.out.println(ans);\n }", "main", "{\n Reader r = new Reader();\n int k = r.nextInt();\n int[] dp = new int[(k*k*k)+1];\n long ans = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }\n System.out.println(ans);\n }", "Reader r = new Reader();", "r", "new Reader()", "int k = r.nextInt();", "k", "r.nextInt()", "r.nextInt", "r", "int[] dp = new int[(k*k*k)+1];", "dp", "new int[(k*k*k)+1]", "(k*k*k)+1", "(k*k*k)", "k*k*k", "k", "k", "k", "1", "long ans = 0;", "ans", "0", "for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }", "int a = 1;", "int a = 1;", "a", "1", "a <= k", "a", "k", "a++", "a++", "a", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }", "{\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }", "for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }", "int b = 1;", "int b = 1;", "b", "1", "b <= k", "b", "k", "b++", "b++", "b", "{\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }", "{\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }", "for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }", "int c = 1;", "int c = 1;", "c", "1", "c <= k", "c", "k", "c++", "c++", "c", "{\n ans += gcd(a, gcd(b, c));\n }", "{\n ans += gcd(a, gcd(b, c));\n }", "ans += gcd(a, gcd(b, c))", "ans", "gcd(a, gcd(b, c))", "gcd", "a", "gcd(b, c)", "gcd", "b", "c", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "static class Reader {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n }", "Reader", "final private int BUFFER_SIZE = 1 << 16;", "BUFFER_SIZE", "1 << 16", "1", "16", "private DataInputStream din;", "din", "private byte[] buffer;", "buffer", "private int bufferPointer", "bufferPointer", "bytesRead;", "bytesRead", "public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "Reader", "{\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(System.in)", "din", "new DataInputStream(System.in)", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "public Reader(String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "Reader", "{\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }", "din = new DataInputStream(new FileInputStream(file_name))", "din", "new DataInputStream(new FileInputStream(file_name))", "buffer = new byte[BUFFER_SIZE]", "buffer", "new byte[BUFFER_SIZE]", "BUFFER_SIZE", "bufferPointer = bytesRead = 0", "bufferPointer", "bytesRead = 0", "bytesRead", "0", "String file_name", "file_name", "public String readLine() throws IOException {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }", "readLine", "{\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }", "byte[] buf = new byte[64];", "buf", "new byte[64]", "64", "int cnt = 0", "cnt", "0", "c;", "c", "while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }", "(c = read()) != -1", "(c = read())", "c", "read()", "read", "-1", "1", "{\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }", "if (c == '\\n')\n break;", "c == '\\n'", "c", "'\\n'", "break;", "buf[cnt++] = (byte) c", "buf[cnt++]", "buf", "cnt++", "cnt", "(byte) c", "return new String(buf, 0, cnt);", "new String(buf, 0, cnt)", "public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "nextInt", "{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }", "int ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "nextLong", "{\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }", "long ret = 0;", "ret", "0", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }", "nextDouble", "{\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }", "double ret = 0", "ret", "0", "div = 1;", "div", "1", "byte c = read();", "c", "read()", "read", "while (c <= ' ')\n c = read();", "c <= ' '", "c", "' '", "c = read()", "c", "read()", "read", "boolean neg = (c == '-');", "neg", "(c == '-')", "c", "'-'", "if (neg)\n c = read();", "neg", "c = read()", "c", "read()", "read", "do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret = ret * 10 + c - '0';\n }", "ret = ret * 10 + c - '0'", "ret", "ret * 10 + c - '0'", "ret * 10 + c", "ret * 10", "ret", "10", "c", "'0'", "if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }", "c == '.'", "c", "'.'", "{\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }", "while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }", "(c = read()) >= '0' && c <= '9'", "(c = read()) >= '0'", "(c = read())", "c", "read()", "read", "'0'", "c <= '9'", "c", "'9'", "{\n ret += (c - '0') / (div *= 10);\n }", "ret += (c - '0') / (div *= 10)", "ret", "(c - '0') / (div *= 10)", "(c - '0')", "c", "'0'", "(div *= 10)", "div", "10", "if (neg)\n return -ret;", "neg", "return -ret;", "-ret", "ret", "return ret;", "ret", "private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "fillBuffer", "{\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }", "bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "bytesRead", "din.read(buffer, bufferPointer = 0, BUFFER_SIZE)", "din.read", "din", "buffer", "bufferPointer = 0", "bufferPointer", "0", "BUFFER_SIZE", "if (bytesRead == -1)\n buffer[0] = -1;", "bytesRead == -1", "bytesRead", "-1", "1", "buffer[0] = -1", "buffer[0]", "buffer", "0", "-1", "1", "private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "read", "{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }", "if (bufferPointer == bytesRead)\n fillBuffer();", "bufferPointer == bytesRead", "bufferPointer", "bytesRead", "fillBuffer()", "fillBuffer", "return buffer[bufferPointer++];", "buffer[bufferPointer++]", "buffer", "bufferPointer++", "bufferPointer", "public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }", "close", "{\n if (din == null)\n return;\n din.close();\n }", "if (din == null)\n return;", "din == null", "din", "null", "return;", "din.close()", "din.close", "din", "public class Main {\n\n\n static class Reader {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n public static void main(String[] args) throws IOException {\n Reader r = new Reader();\n int k = r.nextInt();\n int[] dp = new int[(k*k*k)+1];\n long ans = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }\n System.out.println(ans);\n }\n}", "public class Main {\n\n\n static class Reader {\n final private int BUFFER_SIZE = 1 << 16;\n private DataInputStream din;\n private byte[] buffer;\n private int bufferPointer, bytesRead;\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public Reader(String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[64]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n\n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n }\n while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n }\n\n static int gcd(int a, int b) {\n if (a == 0)\n return b;\n return gcd(b % a, a);\n }\n\n public static void main(String[] args) throws IOException {\n Reader r = new Reader();\n int k = r.nextInt();\n int[] dp = new int[(k*k*k)+1];\n long ans = 0;\n for (int a = 1; a <= k; a++) {\n for (int b = 1; b <= k; b++) {\n for (int c = 1; c <= k; c++) {\n ans += gcd(a, gcd(b, c));\n }\n }\n }\n System.out.println(ans);\n }\n}", "Main" ]
import java.io.DataInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.lang.reflect.Array; import java.util.*; public class Main { static class Reader { final private int BUFFER_SIZE = 1 << 16; private DataInputStream din; private byte[] buffer; private int bufferPointer, bytesRead; public Reader() { din = new DataInputStream(System.in); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public Reader(String file_name) throws IOException { din = new DataInputStream(new FileInputStream(file_name)); buffer = new byte[BUFFER_SIZE]; bufferPointer = bytesRead = 0; } public String readLine() throws IOException { byte[] buf = new byte[64]; // line length int cnt = 0, c; while ((c = read()) != -1) { if (c == '\n') break; buf[cnt++] = (byte) c; } return new String(buf, 0, cnt); } public int nextInt() throws IOException { int ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public long nextLong() throws IOException { long ret = 0; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (neg) return -ret; return ret; } public double nextDouble() throws IOException { double ret = 0, div = 1; byte c = read(); while (c <= ' ') c = read(); boolean neg = (c == '-'); if (neg) c = read(); do { ret = ret * 10 + c - '0'; } while ((c = read()) >= '0' && c <= '9'); if (c == '.') { while ((c = read()) >= '0' && c <= '9') { ret += (c - '0') / (div *= 10); } } if (neg) return -ret; return ret; } private void fillBuffer() throws IOException { bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE); if (bytesRead == -1) buffer[0] = -1; } private byte read() throws IOException { if (bufferPointer == bytesRead) fillBuffer(); return buffer[bufferPointer++]; } public void close() throws IOException { if (din == null) return; din.close(); } } static int gcd(int a, int b) { if (a == 0) return b; return gcd(b % a, a); } public static void main(String[] args) throws IOException { Reader r = new Reader(); int k = r.nextInt(); int[] dp = new int[(k*k*k)+1]; long ans = 0; for (int a = 1; a <= k; a++) { for (int b = 1; b <= k; b++) { for (int c = 1; c <= k; c++) { ans += gcd(a, gcd(b, c)); } } } System.out.println(ans); } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 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, 0, 13, 4, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 17, 14, 2, 2, 13, 13, 17, 30, 29, 13, 30, 0, 13, 2, 13, 13, 29, 4, 13, 13, 13, 23, 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 ], [ 8, 20 ], [ 20, 21 ], [ 20, 22 ], [ 8, 23 ], [ 23, 24 ], [ 23, 25 ], [ 8, 26 ], [ 26, 27 ], [ 26, 28 ], [ 8, 29 ], [ 29, 30 ], [ 30, 31 ], [ 31, 32 ], [ 31, 33 ], [ 29, 34 ], [ 34, 35 ], [ 34, 36 ], [ 29, 37 ], [ 37, 38 ], [ 38, 39 ], [ 29, 40 ], [ 41, 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 ], [ 55, 60 ], [ 60, 61 ], [ 60, 62 ], [ 55, 63 ], [ 63, 64 ], [ 64, 65 ], [ 55, 66 ], [ 67, 67 ], [ 67, 68 ], [ 68, 69 ], [ 68, 70 ], [ 70, 71 ], [ 70, 72 ], [ 72, 73 ], [ 72, 74 ], [ 72, 75 ], [ 70, 76 ], [ 8, 77 ], [ 77, 78 ], [ 78, 79 ], [ 79, 80 ], [ 79, 81 ], [ 77, 82 ], [ 6, 83 ], [ 83, 84 ], [ 116, 85 ], [ 85, 86 ], [ 85, 87 ], [ 87, 88 ], [ 88, 89 ], [ 88, 90 ], [ 87, 91 ], [ 91, 92 ], [ 92, 93 ], [ 93, 94 ], [ 93, 95 ], [ 92, 96 ], [ 91, 97 ], [ 97, 98 ], [ 98, 99 ], [ 91, 100 ], [ 100, 101 ], [ 101, 102 ], [ 101, 103 ], [ 103, 104 ], [ 103, 105 ], [ 100, 106 ], [ 106, 107 ], [ 107, 108 ], [ 107, 109 ], [ 107, 110 ], [ 85, 111 ], [ 111, 112 ], [ 85, 113 ], [ 113, 114 ], [ 0, 115 ], [ 115, 116 ], [ 115, 117 ] ]
[ "import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n \n int a = 0;\n int b = 0;\n int c = 0;\n int sum = 0;\n \n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }\n System.out.println(sum);\n \n }\n static int gcd(int x, int y) {\n int amari = 0;\n if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\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 int K = sc.nextInt();\n \n int a = 0;\n int b = 0;\n int c = 0;\n int sum = 0;\n \n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }\n System.out.println(sum);\n \n }\n static int gcd(int x, int y) {\n int amari = 0;\n if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\n }\n }\n}", "Main", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n \n int a = 0;\n int b = 0;\n int c = 0;\n int sum = 0;\n \n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }\n System.out.println(sum);\n \n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n \n int a = 0;\n int b = 0;\n int c = 0;\n int sum = 0;\n \n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }\n System.out.println(sum);\n \n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int K = sc.nextInt();", "K", "sc.nextInt()", "sc.nextInt", "sc", "int a = 0;", "a", "0", "int b = 0;", "b", "0", "int c = 0;", "c", "0", "int sum = 0;", "sum", "0", "for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= K", "i", "K", "i++", "i++", "i", "{\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }", "{\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }", "for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }", "int j = 1;", "int j = 1;", "j", "1", "j <= K", "j", "K", "j++", "j++", "j", "{\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }", "{\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }", "for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n }", "int k = 1;", "int k = 1;", "k", "1", "k <= K", "k", "K", "k++", "k++", "k", "{\n sum += gcd(gcd(i, j), k);\n }", "{\n sum += gcd(gcd(i, j), k);\n }", "sum += gcd(gcd(i, j), k)", "sum", "gcd(gcd(i, j), k)", "gcd", "gcd(i, j)", "gcd", "i", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "static int gcd(int x, int y) {\n int amari = 0;\n if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\n }\n }", "gcd", "{\n int amari = 0;\n if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\n }\n }", "int amari = 0;", "amari", "0", "if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\n }", "x % y == 0", "x % y", "x", "y", "0", "{\n return y;\n }", "return y;", "y", "{\n amari = x % y;\n return gcd(y, amari);\n }", "amari = x % y", "amari", "x % y", "x", "y", "return gcd(y, amari);", "gcd(y, amari)", "gcd", "y", "amari", "int x", "x", "int y", "y", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n \n int a = 0;\n int b = 0;\n int c = 0;\n int sum = 0;\n \n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }\n System.out.println(sum);\n \n }\n static int gcd(int x, int y) {\n int amari = 0;\n if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\n }\n }\n}", "public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int K = sc.nextInt();\n \n int a = 0;\n int b = 0;\n int c = 0;\n int sum = 0;\n \n for(int i = 1; i <= K; i++) {\n for(int j = 1; j <= K; j++) {\n for(int k = 1; k <= K; k++) {\n sum += gcd(gcd(i, j), k);\n } \n }\n }\n System.out.println(sum);\n \n }\n static int gcd(int x, int y) {\n int amari = 0;\n if(x % y == 0) {\n return y;\n }else {\n amari = x % y;\n return gcd(y, amari);\n }\n }\n}", "Main" ]
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int K = sc.nextInt(); int a = 0; int b = 0; int c = 0; int sum = 0; for(int i = 1; i <= K; i++) { for(int j = 1; j <= K; j++) { for(int k = 1; k <= K; k++) { sum += gcd(gcd(i, j), k); } } } System.out.println(sum); } static int gcd(int x, int y) { int amari = 0; if(x % y == 0) { return y; }else { amari = x % y; return gcd(y, amari); } } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 29, 8, 2, 13, 17, 4, 13, 13, 2, 13, 13, 13, 23, 13, 23, 13, 10, 6, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 96, 5 ], [ 96, 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 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 96, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 80, 81 ], [ 81, 82 ], [ 81, 83 ], [ 80, 84 ], [ 84, 85 ], [ 84, 86 ], [ 84, 87 ], [ 87, 88 ], [ 87, 89 ], [ 80, 90 ], [ 76, 91 ], [ 91, 92 ], [ 76, 93 ], [ 93, 94 ], [ 0, 95 ], [ 95, 96 ], [ 95, 97 ] ]
[ "import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n // 文字列切り出し\n for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }\n \n System.out.println(ans);\n }\n\n // 最大公約数\n static int gcd(int a, int b) {\n return b>0 ? gcd(b, a%b) : a;\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 k = sc.nextInt();\n long ans = 0;\n // 文字列切り出し\n for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }\n \n System.out.println(ans);\n }\n\n // 最大公約数\n static int gcd(int a, int b) {\n return b>0 ? gcd(b, a%b) : a;\n }\n}", "Main", "public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n // 文字列切り出し\n for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }\n \n System.out.println(ans);\n }", "main", "{\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n // 文字列切り出し\n for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }\n \n System.out.println(ans);\n }", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int k = sc.nextInt();", "k", "sc.nextInt()", "sc.nextInt", "sc", "long ans = 0;", "ans", "0", "for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }", "int i = 1;", "int i = 1;", "i", "1", "i <= k", "i", "k", "i++", "i++", "i", "{\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }", "{\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }", "for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }", "int j = 1;", "int j = 1;", "j", "1", "j <= k", "j", "k", "j++", "j++", "j", "{\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }", "{\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }", "for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }", "int h = 1;", "int h = 1;", "h", "1", "h <= k", "h", "k", "h++", "h++", "h", "{\n ans += gcd(i, gcd(j, h));\n }", "{\n ans += gcd(i, gcd(j, h));\n }", "ans += gcd(i, gcd(j, h))", "ans", "gcd(i, gcd(j, h))", "gcd", "i", "gcd(j, h)", "gcd", "j", "h", "System.out.println(ans)", "System.out.println", "System.out", "System", "System.out", "ans", "String[] args", "args", "// 最大公約数\n static int gcd(int a, int b) {\n return b>0 ? gcd(b, a%b) : a;\n }", "gcd", "{\n return b>0 ? gcd(b, a%b) : a;\n }", "return b>0 ? gcd(b, a%b) : a;", "b>0 ? gcd(b, a%b) : a", "b>0", "b", "0", "gcd(b, a%b)", "gcd", "b", "a%b", "a", "b", "a", "int a", "a", "int b", "b", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n // 文字列切り出し\n for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }\n \n System.out.println(ans);\n }\n\n // 最大公約数\n static int gcd(int a, int b) {\n return b>0 ? gcd(b, a%b) : a;\n }\n}", "public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int k = sc.nextInt();\n long ans = 0;\n // 文字列切り出し\n for(int i = 1; i <= k; i++) {\n for(int j = 1; j <= k; j++) {\n for(int h = 1; h <= k; h++) {\n ans += gcd(i, gcd(j, h));\n }\n }\n }\n \n System.out.println(ans);\n }\n\n // 最大公約数\n static int gcd(int a, int b) {\n return b>0 ? gcd(b, a%b) : a;\n }\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int k = sc.nextInt(); long ans = 0; // 文字列切り出し for(int i = 1; i <= k; i++) { for(int j = 1; j <= k; j++) { for(int h = 1; h <= k; h++) { ans += gcd(i, gcd(j, h)); } } } System.out.println(ans); } // 最大公約数 static int gcd(int a, int b) { return b>0 ? gcd(b, a%b) : a; } }
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 13, 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, 0, 13, 4, 13, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, 13, 13, 17, 30, 0, 13, 13, 0, 13, 13, 29, 13, 23, 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 ], [ 8, 17 ], [ 17, 18 ], [ 17, 19 ], [ 8, 20 ], [ 20, 21 ], [ 21, 22 ], [ 22, 23 ], [ 22, 24 ], [ 20, 25 ], [ 25, 26 ], [ 25, 27 ], [ 20, 28 ], [ 28, 29 ], [ 29, 30 ], [ 20, 31 ], [ 32, 32 ], [ 32, 33 ], [ 33, 34 ], [ 34, 35 ], [ 35, 36 ], [ 35, 37 ], [ 33, 38 ], [ 38, 39 ], [ 38, 40 ], [ 33, 41 ], [ 41, 42 ], [ 42, 43 ], [ 33, 44 ], [ 45, 45 ], [ 45, 46 ], [ 46, 47 ], [ 47, 48 ], [ 48, 49 ], [ 48, 50 ], [ 46, 51 ], [ 51, 52 ], [ 51, 53 ], [ 46, 54 ], [ 54, 55 ], [ 55, 56 ], [ 46, 57 ], [ 58, 58 ], [ 58, 59 ], [ 59, 60 ], [ 59, 61 ], [ 61, 62 ], [ 61, 63 ], [ 61, 64 ], [ 64, 65 ], [ 64, 66 ], [ 64, 67 ], [ 8, 68 ], [ 68, 69 ], [ 69, 70 ], [ 70, 71 ], [ 70, 72 ], [ 68, 73 ], [ 6, 74 ], [ 74, 75 ], [ 103, 76 ], [ 76, 77 ], [ 76, 78 ], [ 78, 79 ], [ 79, 80 ], [ 78, 81 ], [ 81, 82 ], [ 82, 83 ], [ 83, 84 ], [ 83, 85 ], [ 85, 86 ], [ 85, 87 ], [ 82, 88 ], [ 81, 89 ], [ 89, 90 ], [ 90, 91 ], [ 90, 92 ], [ 89, 93 ], [ 93, 94 ], [ 93, 95 ], [ 78, 96 ], [ 96, 97 ], [ 76, 98 ], [ 98, 99 ], [ 76, 100 ], [ 100, 101 ], [ 0, 102 ], [ 102, 103 ], [ 102, 104 ] ]
[ "import java.util.Scanner;\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\tint n = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n}", "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\tint n = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\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\tint n = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}", "main", "{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}", "Scanner sc = new Scanner(System.in);", "sc", "new Scanner(System.in)", "int n = sc.nextInt();", "n", "sc.nextInt()", "sc.nextInt", "sc", "int sum = 0;", "sum", "0", "for(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\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 = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "{\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "for(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}", "int j = 1;", "int j = 1;", "j", "1", "j <= n", "j", "n", "j++", "j++", "j", "{\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}", "{\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}", "for(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}", "int k = 1;", "int k = 1;", "k", "1", "k <= n", "k", "n", "k++", "k++", "k", "{\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}", "{\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}", "sum += gcd(i,gcd(j, k))", "sum", "gcd(i,gcd(j, k))", "gcd", "i", "gcd(j, k)", "gcd", "j", "k", "System.out.println(sum)", "System.out.println", "System.out", "System", "System.out", "sum", "String[] args", "args", "static int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}", "gcd", "{\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}", "int temp;", "temp", "while((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}", "(temp = a%b)!=0", "(temp = a%b)", "temp", "a%b", "a", "b", "0", "{\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}", "a = b", "a", "b", "b = temp", "b", "temp", "return b;", "b", "int a", "a", "int b", "b", "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\tint n = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\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\tint n = sc.nextInt();\n\n\t\tint sum = 0;\n\t\tfor(int i = 1; i <= n; i++) {\n\t\t\tfor(int j = 1; j <= n; j++) {\n\t\t\t\tfor(int k = 1; k <= n; k++) {\n\t\t\t\t\tsum += gcd(i,gcd(j, k));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sum);\n\n\t}\n\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n}", "Main" ]
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int sum = 0; for(int i = 1; i <= n; i++) { for(int j = 1; j <= n; j++) { for(int k = 1; k <= n; k++) { sum += gcd(i,gcd(j, k)); } } } System.out.println(sum); } static int gcd (int a, int b) { int temp; while((temp = a%b)!=0) { a = b; b = temp; } return b; } }