[JAVA][Baekjoon] 21568번 Ax+By=C 🌟🌟
·
Coding Test/Baekjoon
import java.io.*;import java.util.ArrayList;import java.util.Scanner;import java.util.StringTokenizer;public class Main { public static void main(String []args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringTokenizer st = new StringTokenizer(b..
[JAVA][Baekjoon] 1033번 칵테일 🌟🌟
·
Coding Test/Baekjoon
import java.io.*;import java.util.ArrayList;import java.util.Scanner;public class Main { static ArrayList[] A; static long lcm; static boolean visited[]; static long D[]; public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = sc.nextInt..
[JAVA][Baekjoon] 1850번 최대공약수 🌟🌟
·
Coding Test/Baekjoon
import java.io.*;import java.util.Scanner;public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); long a = sc.nextLong(); long b = sc.nextLong(); long result = gcd(a, b); while(result>0) { bw.write("1"); ..
[JAVA][Baekjoon] 1934번 최소공배수 🌟🌟
·
Coding Test/Baekjoon
import java.io.*;import java.util.Scanner;public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); for(int i = 0; i