| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 알고리즘
- 코딩테스트
- SWEA
- priorityqueue
- 러닝일지
- COS PRO
- greedy
- math
- 건강
- 문제해결
- Java
- 코테
- 투포인터
- DP
- 프로그래머스
- oracle
- SQL
- 이분탐색
- binary search
- 자바
- 시뮬레이션
- MySQL
- db
- BOJ
- dfs
- 문자열
- 백준
- 운동기록
- 문제풀이
- BFS
- Today
- Total
목록math (41)
슈콩
[문제]https://www.acmicpc.net/problem/1654 [소스 코드]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 k = Integer.parseInt(st.nextToken()); int n = Integer.parseInt(st.nextToken()); int[] lans = ..
Collections함수 binarySearch 사용: 시간 단축 용도 [문제]https://www.acmicpc.net/problem/2295 [소스 코드]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[] arr = new int[n]; for(int i=0;i list = new ArrayList(); for(int i=0..
[문제]https://www.acmicpc.net/problem/18870 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { StringBuilder sb = new StringBuilder(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] arr = new int[n]; StringTokenizer st = new StringTokenizer(br.read..
[문제]https://www.acmicpc.net/problem/10816 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { HashMap hm = new HashMap(); StringBuilder sb = new StringBuilder(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int n = Integer.parseInt(br.readLine()); st = new StringTokenize..
[문제]https://www.acmicpc.net/problem/1920 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { HashSet hs = new HashSet(); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int n = Integer.parseInt(br.readLine()); st = new StringTokenizer(br.readLine()); for(int i=0;i
[문제]https://www.acmicpc.net/problem/9613 [소스 코드]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; int t = Integer.parseInt(br.readLine()); while(t-->0) { st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextTok..
[문제]https://www.acmicpc.net/problem/9020 [소스 코드]import java.io.*;import java.util.*;public class Main { static boolean[] prime = new boolean[10001]; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); isPrime(); int t = Integer.parseInt(br.readLine()); while(t-->0) { int n = Integer.parseInt(br.readLine()); ..
[문제]https://www.acmicpc.net/problem/6359 [소스 코드]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 t = Integer.parseInt(br.readLine()); while(t-->0) { int n = Integer.parseInt(br.readLine()); boolean[] open = new boolean[n+1]; Arrays.fill(open, ..
[문제]https://www.acmicpc.net/problem/5347 [소스 코드]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; int t = Integer.parseInt(br.readLine()); while(t-->0) { st = new StringTokenizer(br.readLine()); long a = Long.parseLong(st.nextTok..
범위 주의 ! [문제]https://www.acmicpc.net/problem/4948 [소스 코드]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)); while(true) { int n = Integer.parseInt(br.readLine()); if(n==0) break; if(n==1) { System.out.println(1); continue; } int result = 0;..