본문 바로가기

백준32

[백준/JAVA] 4344번 평균은 넘겠지 import java.util.Scanner;import java.util.Stack; public class Main {public static void main(String args[]) {Scanner in = new Scanner(System.in);int lineCount = in.nextInt();for (int i = 0; i < lineCount; i++) {int studentC = in.nextInt();int[] arr = new int[studentC];double sum = 0;double average=0;double per = 0;int resultC=0;for (int j = 0; j < studentC; j++) {arr[j] = in.nextInt();sum += arr[.. 2020. 7. 23.
[백준/JAVA] 8958번 OX퀴즈 import java.util.Scanner;import java.util.Stack; public class Main {public static void main(String args[]) {Scanner in = new Scanner(System.in);int input = in.nextInt();String insert;Stack st = new Stack();int getSum = 0;int tempt = 1;for (int i = 0; i < input; i++) {insert = in.next();String[] arr = insert.split("");for (int j = 0; j < arr.length; j++) {st.add(arr[j]);}for (int j = 0; j < arr.l.. 2020. 7. 23.
[백준/JAVA] 3052번 나머지 import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String args[]) { Scanner in = new Scanner(System.in); HashSet hs = new HashSet(); for(int i=0;i 2020. 7. 23.
[백준/JAVA] 1546번 평균 import java.util.Scanner; public class Main {public static void main(String args[]) {Scanner in = new Scanner(System.in);int input = in.nextInt();double[] arr = new double[input];double max,average = 0;for (int i = 0; i < input; i++) {arr[i] = in.nextDouble();}max = arr[0];for (int i = 0; i < input; i++) {if (max < arr[i])max = arr[i];}for (int i = 0; i < input; i++) {arr[i] = arr[i] / max * 100.. 2020. 7. 23.