본문 바로가기

[백준/Java] 25304번: 영수증 반복문을 활용해서 문제풀이에 접근해보자 import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int totalAmount = scan.nextInt(); int totalCount = scan.nextInt(); for (int i = 0; i < totalCount; i++) { int amount = scan.nextInt() * scan.nextInt(); totalAmount -= am.. 더보기
[백준/Java] 2480번: 주사위 세개 노가다성 문제를 끝으로.. 조건문 완료~! import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); List numberArr = new ArrayList(); numberArr.add(scan.nextInt()); numberArr.add(scan.nextInt()); numberArr.add(scan.nextInt()); Collections.sort(numberArr, Collections... 더보기
[백준/Java] 2525번: 오븐 시계 생각보다? 오래 걸린 문제... 맞았습니다만 너무 어렵게 접근 했다. import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String time = scan.nextLine(); String[] timeArr = time.split(" "); int oriHour = Integer.parseInt(timeArr[0]); int oriMin = Integer.parseInt(timeArr[1]); int timeTaken = Integer.parseInt(scan.nextLine()); int cnt = 0; while (timeTake.. 더보기
Spring Boot+JPA+MySQL 테이블 생성 안될 때 (feat. Maven dependency 추가) Error Message #1 myspringframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0; nested exception is org... 더보기
Spring Boot+JPA+H2 로 Test Code 실행 시 테이블 생성 안될 때 1. (Maven 프로젝트 일 경우) pom.xml 파일에 의존성 추가 org.springframework.boot spring-boot-starter-data-jpa 2.6.10 com.h2database h2 runtime 2. application-test.properties 파일에 DB 및 JPA 관련 설정 spring.datasource.driver-class-name = org.h2.Driver spring.datasource.url = jdbc:h2:mem:test spring.datasource.username = sa spring.datasource.password = sa spring.jpa.database-platform = org.hibernate.dialect.H2Dialect 3.. 더보기
[Eclipse+Spring+Maven] 웹 프로젝트 Import 후 환경 세팅(feat.tomcat server) 기존의 메이븐 프로젝트를 내 로컬에서 Import 할 때, 프로젝트 폴더에 빨간느낌표 (Error표시)를 보게된다면? 다음의 3가지를 유의하며 환경 설정을 하도록 하자. JRE Maven Tomcat 1. JRE 설정 OpenJDK를 다운받아서 사용할 경우 (필자는 OpenJDK 1.8를 사용한다) https://github.com/ojdkbuild/ojdkbuild GitHub - ojdkbuild/ojdkbuild: Community builds using source code from OpenJDK project Community builds using source code from OpenJDK project - GitHub - ojdkbuild/ojdkbuild: Community builds .. 더보기
[백준/Java] 10430번: 나머지 문제 다시보기 10430번: 나머지 첫째 줄에 A, B, C가 순서대로 주어진다. (2 ≤ A, B, C ≤ 10000) www.acmicpc.net 성공한 코드 더보기
insmod | insmod sudo insmod [파일명] sudo insmod [led_dev.ko] cat명령어로 /proc/devices경로에 알맞게 적재되었는지 확인 더보기