728x90 반응형 분류 전체보기273 프로그래머스 - 삼총사 class Solution { public int solution(int[] number) { int answer = 0; int len = number.length; for(int i=0; i 2023. 3. 28. 프로그래머스 - 예산 import java.util.*; class Solution { public int solution(int[] d, int budget) { int answer = 0; int money = budget; Arrays.sort(d); for(int i=0; i 2023. 3. 28. 프로그래머스 - 시저 암호 class Solution { public String solution(String s, int n) { String answer = ""; String[] str = s.split(""); for(int i=0; i=65 && str[i].charAt(0)90){ // Z를 넘는 경우 int num = 64+(str[i].charAt(0) + n)-90; str[i] = String.valueOf((char)num); }else{ int num = str[i].charAt(0) + n; str[i] = String.valueOf((char)num); } } else if(str[i].charAt(0)>=97 && str[i].charAt(0)122){ // z를 넘는 경우 int num = 96+(st.. 2023. 3. 28. 프로그래머스 - 이상한 문자 만들기 class Solution { public String solution(String s) { String answer = ""; String[] str = s.split(""); int count = 0; for(int i=0; i 2023. 3. 27. 이전 1 ··· 11 12 13 14 15 16 17 ··· 69 다음 728x90 반응형