목록고민 (38)
happy coding
SELECT P.PRODUCT_CODE, SUM(O.SALES_AMOUNT * P.PRICE) AS SALES FROM PRODUCT P JOIN OFFLINE_SALE O ON P.PRODUCT_ID = O.PRODUCT_ID GROUP BY P.PRODUCT_CODE ORDER BY SALES DESC, P.PRODUCT_CODE ASC;
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] letterArray = new int[26]; // 영문자의 개수는 26개임 String s = br.readLine(); for (int i = 0; i < s.length(); i++){ if ('A'
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] arr; int testcaseNum = Integer.parseInt(br.readLine()); StringTokenizer st; for (int i=0 ; i< testcaseNum ; i++) { st = new StringTokenizer(br.readLine()); int N = Integer.parseInt(st.nextToken()); //..
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String[] input = br.readLine().split(" "); long A = Long.parseLong(input[0]); long B = Long.parseLong(input[1]); long V = Long.parseLong(input[2]); lo..
import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); System.out.println(gcd(a,b)); System.out.println(lc..
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); double sum = 0.0; int max = -1; StringTokenizer st = new StringTokenizer(br.readLine()); for (int i=0 ; i max) { max = value; } sum += value; } double mean = (double..
보호소에서는 몇 시에 입양이 가장 활발하게 일어나는지 알아보려 합니다. 09:00부터 19:59까지, 각 시간대별로 입양이 몇 건이나 발생했는지 조회하는 SQL문을 작성해주세요. 이때 결과는 시간대 순으로 정렬해야 합니다. SELECT HOUR(DATETIME) AS HOUR, COUNT(DATETIME) AS COUNT FROM ANIMAL_OUTS WHERE HOUR(DATETIME) >= 9 AND HOUR(DATETIME)