Java (501) 썸네일형 리스트형 [JAVA] SWEA 2050. 알파벳을 숫자로 변환 https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=1&contestProbId=AV5QLGxKAzQDFAUq&categoryId=AV5QLGxKAzQDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=JAVA&select-1=1&pageSize=10&pageIndex=1 SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com 정답 import java.util.Scanner;class Solution{ public static void main.. [JAVA] 프로그래머스 - 삼각형의 완성조건(1) https://school.programmers.co.kr/learn/courses/30/lessons/120889 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 정답 class Solution { public int solution(int[] sides) { int answer = 0; int a = sides[0]; int b = sides[1]; int c = sides[2]; int max = sides[0]; for(int i=1; i [JAVA] 프로그래머스 - 중복된 문자 제거 https://school.programmers.co.kr/learn/courses/30/lessons/120888 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 정답 import java.util.*;class Solution { public String solution(String my_string) { StringBuilder answer = new StringBuilder(); LinkedHashSet set = new LinkedHashSet(); for(int i=0; i [JAVA] 프로그래머스 - 배열 원소의 길이 https://school.programmers.co.kr/learn/courses/30/lessons/120854 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 정답 class Solution { public int[] solution(String[] strlist) { int[] answer = new int[strlist.length]; for(int i=0 ;i [JAVA] 프로그래머스 - 컨트롤 제트 https://school.programmers.co.kr/learn/courses/30/lessons/120853 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 정답 import java.util.*;class Solution { public int solution(String s) { int answer = 0; List numbers = new ArrayList(); StringTokenizer st = new StringTokenizer(s, " "); while (st.h.. [JAVA] 프로그래머스 - 소인수분해 https://school.programmers.co.kr/learn/courses/30/lessons/120852 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr - 소인수분해를 하려는 수 n을 2부터 n까지 모두 나눠보기- 만약 나눠진다면 해당 수는 N의 인수가 됨 정답 import java.util.*;class Solution { public int[] solution(int n) { ArrayList list = new ArrayList(); for(int i=2; i [JAVA] 프로그래머스 - 숨어있는 숫자의 덧셈(1) https://school.programmers.co.kr/learn/courses/30/lessons/120851 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 정답 class Solution { public int solution(String my_string) { int answer = 0; for(int i=0; i [JAVA] 프로그래머스 - 문자열 정렬하기(1) https://school.programmers.co.kr/learn/courses/30/lessons/120850 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr char to int 1) '0'을 빼주기(ASCII code 사용) - 아스키 코드 표를 살펴보면 문자 0~9는 48~57의 순서로 되어 있다. - 따라서 문자 '1'의 아스키코드에서 문자 '0'의 아스키 코드를 빼주면 원하는 숫자 1을 얻을 수 있다. 정답 import java.util.*;class Solution { public int[] solution(String my_stri.. 이전 1 ··· 20 21 22 23 24 25 26 ··· 63 다음