[프로그래머스] 콜라 문제
Algorithm/프로그래머스2024. 9. 30. 09:54[프로그래머스] 콜라 문제

https://school.programmers.co.kr/learn/courses/30/lessons/132267 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 📌 정답class Solution { public int solution(int a, int b, int n) { int answer = 0; while(n >= a) { answer += (n / a) * b; n = n % a + (n / a) * b; } return answer; ..

[프로그래머스] 가장 가까운 같은 글자
Algorithm/프로그래머스2024. 9. 25. 23:47[프로그래머스] 가장 가까운 같은 글자

https://school.programmers.co.kr/learn/courses/30/lessons/142086 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 📌 내가 구현한 정답class Solution { public int[] solution(String s) { int[] answer = new int[s.length()]; answer[0] = -1; for(int i = 1; i=0; j--) { if(s.charAt(i) == s.charAt(j)) { ..

[프로그래머스] 두 개 뽑아서 더하기
Algorithm/프로그래머스2024. 9. 24. 10:05[프로그래머스] 두 개 뽑아서 더하기

https://school.programmers.co.kr/learn/courses/30/lessons/68644?language=java 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr두 개 뽑아서 더하기(#39) 주어진 숫자 배열의 모든 쌍의 합을 구하고, 중복을 제거한 후 오름차순으로 졍렬된 결과 반환 📌 내가 구현한 정답import java.util.ArrayList;import java.util.Arrays;import java.util.HashSet;import java.util.List;import java.util.Set;public class..

[프로그래머스] 숫자 문자열과 영단어
Algorithm/프로그래머스2024. 9. 23. 20:33[프로그래머스] 숫자 문자열과 영단어

https://school.programmers.co.kr/learn/courses/30/lessons/81301?language=java 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr📌 내가 구현한 정답class Solution { public int solution(String s) { String[] numbers = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"}; String answer = s; for (in..

image