본문 바로가기

전체 글

(150)
백준 25304 영수증 https://www.acmicpc.net/problem/25304 25304번: 영수증 준원이는 저번 주에 살면서 처음으로 코스트코를 가 봤다. 정말 멋졌다. 그런데, 몇 개 담지도 않았는데 수상하게 높은 금액이 나오는 것이다! 준원이는 영수증을 보면서 정확하게 계산된 것 www.acmicpc.net import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int N = sc.nextInt(); int sum = 0; for(int i = 0 ; i < N ; i++) { int a = sc.nextIn..
백준 8393 합_JAVA https://www.acmicpc.net/problem/8393 8393번: 합 n이 주어졌을 때, 1부터 n까지 합을 구하는 프로그램을 작성하시오. www.acmicpc.net import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int sum =0 ; for (int i = 0 ; i
백준 10950 A+B - 3 _JAVA https://www.acmicpc.net/problem/10950 10950번: A+B - 3 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. www.acmicpc.net import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for(int i = 0 ; i < T ; i++) { int A = sc.nextInt(); int B = sc.nextInt(); System.out.println(A+B); } sc.close(); } }
백준 2739번 구구단_JAVA https://www.acmicpc.net/problem/2739 2739번: 구구단 N을 입력받은 뒤, 구구단 N단을 출력하는 프로그램을 작성하시오. 출력 형식에 맞춰서 출력하면 된다. www.acmicpc.net import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); for(int i = 1 ; i < 10 ; i++) { System.out.println(A + " * " + i + " = " + A*i); } sc.close(); } }
백준 2480 주사위 세개_JAVA https://www.acmicpc.net/problem/2480 2480번: 주사위 세개 1에서부터 6까지의 눈을 가진 3개의 주사위를 던져서 다음과 같은 규칙에 따라 상금을 받는 게임이 있다. 같은 눈이 3개가 나오면 10,000원+(같은 눈)×1,000원의 상금을 받게 된다. 같은 눈이 2개 www.acmicpc.net import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int money = A ; if (A == B..
백준 2525번 : 오븐 시계 _ java https://www.acmicpc.net/problem/2525 import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int minhap = B + C; int plushour = minhap / 60 ; //더할 시간 int remainder = minhap % 60 ; //나머지시간 int resulthour = A + plushour; // 더할 시간을 계산 후 System.out.println(resulthour%2..
윈도우 톰켓(tomcat) 설치 및 이클립스 연동 방법 * 버전확인 http://tomcat.apache.org/whichversion.html *톰캣 다운로드 및 설치 1. 완쪽 Download 에서 Tomcat 9 선택 2. 9.0.x Core 32-bit/64bit Windows Service Installer(pgp, sha512) 클릭 3. apache-tomcat-9.0.x.exe 실행 -> Next -> I Agree -> Next -> Configuration Server Shubtdown Port : 8005 HTTP/1.1 Connector Port : 포트번호 User Name : 어드민아이디 Password : 비밀번호 -> Next -> Java Virtual Machine C:\Program Files\Java\jdk-11.0.14 ..
이클립스 하위폴더 만들었는데 폴더는 안보이고 패키지만 생성된 상황 우클릭후 Refrsh를 해주면 해결