본문 바로가기
반응형

Java21

Chapter 3. Selections[Java Basic] 3.A - 대수: 2차방정식 풀이 Time Limit: 1s Memory Limit: 128MB DESCRIPTION 2차 방정식의 해는 다음 공식을 통해서 구할 수 있습니다. The two roots of a quadratic equation ax^2 + bx + c = 0 can be obtained using the following formula: 위 식에서 b^2-4ac 는 2차방정식의 판별식이라고 합니다. 만약 2차 방정식의 판별식이 0보다 크다면 2개의 실수해를 가지고, 0이라면 1개의 실수해를 가지고, 0보다 작다면 0개의 실수해를 가집니다. a, b, c의 값을 입력으로 받아 해를 출력하는 프로그램을 작성하세요. b^2-4ac is called the discriminant of the .. 2021. 11. 5.
Chapter 2. Elementary Programming[Java Basic] 2.A - 시간,분,초 Time Limit: 1s Memory Limit: 128MB DESCRIPTION 입력받은 초를 시간, 분, 초로 나누어 출력하는 프로그램을 작성하세요. INPUT * Line 1 : 초를 나타내는 정수 (0~86,399) OUTPUT * Line 1 : 시간, 분, 초를 공백으로 구분해서 출력 SAMPLE INPUT 2015 SAMPLE OUTPUT 0 33 35 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int hour, min, sec; sec = input.nextInt(); min = se.. 2021. 11. 5.
Chapter 1. Introduction to Computers, Programs, and Java[Java Basic] Java Basic의 대부분 문제들의 출처는 https://withcs.net/ WithCS QA 는 Zoom을 통해서 진행됩니다. 시간: 매주 수요일 오후 7시~9시(최대) 연결: ... withcs.net 입니다. 1.A - Welcome to Java! Time Limit: 1s Memory Limit: 128MB DESCRIPTION Java의 환영 메세지를 출력하세요. INPUT 없음 OUTPUT Welcome to Java!를 첫째줄에 출력 SAMPLE INPUT SAMPLE OUTPUT Welcome to Java! HINT public class Main { public static void main(String[] args) { System.out.println("Welcome to Ja.. 2021. 11. 5.
반응형