본문 바로가기

Java

(501)
[JAVA] 프로그래머스 - 문자열 다루기 기본 https://school.programmers.co.kr/learn/courses/30/lessons/12918 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr    정답   class Solution { public boolean checkDigit(String s) { boolean check = true; char ch[] = s.toCharArray(); for(int i=0; i   다른 사람의 풀이  class Solution { public boolean solution(String s) { ..
[JAVA] 프로그래머스 - 부족한 금액 계산하기 https://school.programmers.co.kr/learn/courses/30/lessons/82612 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr    정답  class Solution { public long solution(int price, int money, int count) { long answer = 0; for(int i=1; i
[JAVA] 프로그래머스 - 내적 https://school.programmers.co.kr/learn/courses/30/lessons/70128 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr    정답  class Solution { public int solution(int[] a, int[] b) { int answer = 0; for(int i=0; i
[JAVA] 프로그래머스 - 약수의 개수와 덧셈 https://school.programmers.co.kr/learn/courses/30/lessons/77884 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr   정답  class Solution { public int count (int n) { int cnt = 0; //약수의 개수 for(int i=1; i  다른 사람의 풀이  class Solution { public int solution(int left, int right) { int answer = 0; for (int i=l..
[JAVA] SWEA 2817. 부분 수열의 합 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV7IzvG6EksDFAXB&categoryId=AV7IzvG6EksDFAXB&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=10&pageIndex=2 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com    정답  https://velog.io/@sua_ahn/SWEA-2817-%EB%B6%80%EB%B6%84-%EC%88%98%..
[JAVA] SWEA 1209. [S/W 문제해결 기본] 2일차 - Sum https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV13_BWKACUCFAYh&categoryId=AV13_BWKACUCFAYh&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=10&pageIndex=1&&&&&&&&&& SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com   정답  import java.util.*;public class Solution { public stati..
[JAVA] SWEA 1220. [S/W 문제해결 기본] 5일차 - Magnetic https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=3&contestProbId=AV14hwZqABsCFAYD&categoryId=AV14hwZqABsCFAYD&categoryType=CODE&problemTitle=&orderBy=RECOMMEND_COUNT&selectCodeLang=JAVA&select-1=3&pageSize=10&pageIndex=1 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com   [SWEA] 1220 : Magnetic - Python (velog.io) [SWEA] 1220 : Magnetic - Py..
[JAVA] 프로그래머스 - 문자열 내림차순으로 배치하기 https://school.programmers.co.kr/learn/courses/30/lessons/12917 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr    정답   import java.util.*;class Solution { public String solution(String s) { StringBuilder answer = new StringBuilder(); String str[] = s.split(""); Arrays.sort(str, Collections.rever..