로딩
요청 처리 중입니다...

JAVA_프로그래머스_2019 KAKAO BLIND RECRUITMENT_실패율

 JAVA_프로그래머스_2019 KAKAO BLIND RECRUITMENT_실패율

JAVA_프로그래머스_2019 KAKAO BLIND RECRUITMENT_실패율 풀이 import java.util.*; class Solution { public int[] solution(int N, int[] stages) { int[] count = new int[N + 1]; // n까지 카운팅 for(int stage : stages){ if(stage <= N){ count[stage]++; } } // 총계, 실패율 계산 double[] fail = new double[N + 1]; double total = stages.length; for(int i = 1; i <= N; i++){ if(total > 0) fail[i] = count[i] / total; total -= count[i]; } // 번호 적용 Integer[] num = new Integer[N]; for(int i = 0; i < N; i++) num[i] = i + 1; // 정렬하기(같으면 작...