분류 전체보기
-
[SQL] SQL 기본 문법 - Select카테고리 없음 2024. 6. 17. 17:47
기본 문법Select 명령문의 기본 문법은 다음과 같다.SELECT 속성명1, 속성명2 FROM 테이블 명1, ...[WHERE 조건][GROUP BY 속성명1, ...][HAVING 그룹 조건][ORDER BY 속성 [ASC | DESC]]; 대괄호 ( [ ] ) 쳐진 것은 옵션으로 꼭 들어갈 필요는 없는 문법들이다. SELECT, FROM 절Select절은 검색하고자 하는 속성명과 계산식이 들어간다.From절에는 검색에 사용할 테이블 명이 들어간다.-- SELECT '속성명' FROM '테이블명'SELECT student_number, name FROM student;-- 속성에 *을 넣을 경우 테이블에 있는 모든 컬럼이 보여진다. SELECT * FROM student;-- SELECT '속성명'..
-
[내배캠, Lv2] 자판기알고리즘 문제/Java 2024. 6. 14. 17:18
문제문제1 : 자바/코틀린 코드를 이용하여 자판기를 만들어봅시다.사용자가 볼 수 있게 메뉴를 표시합니다.사이다 1,700원콜라 1,900원식혜 2,500원솔의눈 3,000원 사용자는 음료를 선택할 수 있습니다.사용자에게 어떤 음료를 살 것인지를 입력받습니다.ex) 사이다 사용자는 지불할 금액을 입력할 수 있습니다. 사용자에게 얼마를 넣을지 입력받습니다.ex) 2000 사용자는 음료를 구매하고 남은 잔액을 확인할 수 있습니다. 문제 접근 문제를 풀기전 나는 다음과 같은 계획을 세웠다.Map을 활용한 메뉴 관리구매, 충전, 반환 및 종료 메뉴 입력받은 문자열을 사용하여 Map에서 데이터 참조하기 해당 계획대로 구현하기 위해 나는 다음과 같은 내용을 학습해야할 필요가 있었다.Java의 Map객체 생성 및 초..
-
2024.06.14 TIL부트캠프/TIL 2024. 6. 14. 17:15
학습한 내용Java 기본 문법1. 문자열 입력Scanner와 버퍼2. MapHashMap의 구조 & InitializeHashMap의 Foreach 구문HashMap 사용3. Lambda 문제 풀이간단한 기능이 추가된 자판기 [Lv2] 자판기 :: 껀's 알고리즘 (tistory.com) [Lv2] 자판기문제문제1 : 자바/코틀린 코드를 이용하여 자판기를 만들어봅시다.사용자가 볼 수 있게 메뉴를 표시합니다.사이다 1,700원콜라 1,900원식혜 2,500원솔의눈 3,000원 사용자는 음료를 선택할 수 있습니choni.tistory.com
-
2024.06.13 TIL부트캠프/TIL 2024. 6. 13. 21:14
학습한 내용Java 기본 문법1. 문자열 출력System.out.PrintSystem.out.PrintlnSystem.out.printf2. 문자열 입력Scanner3. ListArrayListLinkedList4. Random 문제 풀이재설정 기능이 추가된 랜덤 닉네임 생성기 [Lv1] 랜덤 닉네임 생성기 :: 껀's 알고리즘 (tistory.com) [Lv1] 랜덤 닉네임 생성기문제문제1 : 랜덤한 닉네임을 생성하는 자바/코틀린 코드를 작성해보세요.사용자는 최소 27가지 이상의 닉네임 중 하나를 랜덤으로 출력 할 수 있습니다. (아래의 키워드를 사용해주세요!)기철초choni.tistory.com
-
[내배캠, Lv1] 랜덤 닉네임 생성기알고리즘 문제/Java 2024. 6. 13. 21:06
문제문제1 : 랜덤한 닉네임을 생성하는 자바/코틀린 코드를 작성해보세요.사용자는 최소 27가지 이상의 닉네임 중 하나를 랜덤으로 출력 할 수 있습니다. (아래의 키워드를 사용해주세요!)기철초풍, 멋있는, 재미있는도전적인, 노란색의, 바보같은돌고래, 개발자, 오랑우탄문제 접근 문제를 풀기전 나는 다음과 같은 계획을 세웠다.3가지 키워드를 각각 List에 삽입한다.Random 객체를 활용하여 0 ~ 2사이의 난수를 생성한다.해당 난수에 해당하는 문자열을 연결하여 출력한다.해당 계획대로 구현하기 위해 나는 다음과 같은 내용을 학습해야할 필요가 있었다.문자열 출력Java의 List 객체 생성 및 초기화Random 객체 사용법계획대로 구현한 코드import java.util.Arrays;import java.ut..
-
[Programmers] Lv3. 징검다리 건너기알고리즘 문제/C++ 2021. 8. 30. 00:57
https://programmers.co.kr/learn/courses/30/lessons/64062 코딩테스트 연습 - 징검다리 건너기[2, 4, 5, 3, 2, 1, 4, 2, 5, 1] 3 3programmers.co.kr문제 설명[본 문제는 정확성과 효율성 테스트 각각 점수가 있는 문제입니다.]카카오 초등학교의 "니니즈 친구들"이 "라이언" 선생님과 함께 가을 소풍을 가는 중에 징검다리가 있는 개울을 만나서 건너편으로 건너려고 합니다. "라이언" 선생님은 "니니즈 친구들"이 무사히 징검다리를 건널 수 있도록 다음과 같이 규칙을 만들었습니다.징검다리는 일렬로 놓여 있고 각 징검다리의 디딤돌에는 모두 숫자가 적혀 있으며 디딤돌의 숫자는 한 번 밟을 때마다 1씩 줄어듭니다.디딤돌의 숫자가 0이 되면 더..
-
[Programmers] Lv3. 자물쇠와 열쇠 풀이알고리즘 문제/C++ 2021. 8. 9. 19:58
https://programmers.co.kr/learn/courses/30/lessons/60059 코딩테스트 연습 - 자물쇠와 열쇠 [[0, 0, 0], [1, 0, 0], [0, 1, 1]] [[1, 1, 1], [1, 1, 0], [1, 0, 1]] true programmers.co.kr 문제 설명 고고학자인 "튜브"는 고대 유적지에서 보물과 유적이 가득할 것으로 추정되는 비밀의 문을 발견하였습니다. 그런데 문을 열려고 살펴보니 특이한 형태의 자물쇠로 잠겨 있었고 문 앞에는 특이한 형태의 열쇠와 함께 자물쇠를 푸는 방법에 대해 다음과 같이 설명해 주는 종이가 발견되었습니다. 잠겨있는 자물쇠는 격자 한 칸의 크기가 1 x 1인 N x N 크기의 정사각 격자 형태이고 특이한 모양의 열쇠는 M x M..