| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- greedy
- priorityqueue
- SQL
- 투포인터
- COS PRO
- BFS
- 문제해결
- 코딩테스트
- 문자열
- SWEA
- Java
- dfs
- 백준
- DP
- 코테
- 알고리즘
- 건강
- 시뮬레이션
- oracle
- BOJ
- binary search
- 이분탐색
- db
- 프로그래머스
- 러닝일지
- 운동기록
- 문제풀이
- 자바
- MySQL
- Today
- Total
목록Java (469)
슈콩
class Solution { public int solution(String str1, String str2) { int answer = str1.length(); str1 = str1.replaceAll(str2,""); if(answer != str1.length()){ answer = 1; } else answer = 2; return answer; }}
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/140108 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]class Solution { public int solution(String s) { int answer = 1; char c = s.charAt(0); int cnt = 1; for(int i=1;i
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12915 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public String[] solution(String[] strings, int n) { int l = strings.length; String[] answer = new String[l]; for(int i=0;i{ if(a.charAt(n)==b.charAt(n)){ ret..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/147355 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]class Solution { public int solution(String t, String p) { int answer = 0; int n = p.length(); long target = Long.parseLong(p); // p를 long으로 변환 for (int i = 0; i
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12921 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]class Solution { public int solution(int n) { boolean[] composite = new boolean[n+1]; composite[1] = true; for(int i=2;i*i
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/43238 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public long solution(int n, int[] times) { Arrays.sort(times); long left = 1; long right = (long)times[times.length - 1] * n; while(left=n; }}
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12982 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public int solution(int[] d, int budget) { Arrays.sort(d); int n = d.length; int sum = 0; int answer = 0; for(int i=0;i
[문제]코딩테스트 연습 - 체육복 | 프로그래머스 스쿨 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public int solution(int n, int[] lost, int[] reserve) { HashSet lost_hs = new HashSet(); HashSet reserve_hs = new HashSet(); for(int i : lost) lost_hs.add(i); for(int i : reserve) { if(lost_hs.contains..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/42840 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { static class Exam{ int num,score; Exam(int num,int score){ this.num = num; this.score = score; } } public int[] solution(int[] answers) { int n = an..
[문제]코딩테스트 연습 - 소수 찾기 | 프로그래머스 스쿨 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { static boolean[] composite = new boolean[10000000]; static boolean[] visit; static String input,s; static int n,answer; static Set hs = new HashSet(); public int solution(String numbers) { input = numbers; com..