전체 글
-
[프로그래머스, Lv1] 과일장수알고리즘 문제/Java 2024. 7. 30. 22:51
코딩테스트 연습 - 과일 장수 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 문제설명과일 장수가 사과 상자를 포장하고 있습니다. 사과는 상태에 따라 1점부터 k점까지의 점수로 분류하며, k점이 최상품의 사과이고 1점이 최하품의 사과입니다. 사과 한 상자의 가격은 다음과 같이 결정됩니다.한 상자에 사과를 m개씩 담아 포장합니다. 상자에 담긴 사과 중 가장 낮은 점수가 p (1 ≤ p ≤ k)점인 경우, 사과 한 상자의 가격은 p * m 입니다.과일 장수가 가능한 많은 사과를 팔았을 때, 얻을 수 있는 ..
-
[프로그래머스, Lv1] 카드뭉치알고리즘 문제/Java 2024. 7. 29. 21:12
코딩테스트 연습 - 카드 뭉치 | 프로그래머스 스쿨 (programmers.co.kr) 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr 문제설명코니는 영어 단어가 적힌 카드 뭉치 두 개를 선물로 받았습니다. 코니는 다음과 같은 규칙으로 카드에 적힌 단어들을 사용해 원하는 순서의 단어 배열을 만들 수 있는지 알고 싶습니다.원하는 카드 뭉치에서 카드를 순서대로 한 장씩 사용합니다.한 번 사용한 카드는 다시 사용할 수 없습니다.카드를 사용하지 않고 다음 카드로 넘어갈 수 없습니다.기존에 주어진 카드 뭉치의 단어 순서는 바꿀 수 없습니다.예를 들어 첫 번째 카드 뭉..
-
[Java 개인과제] 계산기 Lv1부트캠프/과제 2024. 7. 26. 22:42
과제 요구사항 정리1. Scanner를 사용하여 양의 정수 2개(0 포함)를 전달 받을 수 있습니다.2. Scanner를 사용하여 사칙연산 기호를 전달 받을 수 있습니다.3. 입력받은 양의 정수 2개와 사칙연산 기호를 사용하여 연산을 진행한 후 결과값을 출력합니다.4. 반복문을 사용하여 반복의 종료를 알려주는 “exit” 문자열을 입력하기 전까지 무한으로 계산을 진행할 수 있도록 소스 코드를 수정합니다.5. 연산 결과 10개를 저장할 수 있는 배열을 선언 및 생성하고 연산의 결과를 저장합니다.6. 연산 결과가 10개를 초과하는 경우 가장 먼저 저장된 결과를 삭제하고, 새로운 연산 결과가 저장될 수 있도록 소스 코드를 수정합니다.7. 연산 결과가 10개로 고정되지 않고 무한이 저장될..
-
[IntelliJ] 한글 깨짐 오류부트캠프/프로젝트 2024. 7. 26. 20:12
IntelliJ에서 프로그램을 사용할 경우 한글이 깨져서 나온다는 문제가 발생했다. 해당 에러를 해결하기 위해 우선 1. Global / Project encoding / Default encoding for properites files를 UTF-8로 변경 해당 Encoding 내용을 UTF-8로 변경 했지만, 실패했다. 2. CustomVMOption 변경-Xmx4063m-Dfile.encoding=UTF-8-Dconsole.encoding=UTF-8해당 내용에-Dfile.encoding=UTF-8-Dconsole.encoding=UTF-8을 추가해줬지만, 실패했다. 3. Build, Run 설정 변경 해당 화면에 있는 Build and run using을 Gradle에서 IntelliJ IDEA로..
-
[프로그래머스, Lv1] 2016년카테고리 없음 2024. 7. 25. 21:29
코딩테스트 연습 - 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..