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,
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,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
41,
13,
13,
0,
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.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(in.hasNext()){\n\t\t\tlong x = in.nextLong();\n\t\t\tlong y = in.nextLong();\n\t\t\tlong mx=x,my=y;\n\t\t\twhile(y!=0){\n\t\t\t\tx = x%y;\n\t\t\t\tlong test=x;\n\t\t\t\tx = y;\n\... | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
while(in.hasNext()){
long x = in.nextLong();
long y = in.nextLong();
long mx=x,my=y;
while(y!=0){
x = x%y;
long test=x;
x = y;
y = test;
}
System.out.println(x+" "+... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
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
],
[
131,
11
],
[
131,
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\t\t//??????????????°?¨????\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tin... | 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 str;
int a, b, GCD, LCM;
whi... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
38,
5,
13,
30,
3,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
41,
13,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(true) {\n String li;\n try {\n li = sc.nextLine();\n }catch(Exception e) {\n break;\n }\n ... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true) {
String li;
try {
li = sc.nextLine();
}catch(Exception e) {
break;
}
String[]... |
[
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,
38,
5,
13,
30,
4,
18,
13,
30,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
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.Scanner;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.lang.Math;\n\nclass Main{\n public static void main(String[] args){\n InputStreamReader inputStreamReader = new InputStreamReader(System.in);\n ... | import java.util.Scanner;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.lang.Math;
class Main{
public static void main(String[] args){
InputStreamReader inputStreamReader = new InputStreamReader(System.in);
Buffered... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
30,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
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;\nclass Main{\n\tpublic static int gcd(int m, int n) {\n\t\tif(n ==0){\n\t\t\treturn m;\n\t\t}else{\n\t\t\treturn gcd(n,m%n);\n\t\t}\n\t}\n\tpublic static long lcm(int m, int n){\n\t\treturn (m / gcd(m, n)) * n; \n\t}\n public static void main(String[] a){\n \t\n \tScanner scan = ... | import java.util.Scanner;
class Main{
public static int gcd(int m, int n) {
if(n ==0){
return m;
}else{
return gcd(n,m%n);
}
}
public static long lcm(int m, int n){
return (m / gcd(m, n)) * n;
}
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
while (sca... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
4,
18,
13,
41,
13,
42,
2,
13,
17,
30,
0,
13,
20,
0,
13,
4,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
157,
11
],
[
157,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n try {\n long a,b,gcd;\n ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try {
long a,b,gcd;
Stri... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
4,
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,
18,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner in = new Scanner(System.in)) {\n solve(in);\n }\n }\n\n private static void solve(Scanner in) {\n while (in.hasNext()) {\n int a = in.nextInt(), b = in.next... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner in = new Scanner(System.in)) {
solve(in);
}
}
private static void solve(Scanner in) {
while (in.hasNext()) {
int a = in.nextInt(), b = in.nextInt();
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
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,
41,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
96,
5
],
[
96,
6
],
[
6,
7
],
[
6,
8
],
[
96,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\t\tlong a;\n\t\tlong b;\n\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n... | import java.util.Scanner;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
long a;
long b;
while(sc.hasNext()) {
a = sc.nextInt();
b = sc.nextInt();
System.out.println(gcd(a, b) + " " + lcm(a, b));
}
}
public static long gcd(long a, long ... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
20,
4,
18,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
4,
18,
13,
13,
4,
18,
13,
13,
23,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
57,
8
],
[
57,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.math.*;import java.util.*;public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+\" \"+x.multiply(y).divide(x.gcd(y)));}}}",
"import java.math.*;",
"math.*",
"java",
... | import java.math.*;import java.util.*;public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}}} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] a){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tint num1 = scan.nextInt(), num2 = scan.nextInt();\n\t\t\tif(num1 < num2){\n\t\t\t\tint sub = num1;\n\t\t\t\tnum1 = num2;\n\t\t\t\tnum2 = sub;\n\t\t\t}\n\t\t\... | import java.util.Scanner;
class Main{
public static void main(String[] a){
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
int num1 = scan.nextInt(), num2 = scan.nextInt();
if(num1 < num2){
int sub = num1;
num1 = num2;
num2 = sub;
}
int div = euclid(num1, num2);
System.out.... |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
102,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tstatic Scanner in;\n\tstatic long gcd(long p,long q)\n\t{\n\t\tif(p<q){long t=p;p=q;q=t;}\n\t\tif(q==0)return p;\n\t\treturn gcd(q,p%q);\n\t}\n\tstatic long lcm(long p,long q)\n\t{\n\t\treturn p*q/gcd(p,q);\n\t}\n\tpublic static void main(String[] args)\n\t{\n\t... | import java.util.Scanner;
public class Main
{
static Scanner in;
static long gcd(long p,long q)
{
if(p<q){long t=p;p=q;q=t;}
if(q==0)return p;
return gcd(q,p%q);
}
static long lcm(long p,long q)
{
return p*q/gcd(p,q);
}
public static void main(String[] args)
{
in=new Scanner(System.in);
while(in.... |
[
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,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
18,
13,
17,
17,
18,
13,
17,
23,... | [
[
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.ArrayList;\nimport java.util.Scanner;\n\nclass Main{\n public static void main(String[] args){\n \tScanner scan = new Scanner(System.in);\n \t\n \tint a;\n \tint b;\n \twhile (scan.hasNextInt()){\n \t\ta = scan.nextInt();\n \t\tb = scan.nextInt();\n \t\tint[] result = do... | import java.util.ArrayList;
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a;
int b;
while (scan.hasNextInt()){
a = scan.nextInt();
b = scan.nextInt();
int[] result = doThem(a, b);
System.out... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
13,
41,
13,
13,
42,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"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\tArrayDeque<Integer> ansA = new ArrayDeque<Integer>();\n\t\tArrayDeque<Integer> ansB = new ArrayDeque<Integer>();\n\n\t\twhile(sc.hasNext()){\n\t\t\tint m = sc.nextInt();\n\t\t\tin... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();
while(sc.hasNext()){
int m = sc.nextInt();
int n = sc.nextInt();
if(n>m){... |
[
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,
42,
2,
2,
13,
13,
17,
30,
41,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
41,
13,
13,
41... | [
[
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
],
... | [
"\n\nimport java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()) {\n\t\t\tlong a = scanner.nextInt();\n\t\t\tlong b = scanner.nextInt();\n\t\t\tlong m = a ;\n\t\t\tlong n = b ;\n\t\t\twhile(m % n != 0){\n\... |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while(scanner.hasNext()) {
long a = scanner.nextInt();
long b = scanner.nextInt();
long m = a ;
long n = b ;
while(m % n != 0){
long tmp = m;
m = n;
n = tmp... |
[
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,
17,
41,
13,
17,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
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 public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n \n while (scanner.hasNext()) {\n long x0 = scanner.nextLong();\n long y0 = scanner.nextLong();\n \n long x = x0;\n ... | import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
long x0 = scanner.nextLong();
long y0 = scanner.nextLong();
long x = x0;
long ... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
319,
8
],
[
319,
9
],
[
9,
10
],
[
9,
11
],
[
319,
12
],
[
12,
13
],
[
12,
14
... | [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n static IO io = new IO();\n public static void main(String[] args) {\n while (io.hasNext()) {\n long a = io.nextInt();\n long b = io.nextInt();\n long g = gcd(a,b);\n long l = a*b/g;\n ... | import java.util.*;
import java.io.*;
public class Main {
static IO io = new IO();
public static void main(String[] args) {
while (io.hasNext()) {
long a = io.nextInt();
long b = io.nextInt();
long g = gcd(a,b);
long l = a*b/g;
System.out.prin... |
[
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,
4,
18,
13,
17,
4,
13,
13,
13,
4,
13,
13,
13,
11,
1,
41,
13,
17,
41,
13,
4,
18,
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 Scanner sc = new Scanner(System.in);\n ArrayList<String> ans = new ArrayList<>();\n while(sc.hasNext()){\n long a = sc.nextLong(),b = sc.nextLong();\n ans.add(String.format(\"%d %d\",getGCD(... | import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
ArrayList<String> ans = new ArrayList<>();
while(sc.hasNext()){
long a = sc.nextLong(),b = sc.nextLong();
ans.add(String.format("%d %d",getGCD(a,b),getLCM(a,b... |
[
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,
17,
4,
13,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,... | [
[
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.Arrays;\nimport java.util.Scanner;\n\n\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner cin=new Scanner(System.in);\n\t\tint a,b;\n\t\twhile(cin.hasNext()){\n\t\t\ta=cin.nextInt();\n\t\t\tb=cin.n... | import java.util.Arrays;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner cin=new Scanner(System.in);
int a,b;
while(cin.hasNext()){
a=cin.nextInt();
b=cin.nextInt();
System.out.printf("%d %d\... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
4,
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
],
[
13,
14
],
... | [
"import java.util.*;\npublic class Main \n{\n\tpublic static void main(String[] args) \n\t{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\twhile(stdIn.hasNext())\n\t\t{\n\t\t\tlong a = stdIn.nextLong();\n\t\t\tlong b = stdIn.nextLong();\n\t\t\tif(a < b)\n\t\t\t{\n\t\t\t\tlong temp = a;\n\t\t\t\ta = b;\n\t\t\t\tb... | import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner stdIn = new Scanner(System.in);
while(stdIn.hasNext())
{
long a = stdIn.nextLong();
long b = stdIn.nextLong();
if(a < b)
{
long temp = a;
a = b;
b = temp;
}
long g = gcd(a, b);
System.out.... |
[
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,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
13,
42,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
6,
8
],
[
89,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.*;\npublic class Main{\n static Scanner kbd = new Scanner(System.in);\n public static void main(String[] args){\n\twhile(kbd.hasNext()){\n\t long a = kbd.nextLong();\n\t long b = kbd.nextLong();\n\t // a<bにしておく\n\t if(a>b) {\n\t\tlong w = a;\n\t\ta = b; \n\t\tb = w;\n\t }\n\n... | import java.util.*;
public class Main{
static Scanner kbd = new Scanner(System.in);
public static void main(String[] args){
while(kbd.hasNext()){
long a = kbd.nextLong();
long b = kbd.nextLong();
// a<bにしておく
if(a>b) {
long w = a;
a = b;
b = w;
}
long gcd = a;
while(... |
[
7,
15,
13,
17,
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,
4,
18,
13,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
14,
2,
18,
1... | [
[
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.Scanner;\nimport java.util.Arrays;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile( scan.hasNextInt() ) {\n\t\t\tInteger[] ary = new Integer[2];\n\t\t\tary[0] = scan.nextInt();\n\t\t\tary[1] = scan.nextInt();\n\t\t\t\n\t\t\tA... | import java.util.Scanner;
import java.util.Arrays;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while( scan.hasNextInt() ) {
Integer[] ary = new Integer[2];
ary[0] = scan.nextInt();
ary[1] = scan.nextInt();
Arrays.sort(ary);
int divisor = 0... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
38,
5,
13,
30,
30,
4,
18,
13,
30,
42,
2,
17,
0,
13,
4,
18,
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
],
[
130,
11
],
[
130,
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[] a){\n\n\t\tString str;\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry {\n\t\t\twhile(null != ( str = bf.readLine() )... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] a){
String str;
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
try {
while(null != ( str = bf.readLine() )){
String[] arr = str.s... |
[
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,
2,
2,
13,
4,
13,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
70,
5
],
[
70,
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 while(sc.hasNext()){\n\t \tlong a=sc.nextLong();\n\t \tlong b=sc.nextLong();\n\t System.out.println(gcd(a,b)+\" \"+a/gcd(a,b)*b);\n\t }\n\t}\n\tpublic static long gc... | 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 b=sc.nextLong();
System.out.println(gcd(a,b)+" "+a/gcd(a,b)*b);
}
}
public static long gcd(long a,long b){
if(b==0)r... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,... | [
[
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.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputS... | import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
38,
5,
13,
30,
3,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
13,
42,
17,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
3,
0,
13,
13,
0,
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.Scanner;\n\nclass Main\n{\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(true)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tlong a = sc.nextInt();\n\t\t\t\tlong b = sc.nextInt();\n\t\t\t\t\n\t\t\t\tlong n = a;\n\t\t\t\tlong m = b;\n\t\t\t\twhile (true)\n... | import java.util.Scanner;
class Main
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
while(true)
{
try
{
long a = sc.nextInt();
long b = sc.nextInt();
long n = a;
long m = b;
while (true)
{
long k = m % n;
if (k == 0) break;
m = ... |
[
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,
18,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
11,
1,
30,
30,
0,
13,
2,
13,
13,
14,
... | [
[
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.*;\n\npublic class Main{\n public static void main(String[] args) {\n\t Scanner sc =new Scanner(System.in);\nint a,b;\nwhile(sc.hasNext()){\nint n1=sc.nextInt();\nint n2=sc.nextInt();\na=Math.max(n1,n2);\nb=Math.min(n1,n2);\nfor(;;){\na =a%b;\nif(a==0)break;\nint temp=b;\nb=a;\na=temp;\n}\nSyst... | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc =new Scanner(System.in);
int a,b;
while(sc.hasNext()){
int n1=sc.nextInt();
int n2=sc.nextInt();
a=Math.max(n1,n2);
b=Math.min(n1,n2);
for(;;){
a =a%b;
if(a==0)break;
int temp=b;
b=a;
a=temp;
}
System.out.println(b+" "+(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,
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
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()){\n int a = sc.nextInt();\n int b = sc.nextInt();\n System.out.println(g... | import java.util.*;
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) + " "... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
20,
12,
13,
30,
42,
4,
13,
30,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
29,
17,
0,
13,
4,
18,
13,
0,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
6
],
[
6,
7
],
[
97,
8
],
[
8,
9
],
[
97,
10
],
[
10,
11
],
[
10,
12
],
[
97,
13
],
[
13,
14
... | [
"import java.util.Scanner;\n\npublic class Main {\n\tstatic long a,b;\n\tstatic Scanner cin = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tprivate static boolean read() {\n\t\tif(!cin.hasNext())\n ... | import java.util.Scanner;
public class Main {
static long a,b;
static Scanner cin = new Scanner(System.in);
public static void main(String[] args) {
while(read()){
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
private static boolean read() {
if(!cin.hasNext())
return false;
a = cin.nex... |
[
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,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
13,
13,
13,
41,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
159,
5
],
[
159,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
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;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1... | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner scan = new Scanner(System.in);
long a, b;
String[] input;
while (scan.hasNext()){
input = scan.nextLine().split(" ");
a = Integer.parseInt(input[0]);
b = Integer.parseInt(input[1]);
long lcm = sol... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
42,
2,
17,
0,
13,
4,
18,
13,
30,
41,
13,
4,
18,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nclass Main{\n public static void main(String args[]){\n\tString str;\n\ttry{\n\t InputStreamReader is = new InputStreamReader(System.in);\n\t BufferedReader br = new BufferedReader(is);\n\t int[] n = new int[2];\n\t long[] l = new lo... | import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main{
public static void main(String args[]){
String str;
try{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
int[] n = new int[2];
long[] l = new long[2];
int temp... |
[
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,
4,
18,
13,
23,
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\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 b = sc.nextLong();\n\t\t\tlong gcd = gcd(a, b);\n\t\t\tlong lcm = (a * b) / gcd;\n\t\t\tSystem.out.println(gc... | 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.nextLong();
long b = sc.nextLong();
long gcd = gcd(a, b);
long lcm = (a * b) / gcd;
System.out.println(gcd + " " + lcm);
}
sc.close();
... |
[
7,
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,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
13,
13,
13,
41,
13,
2,
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
],
[
8,
14
],
... | [
"\nimport java.io.*;\n\npublic class Main {\n\t \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n String s;\n while ((s = br.readLine()) != null) {\n String[] lc = s.split(\" \");\n ... |
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
while ((s = br.readLine()) != null) {
String[] lc = s.split(" ");
int a = Integ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
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,
... | [
[
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.*;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Scanner;\n\nclass Main {\n /* Euclid???????????? */\n public static long gcd(long a, long b) {\n if(b == 0) return a;\n return gcd(b, a % b);\n }\n public static void main(String[] args) throws... | import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
class Main {
/* Euclid???????????? */
public static long gcd(long a, long b) {
if(b == 0) return a;
return gcd(b, a % b);
}
public static void main(String[] args) throws IOException {
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
20,
38,
30,
4,
18,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
14,
2,
13,
17,
30,
0,
13,
4,
18,
1... | [
[
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.*;\nclass Main{\n public static void main(String[] a){\n String b =\" \";\n String c =\" \";\n Scanner k = new Scanner( System.in);\n try{\n while(k.hasNextLine()){\n String line = k.nextLine();\n StringTokenizer st = new StringTokenizer(line);\n int count=0;... | import java.util.*;
class Main{
public static void main(String[] a){
String b =" ";
String c =" ";
Scanner k = new Scanner( System.in);
try{
while(k.hasNextLine()){
String line = k.nextLine();
StringTokenizer st = new StringTokenizer(line);
int count=0;
while(st.h... |
[
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,
4,
18,
13,
23,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (sc.hasNext()) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int GCD = GCD(a, b);\n int LCM = a / GCD * b;\n ... | 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();
int GCD = GCD(a, b);
int LCM = a / GCD * b;
Syst... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
4,
18,
13,
17,
41,
13,
17,
12,
13,
30,
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,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
354,
11
],
[
354,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main {\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n final String LINE_SPR = System.getProperty(\"line.separator\");\n final int BIG_MOD = 1000000007;\n\n void ru... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
final String LINE_SPR = System.getProperty("line.separator");
final int BIG_MOD = 1000000007;
void run() throws Excep... |
[
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
],
[
143,
11
],
[
143,
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 String tmp... | 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 = br.readLine(... |
[
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,
0,
13,
4,
18,
13,
0,
13,
0,
13,
4,
18,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
... | [
[
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
],
[
8,
14
],
... | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner cin = new Scanner(System.in);\n\n\t\tint a,b,t,gcd,lcm;\n\t\t\n\t\twhile(cin.hasNext())\n\t\t{\n\t\t\ta=lcm=cin.nextInt();\n\t\t\tb=gcd=cin.nextInt();\n\t\t\t\n\t\t\twhile(gcd!=0)\n\t\t\t{\n\t\t\t\tlcm=lcm... | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
int a,b,t,gcd,lcm;
while(cin.hasNext())
{
a=lcm=cin.nextInt();
b=gcd=cin.nextInt();
while(gcd!=0)
{
lcm=lcm%gcd;
t=lcm; lcm=gcd; gcd=t;
}
gcd = a/lcm... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
42,
2,
0,
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.util.ArrayList;\nimport java.util.Collections;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tString\t\tstr;\n\t\tint a,b,multiple = 0,divisor = 0;\n\t\tArrayList<String>\tlist\t= new... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
public class Main {
public static void main(String[] args){
String str;
int a,b,multiple = 0,divisor = 0;
ArrayList<String> list = new ArrayList<String>();
Ar... |
[
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,
13,
0,
13,
13,
0,
... | [
[
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 public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n System.out.println(gcd(a, b) + \" \" + lcm(a, b));\n }\n }\n\n static void swap(int a... | import java.util.Scanner;
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));
}
}
static void swap(int a, int b) {
int te... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
2,
13,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\n\nclass Main{\t\n\t\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\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint n = 1;\n\t\tfor(int i=2; i<=a&&i<=b ;i+=0){\n\t\t\tif(a%i==0 &&b%i==0){\n\t\t\t\tn *= ... | import java.util.Scanner;
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();
int n = 1;
for(int i=2; i<=a&&i<=b ;i+=0){
if(a%i==0 &&b%i==0){
n *= i;
a /= i;
b /= i;
}else{
i... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
30,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
14,
2,
2,
13,
13,
17,
30,
29,
2,
2,
13,
13,
13,
30,
29,
2,
2,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
126,
5
],
[
126,
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\tprivate static int calcGCD(int a,int b)\n\t{\n\t\tif(b==0){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn calcGCD(b,a%b);\n\t\t}\n\t}\n\tprivate static int calcLCM(int a,int b)\n\t{\n\t\tint gcd=calcGCD(a,b);\n\t\tif(a%gcd==0){\n\t\t\treturn (a/gcd)*b;\n\t\t}else{\... | import java.util.Scanner;
public class Main
{
private static int calcGCD(int a,int b)
{
if(b==0){
return a;
}else{
return calcGCD(b,a%b);
}
}
private static int calcLCM(int a,int b)
{
int gcd=calcGCD(a,b);
if(a%gcd==0){
return (a/gcd)*b;
}else{
return (b/gcd)*a;
}
}
public static voi... |
[
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,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
17,
17,
13,
9,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],... | [
"\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long temp;\n if(a==b){\n System.out.prin... |
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 b=sc.nextLong();
long temp;
if(a==b){
System.out.println(1+" "+a);
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
17,
13,
29,
13,
29,
4,
13,
13,
2,
13,
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,
30,
41,
1... | [
[
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.*;\n\npublic class Main\n{\n private static int gcd(int x, int y)\n {\n if (0 == y)\n return x;\n return gcd(y, x % y);\n }\n\n private static int lcm(int x, int y)\n {\n return x / gcd(x, y) * y;\n }\n\n public static void main(String[] main)\... | import java.util.*;
public class Main
{
private static int gcd(int x, int y)
{
if (0 == y)
return x;
return gcd(y, x % y);
}
private static int lcm(int x, int y)
{
return x / gcd(x, y) * y;
}
public static void main(String[] main)
{
Scanner... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
17,
30,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
175,
5
],
[
175,
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 sc = new Scanner(System.in);\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tif (a == b) {\n\t\t\t\tSystem.out.println(a + \" \" + 1);\n\t\t\t} else {\n\t\t\t\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.nextLong();
long b = sc.nextLong();
if (a == b) {
System.out.println(a + " " + 1);
} else {
long A = max(a, b);
long B = min(a, b);... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
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,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
174,
5
],
[
174,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
... | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\tint a,b,k=1,t=1,x,y;\n\t\tint i=1,j=1;\n\t\twhile(s.hasNext()){\n\t\t\ta=s.nextInt();\n\t\t\tb=s.nextInt();\n\t\t\t//\n\t\t\tk=a;t=b;\n\t\t\twhile(true){\n\t\t\t\tif(k==t)\n\t\t\t\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int a,b,k=1,t=1,x,y;
int i=1,j=1;
while(s.hasNext()){
a=s.nextInt();
b=s.nextInt();
//
k=a;t=b;
while(true){
if(k==t)
break;
if(k<t){
k=a*i;
i++;
}
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
30,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4... | [
[
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 public static long euclid (long a, long b) {\n\tif (b == 0) {\n\t return a;\n\t}\n\telse {\n\t return euclid (b, a%b);\n\t}\n }\n \n public static void main (String args[]) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, G, L;\n\n\twhile (sc... | import java.util.Scanner;
class Main {
public static long euclid (long a, long b) {
if (b == 0) {
return a;
}
else {
return euclid (b, a%b);
}
}
public static void main (String args[]) {
Scanner scan = new Scanner(System.in);
long a, b, G, L;
while (scan.hasNext()) {
a = scan.n... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
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,
2,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
118,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
... | [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\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;... | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
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 long lcm(long a, long b, long g... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
239,
5
],
[
239,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
6,
12
],
[
12,
13
],
[
239,
14
]... | [
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tMain p = new Main();\n\t}\n\n\tpublic Main() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = \"\";\n\t\n\t\twhile(sc.hasNextLine()){\n\t\t\tstr = sc.nextLine();\n\t\t\tString[] numStrs = str.split(\" \... |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Main p = new Main();
}
public Main() {
Scanner sc = new Scanner(System.in);
String str = "";
while(sc.hasNextLine()){
str = sc.nextLine();
String[] numStrs = str.split(" ");
int a = Integer.parseInt(numStrs[0... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
14,
2,
13,
13,
30,
29,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
29,
13,
30,
29,
4,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
108,
5
],
[
108,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic int calcGCD(int a_in, int b_in) {\n\t\tint a, b;\n\t\tif (a_in == b_in) { return a_in;\n\t\t} else if (a_in < b_in) { a = b_in; b = a_in;\n\t\t} else { a = a_in; b = b_in; }\n\n\t\tint r = a % b;\n\t\tif (r == 0) { return b;\n\t\t} else { return calcGC... | import java.util.Scanner;
public class Main {
public int calcGCD(int a_in, int b_in) {
int a, b;
if (a_in == b_in) { return a_in;
} else if (a_in < b_in) { a = b_in; b = a_in;
} else { a = a_in; b = b_in; }
int r = a % b;
if (r == 0) { return b;
} else { return calcGCD(b, r); }
}
public static voi... |
[
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,
17,
30,
14,
2,
2,
13,
13... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
166,
5
],
[
166,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],... | [
"\n\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\t\n\t\twhile(stdIn.hasNext()){\n\t\t\tint a = stdIn.nextInt();\n\t\t\tint b = stdIn.nextInt();\n\t\t\tint c = a;\n\t\t\tint d = b;\n\t\t\t\n\t\t\tif(a<b){\n\t\t\t\tint tm... |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
while(stdIn.hasNext()){
int a = stdIn.nextInt();
int b = stdIn.nextInt();
int c = a;
int d = b;
if(a<b){
int tmp = b;
b = a;
a = tmp;
}
while(... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
17,
0,
13,
17,
14,
2,
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.*;\n\nimport java.util.*;\n\n\n\nclass Main{\n\n\tprivate static ArrayList<Integer> calc_gcd_lcm(ArrayList<Integer> a){\n\n\t\tArrayList<Integer> b = new ArrayList<Integer>();\n\n\t\t\t\t\n\n\t\tfor(int i = 0;i<a.size()/2;i++){\n\n\t\t\t\n\n\t\t\tint x,y,x1,y1,j,k;\n\t\t\tx1 = 0;\n\t\t\ty1 = 0;\n\n\... | import java.io.*;
import java.util.*;
class Main{
private static ArrayList<Integer> calc_gcd_lcm(ArrayList<Integer> a){
ArrayList<Integer> b = new ArrayList<Integer>();
for(int i = 0;i<a.size()/2;i++){
int x,y,x1,y1,j,k;
x1 = 0;
y1 = 0;
if(a.get(i*2) > a.get(i*2+1)){
x = a.get(i... |
[
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,
14,
2,
2,
13,
13,
17,
30,
29,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
236,
5
],
[
236,
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\t\n\t\tif(max % min == 0){\n\t\t\treturn min;\n\t\t}\n\t\t\n\t\tfor(long i=1; i<(long)(Math.sqrt(min)+1); i++)... | 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;}
if(max % min == 0){
return min;
}
for(long i=1; i<(long)(Math.sqrt(min)+1); i++){
if((min % i) == 0){
if((max % 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,
41,
13,
17,
41,
13,
17,
41,
13,
17,
0,
13,
2,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
96,
5
],
[
96,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n\tScanner sc= new Scanner (System.in);\n\twhile(sc.hasNext()){\n\tlong a = sc.nextLong();\n\t\tlong b = sc.nextLong();\n\t\tlong r = 0;\n\t\tlong temp = 0;\n\t\tlong LCM = 0;\n\t\tLCM = a * b;\n\t\tif ( a < b){\n\t\t\ttemp = a;\n\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 b = sc.nextLong();
long r = 0;
long temp = 0;
long LCM = 0;
LCM = a * b;
if ( a < b){
temp = a;
a = b;
b = temp;
}
for( r = a... |
[
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,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
120,
8
],
[
120,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
]... | [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\t\n\tpublic static int gcd(int m, int n) {\n\t\tif(n == 0) return m;\n\t\treturn gcd(n, m % n);\n\t}\n\t\n\tpublic static long lcm(int m, int n) {\n\t\treturn ((long)m * n) / gcd(m, n);\n\t}\n\t\n\tpublic static void main(String[] args) throws IOExcep... | import java.io.*;
import java.util.*;
public class Main {
public static int gcd(int m, int n) {
if(n == 0) return m;
return gcd(n, m % n);
}
public static long lcm(int m, int n) {
return ((long)m * n) / gcd(m, n);
}
public static void main(String[] args) throws IOException {
BufferedReader br =
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
0,
18,
36,
13,
13,
0,
18,
36,
13,
2,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
4,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
... | [
"import java.util.*;\n\nclass GL {\n\tpublic long GCD,LCM;\n\n\tpublic GL(long a,long b){\n\t\tlong g = gcd(a,b);\n\t\tthis.GCD = g;\n\t\tthis.LCM = a * b / g;\n\t}\n\tprivate long gcd(long a,long b){\n\t\twhile( a != b ){\n\t\t\tif( a < b ){\n\t\t\t\tb -= a;\n\t\t\t} else if( a > b ){\n\t\t\t\ta -= b;\n\t\t\t}\n\t... | import java.util.*;
class GL {
public long GCD,LCM;
public GL(long a,long b){
long g = gcd(a,b);
this.GCD = g;
this.LCM = a * b / g;
}
private long gcd(long a,long b){
while( a != b ){
if( a < b ){
b -= a;
} else if( a > b ){
a -= b;
}
}
return a;
}
}
public class Main {
public sta... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
150,
5
],
[
150,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
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,
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,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
116,
11
],
[
116,
12
],
[
12,
13
],
[
12,
14
],... | [
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\... |
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 ((li... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
17,
42,
2,
0,
13,
4,
13,
17,
30,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
5,
13,
30,
30,
41,
13,
4,
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
],
[
0,
13
],
[
204,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\n\npublic class Main {\n\tprivate\tstatic\tBufferedReader br = null;\n\n\tstatic {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t}\n\n\t/**\n\t * @param args\n\t */\n\tpub... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
private static BufferedReader br = null;
static {
br = new BufferedReader(new InputStreamReader(System.in));
}
/**
* @param args
*/
public static void main(String[] ar... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
42,
2,
13,
17,
30,
41,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
13,
2,
13,
4,
13,
13,
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
],
[
0,
13
],
[
13,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.util.*;\nimport java.util.stream.IntStream;\n\n\npublic class Main {\n private static int gcd(int a, int b)\n {\n while (b > 0)\n {\n int temp = b;\n b = a % b; // ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.stream.IntStream;
public class Main {
private static int gcd(int a, int b)
{
while (b > 0)
{
int temp = b;
b = a % b; // % is remainder
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
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,
... | [
[
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.InputStreamReader;\nimport java.lang.Exception;\nimport java.lang.String;\nimport java.lang.System;\n\npublic class Main {\n public static void main(String[] a) throws Exception {\n BufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n ... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Exception;
import java.lang.String;
import java.lang.System;
public class Main {
public static void main(String[] a) throws Exception {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
long num... |
[
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,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
0,
13,
4,
18,
13,
18,
4,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
113,
11
],
[
113,
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 NumberFormatException, IOException {\n\t\tlong \t\t\tx, y, origX, origY;\n\t\tString\t\t\tbuffer;\n\t\tBufferedReader \treader = new BufferedReader(... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws NumberFormatException, IOException {
long x, y, origX, origY;
String buffer;
BufferedReader reader = new BufferedReader(new InputStreamReader(Syste... |
[
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,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
13,
13,
13,
41,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
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;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1... | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner scan = new Scanner(System.in);
long a, b;
String[] input;
while (scan.hasNext()){
input = scan.nextLine().split(" ");
a = Integer.parseInt(input[0]);
b = Integer.parseInt(input[1]);
long lcm = sol... |
[
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,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
62,
8
],
[
62,
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\tpublic static void main(String arg[])\n\t{\n\t\tScanner sc = new Scanner(System.in); \n\t\twhile(sc.hasNext())\n\t\t{\n\t\t\n\t\tBigInteger x = sc.nextBigInteger();\n\t\tBigInteger y = sc.nextBigInteger();\n\n\t\tBigInteger gcd = x.... | import java.math.BigInteger;
import java.util.Scanner;
public class Main
{
public static void main(String arg[])
{
Scanner sc = new Scanner(System.in);
while(sc.hasNext())
{
BigInteger x = sc.nextBigInteger();
BigInteger y = sc.nextBigInteger();
BigInteger gcd = x.gcd(y);
BigInteger lcm = x.multip... |
[
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,
14... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\n\t\twhile(stdIn.hasNext()){\n\t\t\tlong numA = stdIn.nextLong();\n\t\t\tlong numB = stdIn.nextLong();\n\t\t\tlong GCD = getGCD(numA,numB);\t\t\t\t//最大公約数\n\t\t\tlong LCM = get... | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
while(stdIn.hasNext()){
long numA = stdIn.nextLong();
long numB = stdIn.nextLong();
long GCD = getGCD(numA,numB); //最大公約数
long LCM = getLCM(numA,numB); //最小公倍数
System... |
[
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,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
94,
8
],
[
94,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"\n\nimport java.io.IOException;\nimport java.util.Scanner;\n\n\npublic class Main{\n\n\tpublic static void main(String[] args) throws IOException {\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\tlong gcd = divide(a,... |
import java.io.IOException;
import java.util.Scanner;
public class Main{
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
while (scan.hasNext()) {
long a = scan.nextLong();
long b = scan.nextLong();
long gcd = divide(a, b);
long lcm = a * b / gcd;... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
41,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
114,
8
],
[
114,
9
],
[
9,
10
],
[
114,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
... | [
"import java.util.NoSuchElementException;\nimport java.util.Scanner;\n\npublic class Main {\n\tprivate static Scanner sc;\n\tstatic int getGCD(int a,int b){\n\t\tif(b>a){\n\t\t\tint tmp=a;\n\t\t\ta=b;\n\t\t\tb=tmp;\n\t\t}\n\t\twhile(b!=0){\n\t\t\tint tmp=b;\n\t\t\tb=a%b;\n\t\t\ta=tmp;\n\t\t}\n\t\treturn a;\n\t}\n\t... | import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
private static Scanner sc;
static int getGCD(int a,int b){
if(b>a){
int tmp=a;
a=b;
b=tmp;
}
while(b!=0){
int tmp=b;
b=a%b;
a=tmp;
}
return a;
}
static int getLCM(int a,int b){
return a/getGCD(a,b)*... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
30,
42,
4,
18,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
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
],
[
65,
14
],
... | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\ttry {\n\t\t\twhile(scan.hasNext()... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
try {
while(scan.hasNext()){
BigInteger bigIn... |
[
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
],
[... | [
"/* package whatever; // don't place package name! */\n\nimport java.util.Scanner;\n\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner cin = new Scanner(System.in);\n\t\t\n\t\twhile (cin.hasNext()){\n\t\t\tint a = cin.nextInt();\n\t\t\tint b = cin.nextInt();\n\t\... | /* package whatever; // don't place package name! */
import java.util.Scanner;
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner cin = new Scanner(System.in);
while (cin.hasNext()){
int a = cin.nextInt();
int b = cin.nextInt();
int gcd = GCD(a, b);
int lcm ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
20,
17,
42,
2,
2,
13,
13,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
40,
17,
0,
18,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
158,
11
],
[
158,
12
],
[
12,
13
],
[
12,
14
],... | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] a) throws IOException{\n\n\t\tString strLine =\"\";\n\t\tBufferedReader stdReader =\n\t\t\t\tnew BufferedReader(new InputStreamReader(System.in));\n\n\t\tint... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] a) throws IOException{
String strLine ="";
BufferedReader stdReader =
new BufferedReader(new InputStreamReader(System.in));
int i = 0;
int max = 50;
int[]... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
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,
17,
13,
13,
23,
13,
12,
13,
3... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],... | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\twhile (sc.hasNext()) {\n\t\t\t\tlong x = sc.nextLong();\n\t\t\t\tlong y = sc.nextLong();\n\n\t\t\t\tlong gcd = gcd(x, y);\n\t\t\t\tlong lcm = (x / gcd) * y;\n\t\t\t\t... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
while (sc.hasNext()) {
long x = sc.nextLong();
long y = sc.nextLong();
long gcd = gcd(x, y);
long lcm = (x / gcd) * y;
System.out.printf("%s %s\n", gcd, lcm);
... |
[
7,
15,
13,
17,
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,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
177,
5
],
[
177,
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\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\n\t\tlong a = 0;\n\t\tlong b = 0;\n\t\twhile (scanner.hasNext()) {\n\t\t\ta = scanner.nextLong();\n\t\t\tb = scanner.nextLong();\n\n\t\t\tl... | import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long a = 0;
long b = 0;
while (scanner.hasNext()) {
a = scanner.nextLong();
b = scanner.nextLong();
long lcm = calcLCM(a, b);
long gcd = cal... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
0,
18,
13,
17,
13,
0,
18,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"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\tlong[] ab = new long[2];\n\t\tlong a,b;\n\t\tlong gcd = 0;\n\t\tlong lcm = 0;\n\n\t\twhile ((scan.hasNext())) {\n\t\t\ta = Integer.parseInt(scan.next());\n\t\t\tb = Integer.... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
long[] ab = new long[2];
long a,b;
long gcd = 0;
long lcm = 0;
while ((scan.hasNext())) {
a = Integer.parseInt(scan.next());
b = Integer.parseInt(scan.next());
ab[0] = a... |
[
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,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
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.math.BigInteger;\nimport java.util.Scanner;\n\nclass Main {\n public static void main(String args[]) {\n Scanner sc = new Scanner(System.in);\n\n while (sc.hasNext()) {\n BigInteger a = sc.nextBigInteger();\n BigInteger b = sc.nextBigInteger();\n\n BigI... | import java.math.BigInteger;
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
BigInteger a = sc.nextBigInteger();
BigInteger b = sc.nextBigInteger();
BigInteger gcd = a.g... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
30,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
... | [
"import java.util.Scanner;\n\nclass Main {\n private static long gcd(long a, long b) {\n if (a % b == 0) {\n return b;\n } else {\n return gcd(b, a % b);\n }\n }\n\n private static long lcm(long a, long b) {\n long gcd = gcd(a, b);\n return a * b / g... | import java.util.Scanner;
class Main {
private static long gcd(long a, long b) {
if (a % b == 0) {
return b;
} else {
return gcd(b, a % b);
}
}
private static long lcm(long a, long b) {
long gcd = gcd(a, b);
return a * b / gcd;
}
pri... |
[
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,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\nimport java.math.BigInteger;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) {\n BigInteger bda = new BigInteger(sc.next());\n BigInteger bdb = new BigInteger(sc.next());\n BigInteger gcd = bda.gcd(... | import java.util.Scanner;
import java.math.BigInteger;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
BigInteger bda = new BigInteger(sc.next());
BigInteger bdb = new BigInteger(sc.next());
BigInteger gcd = bda.gcd(bdb);
B... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.Scanner;\n\nclass Main{\n public static int gcd(int a, int b){\n int t;\n if(a < b){\n t = a;\n a = b;\n b = t;\n }\n while(b > 0){\n t = b;\n b = a % b;\n a = t;\n }\n return a;\n }\n... | import java.util.Scanner;
class Main{
public static int gcd(int a, int b){
int t;
if(a < b){
t = a;
a = b;
b = t;
}
while(b > 0){
t = b;
b = a % b;
a = t;
}
return a;
}
public static void... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
... | [
[
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.awt.Frame;\nimport java.awt.image.SinglePixelPackedSampleModel;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.StringToken... | import java.awt.Frame;
import java.awt.image.SinglePixelPackedSampleModel;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import ... |
[
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,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
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
],
[
119,
11
],
[
119,
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\t\n\t\twhile(true){\n\t\t\tString str = br.read... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String str = br.readLine();
if(str == null ... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
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
],
[
82,
11
],
[
82,
12
],
[
12,
13
],
[
12,
14
],
... | [
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n\n\n\npublic class Main {\n\t\n\tprivate static long gcd(long n, long m) {\n//\t\tint tmp = 0;\n\t\twhile(n != m) {\n\t\t\tif(n > m) {\n\t\t\t\tn -= m;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tm-= n;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn n;\n\t}\n\n//\tprivate ... | import java.util.*;
import java.io.*;
import java.math.*;
public class Main {
private static long gcd(long n, long m) {
// int tmp = 0;
while(n != m) {
if(n > m) {
n -= m;
}
else {
m-= n;
}
}
return n;
}
// private static int lcm(int n, int m) {
// return n*m/gcd(n, m);
// }
... |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
14,
2,
13,
17,
29,
4,
13,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
41,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
6
],
[
6,
7
],
[
6,
8
],
[
99,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],... | [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static long gcd(long a, long b){\n\t\tif(b != 0) return gcd(b, a % b);\n\t\telse return a;\n\t}\n\n\tpublic static long lcm(long a, long b, long g){\n\t\tlong v = a / g;\n\t\tlong w = b / g;\n\t\tlo... | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static long gcd(long a, long b){
if(b != 0) return gcd(b, a % b);
else return a;
}
public static long lcm(long a, long b, long g){
long v = a / g;
long w = b / g;
long l = v * w * g;
return l;
}... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
17,
41,
13,
17,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
13,
14,
40,
4,
18,
13,
3,
41,
13,
41,
13,
41,
13,
41,
13,
41,
1... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
130,
8
],
[
130,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.*;\nimport java.util.regex.*;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tPattern pattern = Pattern.compile(\"([0-9]+) *([0-9]+)\");\n\t\tString str = \"\";\n\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile((str=b... | import java.io.*;
import java.util.regex.*;
public class Main {
public static void main(String[] args) throws IOException {
Pattern pattern = Pattern.compile("([0-9]+) *([0-9]+)");
String str = "";
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
while((str=bf.readLine())!=null){
M... |
[
7,
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,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
... | [
[
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 public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n while(sc.hasNext()) {\n long a = Long.parseLong(sc.next());\n long b = Long.parseLong(sc.next());\n long g = gcd(a, b);\n\n ... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
long a = Long.parseLong(sc.next());
long b = Long.parseLong(sc.next());
long g = gcd(a, b);
System.out.... |
[
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.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n\n while (input.hasNext()) {\n int a = input.nextInt();\n int b = input.nextInt();\n int gcd = GCD(a, b);\n int lcm = a / gcd * b;\n... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
while (input.hasNext()) {
int a = input.nextInt();
int b = input.nextInt();
int gcd = GCD(a, b);
int lcm = a / gcd * b;
Sys... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
42,
4,
18,
13,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\npublic class Main {\n\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int[] a = new int[2];\n while(s.hasNext()){\n for(int i=0; i < 2; i++)\n a[i] = s.nextInt();\n int gcd = 1;\n Arrays.... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int[] a = new int[2];
while(s.hasNext()){
for(int i=0; i < 2; i++)
a[i] = s.nextInt();
int gcd = 1;
Arrays.sort(a);
... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
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,
30,
0,... | [
[
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.Scanner;\nclass Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a=0,b=0,m=0,n=0,t=0;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tif(a < b){\n\t\t\t\tm = b;\n\t\t\t\tn = a;\n\t\t\t}else{\n\t\t\t\tm = ... | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int a=0,b=0,m=0,n=0,t=0;
while(scan.hasNext()){
a = scan.nextInt();
b = scan.nextInt();
if(a < b){
m = b;
n = a;
}else{
m = a;
n = b;
}
while(true){
if((t=m %... |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
11,
1,
4,
18,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
134,
5
],
[
134,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.Scanner;\n\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tfor(; scanner.hasNext(); )\n\t\t{\n\t\t\tlong a = scanner.nextLong();\n\t\t\tlong b = scanner.nextLong();\n\t\t\tif(a < b)\n\t\t\t{\n\t\t\t\tlong buf = a;\n\t\t\t\t... | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
for(; scanner.hasNext(); )
{
long a = scanner.nextLong();
long b = scanner.nextLong();
if(a < b)
{
long buf = a;
a = b;
b = buf;
}
System.out.print... |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
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
],
[
107,
8
],
[
107,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
]... | [
"import java.io.*;\nimport java.util.*;\n \npublic class Main {\n \n public static void main(String[] arg) throws NumberFormatException, IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer strToke;\n String line;\n long gcd; // ?... | import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] arg) throws NumberFormatException, IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer strToke;
String line;
long gcd; // ?????§??¬?´???°... |
[
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,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
4,
13,
13,
13,
29,... | [
[
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 int gcd(int a, int b){\n\tif(a < b){\n\t int temp = a;\n\t a = b;\n\t b = temp;\n\t}\n\t\n\twhile(b != 0){\n\t int temp = b;\n\t b = a % b;\n\t a = temp;\n\t}\n\treturn a;\t \n }\n\n static int lcm(int a, int b){\n\ta /= gcd(a, b);\... | import java.util.Scanner;
class Main {
static int gcd(int a, int b){
if(a < b){
int temp = a;
a = b;
b = temp;
}
while(b != 0){
int temp = b;
b = a % b;
a = temp;
}
return a;
}
static int lcm(int a, int b){
a /= gcd(a, b);
return a * b;
}
public st... |
[
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
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
... | [
"import java.util.Scanner;\n\n//GCD and LCM\npublic class Main{\n\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\n\tpublic static void main(String[] a... | import java.util.Scanner;
//GCD and LCM
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(s... |
[
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,
2,
2,
2,
17,
13,
13,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
81,
5
],
[
81,
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 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) + \" \" + 1l * a * b / GCD(a, b));\n\t\t}\n\t\tsc.close();... | 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) + " " + 1l * a * b / GCD(a, b));
}
sc.close();
}
public static int GCD(int x, ... |
[
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,
41,
13,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
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{\n\n\tpublic static void main(String[] args)throws IOException\n\t{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tlong[] ans=new long[2];\n\t\twhile((s... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main
{
public static void main(String[] args)throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
long[] ans=new long[2];
while((str=br.readLine())!=null)
... |
[
7,
15,
13,
17,
15,
13,
17,
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,
17,
41,
13,
17,
0,
13,
4,
13,
13,
13,
0,
13,
4,
13,
13,
13,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
140,
11
],
[
140,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t//int tc = scan.nextInt();\n\t\tint rd = 1;\n\t\twhile(scan.hasNextInt()) {\n\t\t\tint a = scan.nextInt();\n\t\t\tint... | import java.util.ArrayList;
import java.util.HashMap;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
//int tc = scan.nextInt();
int rd = 1;
while(scan.hasNextInt()) {
int a = scan.nextInt();
int b = scan.nextInt();
int lcd... |
[
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,
41,
13,
41,
13,
13,
41,
13,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
... | [
[
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.Arrays;\nimport java.util.Scanner;\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\tlong c;\n\t\t\tlong r;\n\t\t\tlong A = a;\n\t\t\tlon... | //import java.util.Arrays;
import java.util.Scanner;
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 c;
long r;
long A = a;
long B = b;
while((r = a%b) != 0){
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,
2,
13,
13,
41,
13,
14,
2,
13,
17,
30,
0,
13,
4,
13,
13,
13,
30,
0,
13,
4,
13,
13,
13,
41,
13,
2,
... | [
[
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 public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while (sc.hasNext()){\n long a = sc.nextLong();\n long b = sc.nextLong();\n long c = a - b;\n long gcd;\n if (... | 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.nextLong();
long b = sc.nextLong();
long c = a - b;
long gcd;
if (c < 0){
... |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
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,
41,
13,
13,
41,
... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
124,
11
],
[
124,
12
],
[
12,
13
],
[
12,
14
],... | [
"import java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\npublic class Main{\n\tpublic static void main (String[] args) throws java.lang.Exception{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = br.readLine();\n\t while(line!=null){\n\t String[] lin... | import java.util.*;
import java.lang.*;
import java.io.*;
public class Main{
public static void main (String[] args) throws java.lang.Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = br.readLine();
while(line!=null){
String[] lines = line.split(" ");... |
[
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,
30,
29,
13,
29,
4... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
81,
5
],
[
81,
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 public static void main(String[] args) {\n Scanner sn = new Scanner(System.in);\n while (sn.hasNext()) {\n long a = sn.nextLong();\n long b = sn.nextLong();\n System.out.printf(\"%d %d\\n\", gcd(a, b), lcm(a, b));\... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sn = new Scanner(System.in);
while (sn.hasNext()) {
long a = sn.nextLong();
long b = sn.nextLong();
System.out.printf("%d %d\n", gcd(a, b), lcm(a, 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,
41,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
42,
2,
13,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[... | [
"import java.util.Scanner;\n \nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int x,y;\n int temp = 0;\n if (a < b) {\n ... | import java.util.Scanner;
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();
int x,y;
int temp = 0;
if (a < b) {
x... |
[
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,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
14,
2,
18,
13,
13,
17,... | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
165,
11
],
[
165,
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 br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = null;\n\t\t\n\t\ttry {\n\t\t\twhile((line = br.readLine... | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = null;
try {
while((line = br.readLine()) != null) {
line = l... |
[
7,
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,
18,
13,
13,
2,
2,
4,
13,
13,
17,
4,
13,
13,
23,
13,
12,
13,
30,
41,
... | [
[
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\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.hasNextLong()) {\n\t\t\t\tlong[] num = { s.nextLong(), s.nextLong() };\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner s = null;
try {
s = new Scanner(System.in);
while (s.hasNextLong()) {
long[] num = { s.nextLong(), s.nextLong() };
System.out.println(gcd(num) + " " + lcm(num));
}
} finally {
s.close();
}
}
// ?... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.