본문 바로가기

Beakjoon&프로그래머스/Java139

[백준/Java] 1008번 A/B -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double a = sc.nextDouble(); double b = sc.nextDouble(); System.out.println(a / b); } } 2022. 4. 15.
[백준/Java] 24900번 한별 찍기 -Code public class Main { public static void main(String[] args) { System.out.println(" :8DDDDDDDDDDDDDD$. \n" + " DDDNNN8~~~~~~~~~~=~7DNNDNDDDNNI \n" + " ?NNDD=~=~~~~~~~~~~~~~~~~~=~~==~=INNDNN7 \n" + " +NDDI~~~~~~~~~~~~~~~~~~~~~~~=~~========~ODND+ \n" + " :NND~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~============7NDN \n" + " $DD$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=~~==============~DNN \n" + " $DD=~~~~~~~~~~~~~~~.. 2022. 4. 15.
[백준/Java] 24736번 Football Scoring -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int[] point = {6, 3, 2, 1, 2}; int[] score = {0, 0}; for (int i = 0; i < 2; i++) { for (int j = 0; j < 5; j++) { score[i] += sc.nextInt() * point[j]; } } System.out.println(score[0] + " " + score[1]); } } 2022. 4. 15.
[백준/Java] 24568번 Cupcake Party -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int r = sc.nextInt(); int s = sc.nextInt(); System.out.println(r * 8 + s * 3 - 28); } } 2022. 4. 15.
[백준/Java] 24309번 РАВЕНСТВО -Code import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger a = sc.nextBigInteger(); BigInteger b = sc.nextBigInteger(); BigInteger c = sc.nextBigInteger(); System.out.println(b.subtract(c).divide(a)); } } 2022. 4. 15.
[백준/Java] 24086번 알고리즘 수업 - 알고리즘의 수행 시간 1 -Code import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); System.out.println(1); System.out.println(0); } } 2022. 4. 15.