알고리즘/백준 (3) 썸네일형 리스트형 [백준] 1004번 자바 정답 코드 import java.util.Scanner; public class Baek1004 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int T; int x1,y1, x2,y2; double[] d1, d2; int n; int cont = 0; int[] cx, cy, r; T = sc.nextInt(); for(int t = 0 ; t < T;t++){ cont = 0; x1 = sc.nextInt(); y1 = sc.nextInt(); x2 = sc.nextInt(); y2 = sc.nextInt(); n = sc.nextInt(); cx = new int[n]; cy = new int[n]; r.. [백준] 1003번 자바 정답 코드 import java.util.Scanner; public class Baek1003 { public static void main(String[] args){ int T; int n; int[] a,b; Scanner sc = new Scanner(System.in); T = sc.nextInt(); for(int i = 0 ; i < T; i++){ n = sc.nextInt(); a = new int[n+2]; b = new int[n+2]; a[0] = 1; a[1] = 0; b[0] = 0; b[1] = 1; if(n == 0) System.out.println(1+" "+0); else if(n==1) System.out.println(0+" "+1); else{ for(int j .. [백준] 1002번 자바 오류 코드 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T; T = sc.nextInt(); int x1, y1, r1, x2, y2, r2; double d; for (int i = 0; i < T; i++) { x1 = sc.nextInt(); y1 = sc.nextInt(); r1 = sc.nextInt(); x2 = sc.nextInt(); y2 = sc.nextInt(); r2 = sc.nextInt(); d = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)); i.. 이전 1 다음