| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 |
| 31 |
- 이분탐색
- 시뮬레이션
- math
- BFS
- Java
- 건강
- 문자열
- binary search
- 프로그래머스
- 문제해결
- 투포인터
- SQL
- DP
- greedy
- SWEA
- COS PRO
- 러닝일지
- 운동기록
- 문제풀이
- 코딩테스트
- dfs
- BOJ
- 자바
- 코테
- db
- 알고리즘
- priorityqueue
- 백준
- MySQL
- oracle
- Today
- Total
목록Java (469)
슈콩
[문제]https://www.acmicpc.net/problem/2839 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int result = Integer.MAX_VALUE; for(int i=0;3*i
[문제]https://www.acmicpc.net/problem/2312 [소스 코드]import java.io.*;import java.util.*;public class Main { static boolean[] prime = new boolean[100001]; static List list = new ArrayList(); public static void main(String[] args) throws IOException { isPrime(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int t = Integer.parseInt(br.readLine()); while(t-->0) { int n..
[문제]https://www.acmicpc.net/problem/2292 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int i = 1; int cnt = 1; while(n>cnt) { cnt += 6 * i; i++; } System.out.println(i); }}
[문제]https://www.acmicpc.net/user/sheep0125 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); long n = Long.parseLong(br.readLine()); StringBuilder sb = new StringBuilder(); if(n==0) { System.out.println(0); return; } while(n..
[문제]https://www.acmicpc.net/problem/2004 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); long n = Long.parseLong(st.nextToken()); long m = Long.parseLong(st.nextToken()); int two = cnt(..
[문제]https://www.acmicpc.net/problem/1963 [소스 코드]import java.io.*;import java.util.*;public class Main { static int a,b; static boolean[] prime = new boolean[10000]; public static void main(String[] args) throws IOException { isPrime(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int t = Integer.parseInt(br.readLine()); while(t-->..
[문제]https://www.acmicpc.net/problem/1929 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,m; static boolean[] prime = new boolean[1000001]; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); m = Integer.parseInt(st.nex..
[문제]https://www.acmicpc.net/problem/1790 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); int k = Integer.parseInt(st.nextToken()); ..
prime을 구하는 경우, 제곱근까지 확인 => 소수 정리 완료 후, 범위 내 prime list에 저장 ! [문제]https://www.acmicpc.net/problem/1747 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n; static boolean[] prime = new boolean[2000001]; static List list = new ArrayList(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(Syste..
[문제]https://www.acmicpc.net/problem/1735 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int a1 = Integer.parseInt(st.nextToken()); int b1 = Integer.parseInt(st.nextToken()..