- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 학습지
- withContext
- Kotlin
- 진짜일본어
- errorhandling
- n3문법
- GIT
- 책리뷰
- webflux
- rxjava
- coroutine
- github
- 일본어문법
- ai
- 일본어기초
- CustomTab
- 안드로이드
- pullrequest
- blog
- jlpt
- suspend
- 진짜학습지후기
- KotlinInAction
- 코틀린
- androidstudio
- posting
- 진짜학습지
- 책추천
- PR
- Android
목록알고리즘 (64)
코딩하는 개굴이
BaekJoon/BOJ [JAVA] X보다 작은 수_10871 HINT: 입력받으면서 구분해 arraylist에 넣어 주었다! import java.util.ArrayList; import java.util.Scanner; public class baekjoon_10871 { public static void main(String[] argc){ Scanner scanner = new Scanner(System.in); int iter = Integer.parseInt(scanner.next()); int num = Integer.parseInt(scanner.next()); ArrayList arrayList = new ArrayList(); for(int i=0;i
BaekJoon/BOJ [JAVA] 세 수_10817 HINT: 3개 뿐이 안되니까 기본 sort를 사용하자! Collections.sort()이다. import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class baekjoon_10817 { public static void main(String[] argc){ Scanner scanner = new Scanner(System.in); ArrayList num = new ArrayList(); for(int i=0;i
BaekJoon/BOJ [JAVA] 시험 성적_9498 HINT: 단순한 if문이다 import java.util.Scanner; public class baekjoon_9498 { public static void main(String [] argc){ Scanner scanner = new Scanner(System.in); int score = Integer.parseInt(scanner.next()); if(score>=90 && score=80 && score=70 && score=60 && score
BaekJoon/BOJ [JAVA] 숫자카드_10815 단계: Hashmap을 써서 있는지 없는지 체크하자 import java.util.*; public class baekjoon_10815 { public static void main(String [] argc){ Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.next()); HashMap hashMap = new HashMap(); ArrayList arrayList = new ArrayList(); for(int i=0;i
BaekJoon/BOJ [JAVA] 숫자카드2_10816 HINT: Hashmap을 써보자...!! 없는 데이터를 체크 할 경우 또한 고려 해야 할 것이다... import java.util.*; public class baekjoon_10816 { public static void main(String [] argc){ Scanner scanner = new Scanner(System.in); int n = Integer.parseInt(scanner.next()); HashMap hashMap = new HashMap(); ArrayList arrayList = new ArrayList(); for(int i=0;i
BaekJoon/BOJ [JAVA] 빠른 A+B_15552 HINT: BufferedReader를 사용하기에, IOException 처리가 필요하다..!! 또한, Scanner의 경우, nextInt가 존재하여, 공백에 따른 입력의 구별이 쉽지만, BufferedReader의 경우엔 다소 복잡하므로, StringTokenizer를 통해 nextToken으로 입력을 받았다. flush를 해 주지 않으면 출력이 정상적으로 진행되지 않음을 유의하자! import java.io.*; import java.util.ArrayList; import java.util.StringTokenizer; import java.util.Vector; public class baekjoon_15552 { public stati..
BaekJoon/BOJ [JAVA] 열 개씩 끊어 출력하기_11721 HINT: String으로 받은 문자열의 index가 10으로 나누어 떨어지면, "\n"을 출력하는 방식 - 그러면 처음 i가 0일 경우에도 "\n"이 되므로, 고려 해 주어야한다. import java.util.Scanner; public class baekjoon_11721 { public static void main(String[] argc){ Scanner scanner = new Scanner(System.in); String input = scanner.nextLine(); for(int i=0;i
BaekJoon/BOJ [JAVA] 숫자의 합_11720 HINT: 문자열이 공백으로 구분되어 들어오지 않기 때문에(공백없이), 우선 String으로 받고, index별로 integer로 바꾸어 합해 주었다 import java.util.Scanner; public class baekjoon_11720 { public static void main(String[] argc){ Scanner scanner = new Scanner(System.in); int iter = Integer.parseInt(scanner.next()); String input = scanner.next(); int total=0; for(int i=0;i
BaekJoon/BOJ [JAVA] 합_8393 HINT: 다 더하자 import java.util.Scanner; public class baekjoon_8393 { public static void main(String[] argc){ Scanner scanner = new Scanner(System.in); int num = Integer.parseInt(scanner.next()); int total=0; for(int i=1;i
BaekJoon/BOJ [JAVA] 2007년_1924 HINT: 달 별, 일자수를 배열로 저장 해 계산한다 import java.util.Scanner; public class baekjoon_1924 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int month = scanner.nextInt(); int date = scanner.nextInt(); int result=0; int arr[] = {0,31,28,31,30,31,30,31,31,30,31,30,31}; for(int i=1;i