분류 전체보기
-
[프로그래머스, Lv1] 최대공약수와 최소공배수카테고리 없음 2024. 9. 3. 16:49
문제설명두 수를 입력받아 두 수의 최대공약수와 최소공배수를 반환하는 함수, solution을 완성해 보세요. 배열의 맨 앞에 최대공약수, 그다음 최소공배수를 넣어 반환하면 됩니다. 예를 들어 두 수 3, 12의 최대공약수는 3, 최소공배수는 12이므로 solution(3, 12)는 [3, 12]를 반환해야 합니다.제한사항두 수는 1이상 1000000이하의 자연수입니다.접근 방법 최종코드class Solution { public int swap(int a, int b) { return a; } public int euclidean(int a, int b) { int minNum = Math.min(a, b); int maxNum = Math..
-
[주특기 주차 2차 과제] ERD & API 명세서 2차 수정부트캠프/과제 2024. 9. 2. 16:46
📅ScheduleManager_extension 소개📌ERDTABLE Schedule이름타입제약조건설명schedule_idintegerPK, AUTO_INCREMENT일정의 고유번호, PKschedule_titleVARCHAR(20)NOT NULL스케쥴 제목schedule_dataVARCHAR(100)NOT NULL스케쥴 내용writerVARCHAR(20)NOT NULL작성자 이름create_datetimeVARCHAR(20)NOT NULL수정일자, DATETIME 형식edit_datetimeVARCHAR(20)NOT NULL작성일자, DATETIME 형식상세 설명TABLE Scheduleschedule_id : 스케쥴을 추가하거나 삭제할 때, ID를 기준으로 참조. 그만큼 핵심 Column이기도 ..
-
[프로그래머스, Lv1] 푸드 파이터 대회알고리즘 문제/Java 2024. 8. 30. 17:10
코딩테스트 연습 - 푸드 파이트 대회 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 문제설명수웅이는 매달 주어진 음식을 빨리 먹는 푸드 파이트 대회를 개최합니다. 이 대회에서 선수들은 1대 1로 대결하며, 매 대결마다 음식의 종류와 양이 바뀝니다. 대결은 준비된 음식들을 일렬로 배치한 뒤, 한 선수는 제일 왼쪽에 있는 음식부터 오른쪽으로, 다른 선수는 제일 오른쪽에 있는 음식부터 왼쪽으로 순서대로 먹는 방식으로 진행됩니다. 중앙에는 물을 배치하고, 물을 먼저 먹는 선수가 승리하게 됩니다. 이때, 대회..
-
[주특기 주차 2차 과제] ERD & API 명세서부트캠프/과제 2024. 8. 29. 16:46
📅ScheduleManager_extension 소개📌ERDTABLE Schedule이름타입제약조건설명schedule_idintegerPK, AUTO_INCREMENT일정의 고유번호, PKschedule_titleVARCHAR(20)NOT NULL스케쥴 제목schedule_dataVARCHAR(100)NOT NULL스케쥴 내용manager_nameVARCHAR(20)NOT NULL담당자 이름create_datetimeVARCHAR(20)NOT NULL수정일자, DATETIME 형식edit_datetimeVARCHAR(20)NOT NULL작성일자, DATETIME 형식상세 설명TABLE Scheduleschedule_id : 스케쥴을 추가하거나 삭제할 때, ID를 기준으로 참조. 그만큼 핵심 Colu..
-
[프로그래머스, Lv1] 2016년카테고리 없음 2024. 8. 28. 15:17
코딩테스트 연습 - 2016년 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 문제설명2016년 1월 1일은 금요일입니다. 2016년 a월 b일은 무슨 요일일까요? 두 수 a ,b를 입력받아 2016년 a월 b일이 무슨 요일인지 리턴하는 함수, solution을 완성하세요. 요일의 이름은 일요일부터 토요일까지 각각 SUN,MON,TUE,WED,THU,FRI,SAT입니다. 예를 들어 a=5, b=24라면 5월 24일은 화요일이므로 문자열 "TUE"를 반환하세요.제한사항2016년은 윤년입니다.2016년 a월..
-
[프로그래머스, Lv1] 숫자 짝꿍알고리즘 문제/Java 2024. 8. 27. 15:12
코딩테스트 연습 - 숫자 짝꿍 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 문제설명두 정수 X, Y의 임의의 자리에서 공통으로 나타나는 정수 k(0 ≤ k ≤ 9)들을 이용하여 만들 수 있는 가장 큰 정수를 두 수의 짝꿍이라 합니다(단, 공통으로 나타나는 정수 중 서로 짝지을 수 있는 숫자만 사용합니다). X, Y의 짝꿍이 존재하지 않으면, 짝꿍은 -1입니다. X, Y의 짝꿍이 0으로만 구성되어 있다면, 짝꿍은 0입니다.예를 들어, X = 3403이고 Y = 13203이라면, X와 Y의 짝꿍은 X와 ..
-
[프로그래머스, Lv1] 둘만의 암호알고리즘 문제/Java 2024. 8. 26. 14:40
https://school.programmers.co.kr/learn/courses/30/lessons/155652 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr문제설명두 문자열 s와 skip, 그리고 자연수 index가 주어질 때, 다음 규칙에 따라 문자열을 만들려 합니다. 암호의 규칙은 다음과 같습니다.문자열 s의 각 알파벳을 index만큼 뒤의 알파벳으로 바꿔줍니다.index만큼의 뒤의 알파벳이 z를 넘어갈 경우 다시 a로 돌아갑니다.skip에 있는 알파벳은 제외하고 건너뜁니다.예를 들어 s = "aukks", skip = "wbqd", index = ..
-
[프로그래머스, Lv1] 성격 유형 검사하기알고리즘 문제/Java 2024. 8. 23. 14:13
코딩테스트 연습 - 성격 유형 검사하기 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 문제설명나만의 카카오 성격 유형 검사지를 만들려고 합니다.성격 유형 검사는 다음과 같은 4개 지표로 성격 유형을 구분합니다. 성격은 각 지표에서 두 유형 중 하나로 결정됩니다.지표 번호성격 유형1번 지표라이언형(R), 튜브형(T)2번 지표콘형(C), 프로도형(F)3번 지표제이지형(J), 무지형(M)4번 지표어피치형(A), 네오형(N)4개의 지표가 있으므로 성격 유형은 총 16(=2 x 2 x 2 x 2)가지가 나올 수..