일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- DBMS
- 오블완
- rsync
- MongoDB
- spring
- JPA
- 트랜잭션
- docker
- mssql
- mysql
- PostgreSQL
- oracle
- network
- 명령어
- IntelliJ
- API
- SQL
- 자바
- analytics4
- Javascript
- 차이점
- java
- group by
- top
- MariaDB
- Linux
- Python
- 티스토리챌린지
- git
- 리눅스
- Today
- Total
목록Study/ALGORITHM (42)
hanker
import java.util.Scanner; public class Main { public static StringBuilder sb = new StringBuilder(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); sb.append((int) (Math.pow(2, n) - 1)).append('\n'); Move(n, 1, 2, 3); System.out.println(sb); } static void Move(int n, int A, int B, int C){ if(n == 1){ sb.append(A + " " + C + "\n"); return; } Mov..
import java.io.*; public class Main { private static final String zero = " "; private static final String s = "*"; public static void main(String[] args) throws IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int n = Integer.parseInt(bf.readLine()); for(int i = 0 ; i < n ; i++){ fo..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int tmp = 0; int befNum = 1, aftNum = 1; if(n == 1 || n == 2){ tmp = 1; } else { for(int i = 3 ; i
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int val = 0; int tmp = n; if(n == 0){ System.out.println(1); } else { for(int i = 1 ; i
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); for(int i = 0 ; i < n ; i++){ int x1 = sc.nextInt(); int y1 = sc.nextInt(); int r1 = sc.nextInt(); int x2 = sc.nextInt(); int y2 = sc.nextInt(); int r2 = sc.nextInt(); int v = (int)(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); double plusR = Math.pow(..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); double euclid = Math.PI * (Math.pow(n, 2)); double taxicap = 2 * (Math.pow(n, 2)); System.out.println(String.format("%.6f", euclid)); System.out.println(String.format("%.6f", taxicap)); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(true){ int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); if(a == 0 && b == 0 && c == 0){ break; } if((a * a) + (b * b) == c * c){ System.out.println("right"); } else if((c * c) + (b * b) == a * a){ System.out.println("right"); } else if((a * a) + (c * ..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int d = sc.nextInt(); int e = sc.nextInt(); int f = sc.nextInt(); int x = a; int y = b; if(x == c){ x = e; } else if (x == e){ x = c; } if(y == d){ y = f; } else if(y == f){ y = d; } System.out.println(x + " ..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); int w = sc.nextInt(); int h = sc.nextInt(); int xLen = Math.min(x, w-x); int yLen = Math.min(y, h-y); System.out.println(Math.min(xLen, yLen)); } }
import java.util.Scanner; public class Main { public static boolean[] prime = new boolean[10001]; public static void main(String[] ar){ Scanner sc = new Scanner(System.in); get_prime(); int T = sc.nextInt(); while(T-- > 0){ int n = sc.nextInt(); int a = n / 2; int b = n / 2; while(true){ if(!prime[a] && !prime[b]){ System.out.println(a + " " + b); break; } a--; b++; } } } private static void get..