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, 17, 38, 30, 4, 18, 13, 30, 0, 13, 20, 42, 4, 18, 13, 30, 41, 13, 39, 4, 18, 13, 4, 18, 13, 4, 18, 13, 13, 4, 18, 13, 4, 18, 18, 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 ], ...
[ "import java.math.BigInteger;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Scanner;\n\nclass Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = null;\n\t\ttry {\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextB...
import java.math.BigInteger; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner s = null; try { s = new Scanner(System.in); while (s.hasNextInt()) { BigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() }...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 17, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 177, 11 ], [ 177, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) {\n \n new Main().run();\n }\n\n public void run() {\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { new Main().run(); } public void run() { try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String line; ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 134, 11 ], [ 134, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twh...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException{ InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String str; while((str=br.readLine())...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 13, 0, 13, 4, 18, 13, 0, 13, 13, 42, 2, 2, 13, 13, 17, 30, 14,...
[ [ 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 ], [ 8, 14 ], ...
[ "import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0)...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); long a1, b1, r1, r2, temp, a2, b2; while(scan.hasNext()){ a1 = scan.nextInt(); a2 = a1; b1 = scan.nextInt(); b2 = b1; while(a2 % b2 != 0){ if(a2 < b2){ temp = a2; ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 132, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n\npublic class Main\n{\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t * @throws NumberFormatException \n\t */\n\tpublic static void main(String[] args) throws NumberFormat...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { /** * @param args * @throws IOException * @throws NumberFormatException */ public static void main(String[] args) throws NumberFormatException, IOException {...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 0, 13, 13, 0, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 114, 5 ], [ 114, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;...
import java.util.Scanner; public class Main{ public static void main(String args[]){ Scanner sc = new Scanner(System.in); long num1,num2,gc1,gc2,lc1,lc2; while(sc.hasNextInt()){ num1 = sc.nextInt(); num2 = sc.nextInt(); if(num1 >= num2){ gc1 = num1;gc2 = num2; lc1 = num1;lc2 = num2; }else{...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 4, 13, 13, 13, 17, 4, 18, 18, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 113, 5 ], [ 113, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\t/**\n\t * ???????????\\????????£?????´??° a, b ?????\\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨\n\t * b ???????°???¬?????°??? 20 ???????¶??????????????????...
import java.util.Scanner; public class Main { /** * ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨ * b ???????°???¬?????°??? 20 ???????¶??????????????????¨???????????? ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13, 30, 41, 13, 0,...
[ [ 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 ], [ 8, 14 ], ...
[ "import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long a, b, c, GCD, LCM, a_base, b_base; while (sc.hasNext()) { a = sc.nextLong(); b = sc.nextLong(); a_base = a; b_base = b; if (a < b) { long sub; sub = a; a = b; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 20, 28, 13, 13, 30, 30, 41, 13, 18, 13, 13, 41, 13, 18, 13, 13, 42, 2, 17, 13, 30, ...
[ [ 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 ], [...
[ "\nimport java.util.Scanner;\n\nclass Main{\n\tstatic class Pair{\n\t\tpublic long x, y;\n\t\tPair( long xx, long yy ){ x=xx; y=yy; }\n\t}\n\tpublic static void main(String[]av){\n\t\tScanner sc = new Scanner( System.in );\n\t\tjava.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();\n\t\twhile( sc.hasNext...
import java.util.Scanner; class Main{ static class Pair{ public long x, y; Pair( long xx, long yy ){ x=xx; y=yy; } } public static void main(String[]av){ Scanner sc = new Scanner( System.in ); java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>(); while( sc.hasNextInt() ) { long x = sc.next...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 2, 2, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\n\npublic class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); while(input.hasNextInt()){ int a = input.nextInt(); int b = input.nextInt(); int gcd_num = gcd(a,b); System.out.println(gcd_num+" "+(a/gcd_num)*b); }...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 42, 2, 2, 13, 17, 40, 4, 18, 17, 13, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 135, 5 ], [ 135, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); try { String inputData = scan.nextLine(); while (inputData != null && !"".equals(inputData)) { String[] inputDataSP = inputData.spli...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 13, 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 ], [ 13, 14 ], ...
[ "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\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tprivate static long gcd(int a,i...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int a=sc.nextInt(); int b=sc.nextInt(); System.out.println(gcd(a,b)+" "+lcm(a,b)); } } private static long gcd(int a,int b){ int max=Math.max(a, b); int...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 41, 13, 13, 41, 13, 13, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 84, 5 ], [ 84, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner s = new Scanner(System.in); int max,min; int a,b; int counter = 0; while(s.hasNext()){ a = s.nextInt(); b = s.nextInt(); int x = a; int y ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 3, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 4, 18, 13, 17, 13, 41, 13, 4, 18, 13, 4, 18, 13, 2, 13, 17, 4, 18, 18, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 107, 5 ], [ 107, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.*;\npublic class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.val...
import java.io.*; public class Main { public static void main(String args[]) throws IOException { BufferedReader r = new BufferedReader(new InputStreamReader(System.in)); while(true){ String s = r.readLine(); if(s == null) break; int i = s.indexOf(" "); long a = Long.valueOf(s.substring(0, i)); long...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 20, 41, 13, 20, 4, 18, 18, 13, 13, 2, 2, 4, 18, 13, 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 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString st;\n\n\t\twhi...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String st; while ((st = br.readLine()) ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 13, 41, 13, 4, 18, 13, 13, 13, 41, 13, 17, 41, 13, 17, 11, 1, 17, 30, 30, 0, 13, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n...
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner scan = new Scanner(System.in); while(scan.hasNext()){ long a = scan.nextLong(); long b = scan.nextLong(); long max = Math.max(a, b); long min = Math.min(a, b); long yakusu = 0; long cal = 0; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 13, 41, 13, 17, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 42, ...
[ [ 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 ], [...
[ "import java.util.*;\n\nclass Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n String out = \"\";\n while (scanner.hasNext()) {\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gc...
import java.util.*; class Main { public static void main (String[] args) { Scanner scanner = new Scanner(System.in); String out = ""; while (scanner.hasNext()) { long m = scanner.nextLong(); long n = scanner.nextLong(); long orgm = m; long orgn = n; long gcd = 0; if (n...
[ 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, 41, 13, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 0, 13, 4,...
[ [ 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 ], ...
[ "//package com.daimens.algorithm.june;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n/**\n * \n * @author DemonSong\n * \n * 5.GCD and LCM\n * \n * GCD and LCM Time Limit : 1 sec, M...
//package com.daimens.algorithm.june; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.StringTokenizer; /** * * @author DemonSong * * 5.GCD and LCM * * GCD and LCM Time Limit : 1 sec, Memory Limit : 65536...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 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 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\npublic class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseI...
import java.util.Scanner; public class Main { public static void main (String[] args) { Scanner scan = new Scanner(System.in); long a, b, lcm, gcd; String[] input; while (scan.hasNext()){ input = scan.nextLine().split(" "); a = Integer.parseInt(input[0]); b = Integer.parseInt(input[1]); gcd ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 12, 13, 30, 14, 2, 13, 13, 30, ...
[ [ 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 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tprivate Main() {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tpublic long gcd(long a, long b) {\n\t\tif(...
import java.util.Scanner; public class Main { private Main() { Scanner in = new Scanner(System.in); long a,b; while(in.hasNext()){ a = in.nextInt(); b = in.nextInt(); System.out.println(gcd(a,b)+" "+lcm(a,b)); } } public long gcd(long a, long b) { if(a==b){ return a; } else if(a>b) { re...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 20, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 4, 18, 13, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 4, 18, 13, 18, ...
[ [ 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 ], [ 127, 14 ], ...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException { String str; BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in)); ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 13, 0, 13, 13, 14, 2, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 104, 11 ], [ 104, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.*;\nimport java.lang.*;\nimport java.math.*;\n\npublic class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();...
import java.util.*; import java.lang.*; import java.math.*; public class Main { Scanner sc = new Scanner(System.in); void run() { long x,y,z; long first,second; long tmp; while (sc.hasNext()) { first = sc.nextLong(); second = sc.nextLong(); x = first; y = second; if (x<y...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 18, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 4, 18, 13, 17, 1...
[ [ 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 ],...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class Main { public static void main(String[] arg) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String s; int gcd, lcm; while((s=br.readLine())!=null) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 14, 2, 13, 13, 30, 11, 1, 30, 30, 14, 2, 2, 13, 13, 17, 30, 3, 0, 13, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 203, 5 ], [ 203, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner (System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner (System.in); while(sc.hasNext()){ long a = sc.nextLong(); long a1 = a; long b = sc.nextLong(); long b1 = b; long i; if(a > b){ for(;;){ if(a1 % b == 0){ break; } a1 ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 17, 13, 2, 2, 13, 13, 13, 23, 13, 12, 13, 30, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 72, 5 ], [ 72, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.util.Scanner;\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/g...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); Main me = new Main(); while(in.hasNext()){ long a = in.nextInt(),b = in.nextInt(); long gcd = me.GCD(a,b); System.out.printf("%d %d\n",gcd,a*b/gcd); } } private long GCD(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 41, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 23, 13, 12, 13, 30,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNextLong()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }\n }\n publi...
import java.util.Scanner; class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNextLong()){ long a=sc.nextLong(); long b=sc.nextLong(); long c=GCD(a,b); long d=a*b/c; System.out.println(c+" "+d); } } public static long GCD(lo...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 41, 13, 41, 13, 41, 13, 14, 2, 13, 13, 30, 0, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? Scanner scan = new Scanner(System.in); while(scan.hasNext()) { //??\???1 String num1 = scan.next(); long int1 = Long.parseLong(num1); //??\???...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 42, 2, 0, 13, 2, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 108, 5 ], [ 108, 6 ], [ 6, 7 ], [ 6, 8 ], [ 108, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ...
[ "import java.util.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\t//最大公約数gcdを求める\n\tstatic int...
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { while (sc.hasNext()) { int a = sc.nextInt(); int b = sc.nextInt(); System.out.println(gcd(a,b)+" "+lcm(a,b)); } } //最大公約数gcdを求める static int gcd (int a, int b) { int temp; w...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, ...
[ [ 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 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.cl...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long a, b; while(sc.hasNext()) { a = sc.nextLong(); b = sc.nextLong(); System.out.println(LCM(a, b) + " " + GCD(a, b)); } sc.close(); } static long GCD(long a, long b)...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 13, 0, 13, 13, 42, 2, 13, 13, 30, 14...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 101, 8 ], [ 101, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.util.*;\nimport java.math.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt(...
import java.util.*; import java.math.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int x; int y; int a = 0; int b = 0; int c = 0; while(sc.hasNext()){ x = sc.nextInt(); y = sc...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 2, 2, 13, 13, 13, 23, 13, 12, 13, 30, 42, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 75, 5 ], [ 75, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "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\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()) { long a = sc.nextInt(); long b = sc.nextInt(); long gcd = gcd(a,b); System.out.println(gcd + " " + (a*b/gcd)); } } public static long gcd(long a,long...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 20, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 2, 13, 13, 42, 17, 30, 41, 13, 2, 13, 13, 14, 2, 13, 17, 30, 3, 0, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 73, 5 ], [ 73, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nex...
import java.util.Scanner; public class Main { public static void main(String[] args) { double firstinput; double secondinput; double product; Scanner scanner = new Scanner(System.in); while(scanner.hasNext()){ firstinput = scanner.nextDouble(); secondinput = scanner.nextDouble(); product = firstinp...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 20, 41, 13, 20, 4, 18, 18, 13, 13, 2, 2, 4, 18, 13, 13, 17, 2, 2, 4, 18, 13, 4, 18, 13, 4, 18, 4, 18, 13, 13, 23, 13, 10, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 55, 8 ], [ 55, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.math.BigInteger;\nimport java.util.Scanner;\n\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\...
import java.math.BigInteger; import java.util.Scanner; public class Main { /** * @param args */ public static void main(String[] args) { // TODO 自動生成されたメソッド・スタブ Scanner scan = new Scanner(System.in); while(scan.hasNext()){ BigInteger a = new BigInteger(scan.next()); BigInteger b = new BigInteger(s...
[ 7, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 41, 13, 17, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 41, 13, ...
[ [ 0, 1 ], [ 109, 2 ], [ 109, 3 ], [ 3, 4 ], [ 3, 5 ], [ 5, 6 ], [ 6, 7 ], [ 6, 8 ], [ 5, 9 ], [ 9, 10 ], [ 9, 11 ], [ 5, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.ou...
public class Main { public static void main(String[] args) { // TODO ????????????????????????????????????????????? java.util.Scanner sc = new java.util.Scanner(System.in); int a = 1; int b = 1; while ( sc.hasNext() ) { a = sc.nextInt(); b = sc.nextInt(); System.out.println( gcd(a, b) + " " + lcm(a,...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 41, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 23, 13, 12, 13, 30, 11...
[ [ 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 ], [ 13, 14 ],...
[ "import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); while(s.hasNext()) { int a = s.nextInt(); int b = s.nextInt(); int g = lcm(a,b); int l = gcd(a,b); System.out.println(l + " " + g); } } static int lcm(int a, int b) ...
[ 7, 15, 13, 17, 6, 13, 41, 13, 17, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 138, 5 ], [ 138, 6 ], [ 6, 7 ], [ 6, 8 ], [ 138, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.Scanner;\n\npublic class Main{\nstatic int LONGEST=2000000000;\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.next...
import java.util.Scanner; public class Main{ static int LONGEST=2000000000; /** * @param args */ public static void main(String[] args) { Scanner sc= new Scanner(System.in); //System.out.print("Input -> "); while(sc.hasNext()){ long a =sc.nextLong(); long b =sc.nextInt(); //System.out.println(...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 17, 41, 13, 20, 17, 17, 0, 18, 18, 13, 17, 17, 4, 18, 13, 0, 18, 18, 13, 17, 17, 4, 18, 13, 0, 18, 18, 13, 17, 17, 18, 18, 13, 17, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0]...
import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); while(scan.hasNext()){ long i = 1; long[][] gcdlcm = new long[2][2]; gcdlcm[0][0] = scan.nextLong(); gcdlcm[0][1] = scan.nextLong(); gcdlcm[1][0] = gcdlcm[0][0]; gcdlcm[1][1] = ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 4, 18, 13, 17, 41, 13, 20, 18, 13, 13, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 180, 11 ], [ 180, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main\n{\n public static void main(String[] args) throws NumberFormatException, IOException\n {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); while (input.ready()) { ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 20, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 13, 4, 18, 18, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 93, 5 ], [ 93, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 8, 11 ], [ 11, 12 ], [ 8, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t...
import java.util.Scanner; public class Main { public static void main(String[] args) { long n, m, k; Scanner in = new Scanner(System.in); while (in.hasNext()) { n = in.nextInt(); m = in.nextInt(); k=Math.max(n, m); m=Math.min(n, m); n=k; System.out.println(gcd(n, m) + " " + (n * ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 38, 5, 13, 30, 4, 18, 13, 17, 30, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 17, 0...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 134, 11 ], [ 134, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n/**\n * Created by Reopard on 2014/05/06.\n */\npublic class Main {\n public static void main(String args[]) {\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader r...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * Created by Reopard on 2014/05/06. */ public class Main { public static void main(String args[]) { long a, b, gcd, lcm; String line; String number[]; BufferedReader reader = new Buffe...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 14, 2, 18, 13, 13, 17, 30, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "/* package whatever; // 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. */\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tBufferedReader br = new Buffe...
/* package whatever; // 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. */ class Main { public static void main (String[] args) throws java.lang.Exception { BufferedReader br = new BufferedReader( new InputSt...
[ 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, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 4, 18, 13, 13, 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 ], ...
[ "\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.Reader;\nimport java.util.ArrayList;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\n/**\n * @author Lin\n * @version 1.0\n * @date 2020/8/5 15:43\n */\npublic class Main\n{\n\n\tpubl...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.util.ArrayList; import java.util.Scanner; import java.util.StringTokenizer; /** * @author Lin * @version 1.0 * @date 2020/8/5 15:43 */ public class Main { public static void main(Stri...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 0, 13, 4, 18, 13, 4, 18, 13, 2, ...
[ [ 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 ],...
[ "/*\n * @author Raj Sharma\n * Date 20160306\n */\n\nimport 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)...
/* * @author Raj Sharma * Date 20160306 */ 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)); Strin...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 13, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 42, 2, 13, 17, 30, 41, 13, 2...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "\nimport java.util.*;\npublic class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t...
import java.util.*; public class Main { public void doIt(){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int a = sc.nextInt(); int b = sc.nextInt(); int x = a; int y = b; if(x < y){ int temp = x; x = y; y = temp; } //ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ while(y != 0){ int t...
[ 7, 15, 13, 17, 15, 13, 17, 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, 29, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 20, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\nclass Main {\n\n static long gcd(long a, long b) {\n return b == 0 ? a : gcd(b, a%b);\n }\n\n static long lcm(long t, long ab) {\n return ab / t;\n }\n\n public static void main(String[] args) throws IOExce...
import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; class Main { static long gcd(long a, long b) { return b == 0 ? a : gcd(b, a%b); } static long lcm(long t, long ab) { return ab / t; } public static void main(String[] args) throws IOException { long a,...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 17, 30, 29, 4, 13, 13, 2, 13, 13, 30, 29, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 4, 13, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 3...
[ [ 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 ], ...
[ "import java.util.Scanner;\n\nclass Main {\n public static int calcGCD(int a, int b) {\n if(b > 0) {\n return calcGCD(b, a % b); \n } \n else {\n return a;\n }\n }\n \n public static int calcLCM(int a, int b) {\n return ((a / calcGCD(a, b)) * b);\n }\n\n public static void main(Stri...
import java.util.Scanner; class Main { public static int calcGCD(int a, int b) { if(b > 0) { return calcGCD(b, a % b); } else { return a; } } public static int calcLCM(int a, int b) { return ((a / calcGCD(a, b)) * b); } public static void main(String[] args) { Scan...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 17, 30, 41, 13, 20, 41, 13, 4, 18, 13, 42, 2, 13, 17, 30, 41, 13, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 110, 5 ], [ 110, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 13, 14 ...
[ "import java.io.*;\n//import java.math.BigDecimal;\n//import java.lang.reflect.Array;\n//import java.util.Arrays;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\t...
import java.io.*; //import java.math.BigDecimal; //import java.lang.reflect.Array; //import java.util.Arrays; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { String line = br.readLi...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 38, 5, 13, 30, 4, 18, 13, 30, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18...
[ [ 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 ],...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((inpu...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String input; try { while((input = reader.read...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 12, 13, 30, 41, 13, 20, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 41, 13, 4, 13, 13, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 131, 5 ], [ 131, 6 ], [ 6, 7 ], [ 6, 8 ], [ 131, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ...
[ "import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\...
import java.util.*; public class Main{ private static final Scanner scan = new Scanner(System.in); public static void main(String[] args){ List<Integer> listG = new ArrayList<Integer>(); List<Integer> listL = new ArrayList<Integer>(); while(scan.hasNext()){ int a = scan.nextInt(); int b = scan.nextInt()...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 20, 17, 0, 18, 13, 17, 4, 18, 13, 0, 18, 13, 17, 4, 18, 13, 41, 13, 41, 13, 17, 42, 2, 13, 17, 30, 0, 13, 17, 11, 1, 41, 13, 17, 2, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 154, 5 ], [ 154, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int[] num = new int[2]; num[0]=sc.nextInt(); num[1]=sc.nextInt(); int cd0; int cd = 1; do{ cd0 = 1; for(int j = 2; j<= getMin(num[0], num...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 29, 8, 2, 13, 17, 13, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 13, 4, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 104, 8 ], [ 104, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\n\npublic class Main {\n\t\n\t\n\tlong gcd(long a, long b){\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}\n\t\n\tlong lcm(long a, long b){\n\t\treturn a*b / gcd(a, b);\n\t}\n\t\n\tvoid io(){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\t...
import java.util.Arrays; import java.util.Scanner; public class Main { long gcd(long a, long b){ return a==0 ? b : gcd(b%a, a); } long lcm(long a, long b){ return a*b / gcd(a, b); } void io(){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ final long a = sc.nextInt(); final long b ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 20, 17, 11, 1, 41, 13, 17, 2, 13, 17, 1, 40, 13, 30, 0, 18, 13, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 119, 8 ], [ 119, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.*;\nimport java.util.*;\npublic class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[...
import java.io.*; import java.util.*; public class Main{ public static void main(String[] args)throws IOException{ BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); String s; while((s=reader.readLine())!=null){ String[] t=s.split(" "); int[] in=new int[2]; for(int i=0;i<2;i++) ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 17, 4, 13, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 29, 4, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 80, 5 ], [ 80, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}\n...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ long m = sc.nextLong(); long n = sc.nextLong(); System.out.printf("%d %d\n",gcd(m, n), lcm(m, n)); } } public static long gcd(long a, long b){ ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 13, 41, 13, 13, 41, 13, 13, 41, 13, 13, 42, 2, 13, 13, 30, 14, 2, 13, 13, 30, 0, 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 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\n public class Main{\n\t public static void main(String[] args){\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int m...
import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner s = new Scanner(System.in); while(s.hasNextInt()){ int a = s.nextInt(); int b = s.nextInt(); int c = a; int d = b; int max = a; int mox = b; int mix = max; while(max != mox){ if(mox ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, ...
[ [ 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 ], ...
[ "import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.Collections;\n\nclass Main {\n public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n ...
import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Scanner; import java.util.Arrays; import java.util.Collections; class Main { public static void main (String[] args) throws IOException { Scanner sc = new Scanner(System.in); StringBuilder ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 20, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 30, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 4, 13, 13, 13, 4, 18, 13, 4...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 184, 11 ], [ 184, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.util.ArrayList;\nimport java.util.NoSuchElementException;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tprivate static ArrayList<Long> gcd = new ArrayList<Long>();\n\tprivate static ArrayList<Long> lcm = new ArrayList<Long>();\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc...
import java.util.ArrayList; import java.util.NoSuchElementException; import java.util.Scanner; public class Main { private static ArrayList<Long> gcd = new ArrayList<Long>(); private static ArrayList<Long> lcm = new ArrayList<Long>(); public static void main(String[] args) { Scanner sc = new Scanner(System.i...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 18, 4, 18, 13, 17, 17, 41, 13, 4, 18, 13, 18, 4, 18, 13, 17, 17, 4, 18, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 105, 11 ], [ 105, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = r...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String readStr; while ((readStr = reader.readLine()...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 20, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 0, 13 ], [ 13, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new Inp...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.BigInteger; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(Sy...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 20, 17, 41, 13, 42, 4, 18, 13, 30, 11, 1, 0, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 0, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], [ ...
[ "import java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i;\n\t\tint GCD,LCM;\n\t\tdouble[] num = new double[2];\n\t\tdouble[] tmpNum = new double[2];\n\t\tdouble tmp;\n\t\t\n\t\twhile(scan.hasNextInt()){\n\t\t\tfor(i=0;i<2;i++){\n\t\t...
import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner scan = new Scanner(System.in); int i; int GCD,LCM; double[] num = new double[2]; double[] tmpNum = new double[2]; double tmp; while(scan.hasNextInt()){ for(i=0;i<2;i++){ num[i] = scan.nextInt(); tmpNum[i]...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 20, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 18, 13, 17, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 0, 18, 13, 17, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\nclass Main{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tlong num[] = new long[2];\n\t\twhile((st...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String args[]) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String str; long num[] = new long[2]; while((str = in.readLine()) != nu...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 13, 41, 13, 13, 41, 13, 13, 42, 2, 13, 17, 30, 0, 13, 13, 0, 13, 2, 13, 13, 0, 13, 13, 4, 18, 18,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 69, 5 ], [ 69, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n \npublic class Main\n{\n public static void main(String[] args)\n {\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); while(cin.hasNext()) { long a = cin.nextInt(); long b = cin.nextInt(); long m = a; long n = b; long p = m; while(n != 0){p = n; n = m%n; m = p;} System.out.pri...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 17, 41, 13, 41, 13, 14, 2, 13, 13, 30, 0, 13, 13, 0, 13, 13, 30, 0, 13, 13, 0, 13, 13, 41, 13, 17, 42, 2, 13, 17, 30, 14, 2, 2, 2, 13, 13, 13, 17, 30, 0, 13, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 173, 5 ], [ 173, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.io.*;\n\npublic class Main{\n\t/*\n\tpublic static long findGcd(long f1, long f2){\n\t\tlong gcd = 1;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tfor(long i=1; i<=(long)(Math.sqrt(min)+1); i++){\n\t\t\tif(min % i == 0){\n\t\t\t\tlong tmp = min / i;\n\t\...
import java.io.*; public class Main{ /* public static long findGcd(long f1, long f2){ long gcd = 1; long max, min; if(f1 > f2){max = f1; min = f2;} else{max = f2; min = f1;} for(long i=1; i<=(long)(Math.sqrt(min)+1); i++){ if(min % i == 0){ long tmp = min / i; if((max % tmp) == 0){ gcd = tm...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 41, 13, 4, 13, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 23, 13, 12, 13, 30...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ], [...
[ "import java.util.Scanner;\nclass Main {\n\n public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n\n while (scanner.hasNext()) {\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n ...
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int A = scanner.nextInt(); int B = scanner.nextInt(); int max = getMAX(A, B); int min = getMIN(A...
[ 7, 15, 13, 17, 6, 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, 2, 13, 13, 0, 13, 13, 0, 13, 13, 29, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 95, 5 ], [ 95, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static long gcd(long a, long b) {\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n\t\n\tpublic static void main(String[] args) {\...
import java.util.Scanner; public class Main { public static long gcd(long a, long b) { if(a < b) { long tmp = a; a = b; b = tmp; } while(b != 0) { long r = a % b; a = b; b = r; } return a; } public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasN...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 41, 13, 2, 17, 17, 41, 13, 17, 12, 13, 30, 0, 13, 20, 11, 1, 30, 30, 14, 40, 4, 18, 13, 3, 41, 13, 4, 18, 13, 41, 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 ], ...
[ "import java.util.*;\nimport java.lang.*;\nimport java.math.*;\nimport java.io.*;\n\nimport static java.lang.Math.*;\nimport static java.util.Arrays.*;\n\npublic class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;...
import java.util.*; import java.lang.*; import java.math.*; import java.io.*; import static java.lang.Math.*; import static java.util.Arrays.*; public class Main{ Scanner sc; static final int INF=1<<28; static final double EPS=1e-9; void run(){ sc=new Scanner(System.in); for(;;){ if(!sc.hasNext()) b...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 14, 2, 4, 18, 13, 17, 30, 3, 4, 18, 13, 13, 41, 13, 20, 4, 18, 13, 17, 41...
[ [ 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 ], [ 192, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main {\n\tpublic static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = n...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Main { public static void main(String[] a) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); ArrayList<String> al = new ArrayList<Strin...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 4, 18, 13, 23, 13, 12, 13, 30, 14, 2, 13, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 102, 5 ], [ 102, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 13, 14 ],...
[ "import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic int gcd(long ...
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNextInt()){ int a=sc.nextInt(); int b=sc.nextInt(); System.out.println(gcd(a,b)+" "+lcm(a,b)); } sc.close(); } static int gcd(long a,long b){ //最大公約数 if(a<b) return gcd(...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 4, 18, 18, 13, 13, 2, 2, 4, 13, 13, 13, 17, 4, 13, 13, 13, 23, 13, 12, 13, 30, ...
[ [ 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 ], ...
[ "import java.io.*;\nimport java.util.*;\nclass Main{\n public static void main(String[] args)throws IOException{\n\tScanner s = new Scanner(System.in);\n\tlong a,b;\n\t\n\twhile(s.hasNext()){\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.ou...
import java.io.*; import java.util.*; class Main{ public static void main(String[] args)throws IOException{ Scanner s = new Scanner(System.in); long a,b; while(s.hasNext()){ a=s.nextInt(); b=s.nextInt(); System.out.println(getGCD(a,b)+" "+getLCM(a,b)); /* System.out.println(a*b);*/ } }...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 0, 13, 13, 0, 13, 13, 42, 2, 13, 17, 30, 0, 13, 2, 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 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\tw...
import java.util.Scanner; public class Main { public static void main(String[] args) throws java.io.IOException { Scanner scan = new Scanner(System.in); long a,b,z,A,B; while(scan.hasNext()){ a = scan.nextInt(); b = scan.nextInt(); z = 1; A = a; B = b; while(z != 0){ z = a % b; a = b; ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 0, 13, 4, 13, 13, 13, 0, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 23, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 76, 5 ], [ 76, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\n\t\tint c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}\n\tstatic i...
import java.util.*; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int c,d; while(sc.hasNext()){ int a=sc.nextInt(); int b=sc.nextInt(); c=s(a,b); d=a/c*b; System.out.println(c+" "+d); } } static int s(int a,int b){ return b==0?a:s(b, a%b); ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 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, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 29, 2, 2, 13, 13, 4, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 175, 8 ], [ 175, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.io.*;\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static long calculateGCD(long x, long y){\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}\n\t\n\tpublic static...
import java.io.*; import java.util.Scanner; public class Main{ public static long calculateGCD(long x, long y){ if( y > x ){ long temp = x; x = y; y = temp; } if( y == 0 ){ return x; } else { return calculateGCD(x-y, y); } } public static long calculateLCM(long x, long y){ return x*y/ca...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18, 13, 13, 41, 13, 4, 18, 4, 18, 13, 13, 13, 4, 18, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 64, 8 ], [ 64, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.math.BigInteger;\nimport java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g ...
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s=new Scanner(System.in); while(s.hasNext()){ BigInteger a = BigInteger.valueOf(s.nextInt()); BigInteger b = BigInteger.valueOf(s.nextInt()); BigInteger g = a.gcd(b); BigInteger l...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 14, 2, 13, 17, 30, 3, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 126, 11 ], [ 126, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n ...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); while(true){ String tmp = b...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 38, 5, 13, 30, 30, 42, 17, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 41, 13, 2, 2, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 23, 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 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] a){\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\...
import java.util.Scanner; public class Main { public static void main(String[] a){ Scanner scn = new Scanner(System.in); try{ while(true){ long alpha = scn.nextInt(); long beta = scn.nextInt(); long gcd = gcd(alpha,beta); long lcm = alpha /gcd * beta; System.out.println(gcd + " " + lcm); ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 17, 30, 41, 13, 4, 18, 13, 14, 2, 2, 13, 17, 2, 4, 18, 13, 17, 30, 3, 4, 13, 13, 23, 13, 12, 13, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 146, 11 ], [ 146, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine...
import java.io.*; import java.math.BigInteger; import java.util.*; public class Main { public static void main(String[] argv) throws IOException { //* BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); while(true) { String s = in.readLine(); ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 2, 13, 13, 17, 30, 29, 13, 29, 4, 13, 2, 13, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 2, 13, 13...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 79, 5 ], [ 79, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 11, 12 ], [ 11, 13 ], [ 10, 14 ],...
[ "import java.util.Scanner;\npublic class Main {\n public static long gcd (long a, long b) {\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }\n public static void main (String [] args) {\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLo...
import java.util.Scanner; public class Main { public static long gcd (long a, long b) { if (b%a == 0) { return a; } else return gcd(b%a, a); } public static void main (String [] args) { Scanner s = new Scanner (System.in); while (s.hasNextLong()) { long a = s.nextLong(); long...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 4, 13, 4, 18, 13, 13, 13, 4, 18, 13, 13, 13, 4, 18, 18, 13, 13, 2, 2, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 85, 5 ], [ 85, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out...
import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int a, b; int gcd; while (sc.hasNext()) { a = sc.nextInt(); b = sc.nextInt(); gcd = gcd(Math.max(a, b), Math.min(a, b)); System.out.println(gcd + " " + a / gcd * b); } ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 11, 1, 0, 13, 17, 2, 13, 4, 18, 13, 13, 13, 1, 40, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 92, 5 ], [ 92, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 8, 14 ], ...
[ "import java.util.*;\npublic class Main{\n public static void main(String [] args){\n Scanner sc = new Scanner(System.in);\n int a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)...
import java.util.*; public class Main{ public static void main(String [] args){ Scanner sc = new Scanner(System.in); int a,b,i,c,d; while(sc.hasNext()){ a = sc.nextInt(); b = sc.nextInt(); d = 1; for(i = 1;i <= Math.min(a,b);i++){ if(a % i == 0 && b % i == 0)d = i; } ...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 18, 13, 13, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 20, 17, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 17, 11, 1, 41, 13, 17, 2, 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 ], [ 12, 13 ], [ 13, 14 ], ...
[ "import java.io.*;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \")...
import java.io.*; class Main { public static void main(String args[]) { try { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String t[], s; int a[] = new int[2]; int c; while((s = reader.readLine()) != null) { t = s.split(" "); for(int i = 0;i < a.length;i++) {...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 17, 41, 13, 17, 41, 13, 17, 12, 13, 30, 41, 13, 17, 41, 13, 20, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 13, 13, 4, 18, 13, 13, 41, 13, 4, ...
[ [ 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 ], [ 200, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n\n\t/** ??\\??????????????°????????° */\n\tprivate static final int NUMBER_OF_INPUT = 2;\n\n\t/** ??\\??????????????°????????????????????????????°???? */\n\tprivate stati...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { /** ??\??????????????°????????° */ private static final int NUMBER_OF_INPUT = 2; /** ??\??????????????°????????????????????????????°???? */ private static final int INDEX_LITT...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 14, 2, 13, 13, 29, 13, 14, 2, 13, 13, 30, 41, 13, 13, 0, 13, 13, 0, 13, 13, 29, 4, 13, 13, 2, 13, 13, 23, 13, 23, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 87, 5 ], [ 87, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 10, 11 ], [ 10, 12 ], [ 9, 13 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static int gcd (int a, int b) {\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.i...
import java.util.Scanner; public class Main { public static int gcd (int a, int b) { if (a == b) return a; if (a < b) { int temp = a; a = b; b = temp; } return gcd(b, a - b); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { int a = sc...
[ 7, 15, 13, 17, 6, 13, 41, 13, 12, 13, 30, 4, 18, 20, 23, 13, 12, 13, 30, 0, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 42, 4, 18, 13, 30, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 0, 13, 17, 0, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 151, 5 ], [ 151, 6 ], [ 6, 7 ], [ 151, 8 ], [ 8, 9 ], [ 8, 10 ], [ 10, 11 ], [ 11, 12 ], [ 12, 13 ], [ 8, 14 ...
[ "import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String args[]){\n\t\tnew Main().mainrun();\n\t}\n\n\tprivate Scanner scan;\n\n\tprivate void mainrun() {\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb =...
import java.util.Scanner; public class Main{ public static void main(String args[]){ new Main().mainrun(); } private Scanner scan; private void mainrun() { scan = new Scanner(System.in); long a,b,ans,n,ax,bx; while(scan.hasNext()) { a = scan.nextInt(); b = scan.nextInt(); //最大公約数 ans = 1...
[ 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, 42, 17, 30, 38, 5, 13, 30, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 41, 13, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 137, 8 ], [ 137, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic int gcd(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\...
import java.util.Arrays; import java.util.Scanner; public class Main { static int gcd(int a, int b){ if(b == 0) return a; return gcd(b,a % b); } public static void main(String[] args){ Scanner in = new Scanner(System.in); while(true){ try{ int a = in.nextInt(); int b = in.nextInt(); int mi...
[ 7, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 12, 13, 30, 42, 4, 13, 30, 4, 13, 4, 13, 4, 18, 18, 13, 13, 2, 2, 13, 17, 13, 23, 13, 12, 13, 30, 14, 40, 4, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 122, 5 ], [ 122, 6 ], [ 6, 7 ], [ 6, 8 ], [ 122, 9 ], [ 9, 10 ], [ 122, 11 ], [ 11, 12 ], [ 122, 13 ], [ 13, 1...
[ "import java.util.Scanner;\n\n\npublic class Main{\n\t\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic long a, b, tmp, max, min, mod, x, y;\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\...
import java.util.Scanner; public class Main{ static Scanner sc = new Scanner(System.in); static long a, b, tmp, max, min, mod, x, y; public static void main(String[] args) { while(read()){ solve_max(); solve_min(); System.out.println(max + " " + min); } } public static boolean read(){ if(!...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 17, 41, 13, 17, 41, 13, 41, 13, 42, 4, 18, 13, 30, 11, 1, 41, 13, 17, 2, 13, 18, 13, 13, 1, 40, 13, 30, 30, 0, 18, 13, 13, 4, 18, 13, 14, 2, 18, 13, 1...
[ [ 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 ],...
[ "import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();...
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int[] x = new int[2]; int gcd = 1; int lcm; int temp; while (scan.hasNext()) { for (int i = 0; i < x.length; i++) { x[i] = scan.nextInt(); } if (x[0] > x[1]) { temp...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 38, 5, 13, 30, 4, 18, 18, 13, 13, 17, 30, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 20, 41, 13, 4, 18, 13, 4, 18, 13, 41, 13, 4, 18...
[ [ 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 ], ...
[ "import java.io.*;\nimport java.util.StringTokenizer;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\tString buf;\n\n\t\ttry {\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStrin...
import java.io.*; import java.util.StringTokenizer; class Main { public static void main(String args[]) { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); String buf; try { while ((buf = br.readLine())!=null) { StringTokenizer st = new StringTokeni...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 41, 13, 41, 13, 17, 41, 13, 17, 41, 13, 20, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 0, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 10, 11 ], [ 10, 12 ], [ 12, 13 ], [ 12, 14 ], ...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n long num1,num2,kouyakusu=0;\n String str=\"\";\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\n w...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; class Main{ public static void main(String[] args) throws IOException{ long num1,num2,kouyakusu=0; String str=""; BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); while((str=buf.rea...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 41, 13, 41, 13, 0, 13, 4, 18, 13, 4, 18, 13, 17, 4, 18, 13, 17, 0, 13, 4, 18, 13, 4, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 142, 11 ], [ 142, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.rea...
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)); String line = ""; while ((line = br.readLine()) != null) { i...
[ 7, 15, 13, 17, 15, 13, 17, 6, 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, 12, 13, 30, 41, 13, 41, 13, 41, 13, 41, 13, 41, 13, 20, 42, ...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 102, 8 ], [ 102, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 12, 14 ]...
[ "import java.io.BufferedInputStream;\nimport java.util.Scanner;\n\npublic class Main {\n\n static int gcd(int a, int b)\n {\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }\n public static void m...
import java.io.BufferedInputStream; import java.util.Scanner; public class Main { static int gcd(int a, int b) { int t = a % b; while(t != 0) { a = b; b = t; t = a % b; } return b; } public static void main(String[] args) ...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 41, 13, 20, 41, 13, 41, 13, 12, 13, 30, 42, 4, 13, 30, 4, 13, 23, 13, 12, 13, 30, 14, 40, 4, 18, 13, 29, 17, 0, 13, 4, 18, 13, 0, 13, 4, 18, 13, 29, 17, 12, 13, 30, 4, 18, 18...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 106, 8 ], [ 106, 9 ], [ 9, 10 ], [ 9, 11 ], [ 106, 12 ], [ 12, 13 ], [ 106, 14 ...
[ "import java.util.*;\nimport java.math.*;\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic BigInteger a, b;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nex...
import java.util.*; import java.math.*; public class Main { static Scanner sc = new Scanner(System.in); static BigInteger a, b; public static void main(String[] args) { while(read()){ solve(); } } static boolean read(){ if(!sc.hasNext()) return false; a = sc.nextBigInteger(); b = sc.nextBigInteger...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 38, 5, 13, 30, 4, 18, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 38, 5, 13, 30, 3, 30, 41, 13, 4, 18, 13, 17, 41, 13, 20, 17, 11, 1,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 271, 8 ], [ 271, 9 ], [ 9, 10 ], [ 9, 11 ], [ 11, 12 ], [ 12, 13 ], [ 13, 14 ]...
[ "import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n//public class Problem0005_GCDandLCM {\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader rea...
import java.io.BufferedReader; import java.io.InputStreamReader; //public class Problem0005_GCDandLCM { public class Main { public static void main(String[] args) { try { // Problem0005_GCDandLCM test = new Problem0005_GCDandLCM(); Main test = new Main(); BufferedReader reader = new BufferedReader(new I...
[ 7, 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, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 4, 18...
[ [ 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 ], ...
[ "import java.util.Scanner;\n\nclass Main{\n\n static double gcd(double a,double b){\n\tif(b==0) return a;\n\telse return gcd(b,a%b);\n }\n \n public static void main(String[] args){\n\tfinal Scanner sc = new Scanner(System.in);\n\twhile(sc.hasNext()){\n\t double a=sc.nextDouble();\n\t double b=sc....
import java.util.Scanner; class Main{ static double gcd(double a,double b){ if(b==0) return a; else return gcd(b,a%b); } public static void main(String[] args){ final Scanner sc = new Scanner(System.in); while(sc.hasNext()){ double a=sc.nextDouble(); double b=sc.nextDouble(); doubl...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 41, 13, 41, 13, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17, 0, 13, 4, 18, 13, 18, 13, 17...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 111, 11 ], [ 111, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = ...
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)); String input; long a, b; while ((input = br.readLine()) != null)...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 17, 41, 13, 17, 41, 13, 8, 2, 13, 13, 13, 13, 42, 2, 13, 13, 30, 11, 1, 0, 13, 17, 2,...
[ [ 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 ], ...
[ "import java.util.*;\nimport java.lang.*;\n\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n \tScanner in = new Scanner(System.in);\n\t\t\n\t\twhile(in.hasNext()) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\...
import java.util.*; import java.lang.*; class Main { public static void main (String[] args) throws java.lang.Exception { Scanner in = new Scanner(System.in); while(in.hasNext()) { int x = in.nextInt(); int y = in.nextInt(); int greatCD = 1; // 最大公約数 int cd = 2; // 公約数 int min = x <...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 4, 18, 18, 13, 13, 17, 4, 13, 13, 13, 4, 13, 13, 13, 23, 13, 12, 13, 30, 14, 2, 13, 17, 29, 13, 41, 13, 2...
[ [ 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 ], [ 13, 14 ], ...
[ "import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scn = new Scanner(System.in); while(scn.hasNext()) { int a = scn.nextInt(); int b = scn.nextInt(); System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b)); } } public static int ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 20, 41, 13, 41, 13, 20, 17, 41, 13, 41, 13, 41, 13, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 0, 13, 4, 18, 13, 17, 0, 13, 4, 18, 13, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 105, 11 ], [ 105, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String argv[]) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String argv[]) throws IOException { InputStreamReader is = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(is); String str; String Array[] = new S...
[ 7, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 4, 13, 13, 20, 18, 13, 13, 23, 13, 12, 13, 30, 42, 4, 18, 13, 30, 41, 13, 4, 18, 13, 41, 13, 4, 18, 13, 41, 13, 4, 13, 13, 13, 41, 13, 2, 2, 13, 13, 13, 4, 18, 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 ], ...
[ "import java.io.PrintStream;\nimport java.util.Scanner;\n\nclass Main {\n\n public static void main(String[] args) {\n doit(args, new Scanner(System.in), System.out);\n }\n\n static void doit(String[] args, Scanner scanner, PrintStream out) {\n while (scanner.hasNext()) {\n long a ...
import java.io.PrintStream; import java.util.Scanner; class Main { public static void main(String[] args) { doit(args, new Scanner(System.in), System.out); } static void doit(String[] args, Scanner scanner, PrintStream out) { while (scanner.hasNext()) { long a = scanner.nextLo...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 38, 5, 13, 30, 4, 18, 13, 5, 13, 30, 4, 18, 13, 30, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13,...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 126, 11 ], [ 126, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine())...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String x = ""; try { while ((x = in.readLine()) != null) { String[] ab ...
[ 7, 15, 13, 17, 15, 13, 17, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 17, 42, 2, 0, 13, 4, 18, 13, 17, 30, 41, 13, 4, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 41, 13, 4, 18, 13, 18, 13, 17, 14, 2, 1...
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 0, 7 ], [ 7, 8 ], [ 7, 9 ], [ 0, 10 ], [ 129, 11 ], [ 129, 12 ], [ 12, 13 ], [ 12, 14 ],...
[ "\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString l...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { // TODO Auto-generated method stub BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line...
[ 7, 15, 13, 17, 6, 13, 12, 13, 30, 41, 13, 20, 41, 13, 4, 18, 4, 18, 13, 11, 1, 41, 13, 2, 18, 13, 13, 17, 2, 13, 17, 1, 40, 13, 30, 30, 4, 18, 18, 13, 13, 18, 13, 13, 4, 18, 18, 13, 13, 17, 23, 13 ]
[ [ 0, 1 ], [ 1, 2 ], [ 1, 3 ], [ 0, 4 ], [ 4, 5 ], [ 4, 6 ], [ 6, 7 ], [ 6, 8 ], [ 8, 9 ], [ 9, 10 ], [ 9, 11 ], [ 8, 12 ], [ 12, 13 ], [ 12, 14 ], [...
[ "import java.util.*;\n\nclass Main {\n public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n char [] str = sc.next().toCharArray();\n for(int x = str.length-1; x >= 0; x--) {\n System.out.print(str[x]);\n }\n\n System.out.print(\"\\n...
import java.util.*; class Main { public static void main (String [] args) { Scanner sc = new Scanner(System.in); char [] str = sc.next().toCharArray(); for(int x = str.length-1; x >= 0; x--) { System.out.print(str[x]); } System.out.print("\n"); } }