AngryProfessor
-
[hackerRank] AngryProfessor알고리즘 2019. 12. 17. 22:45
접근방법 너무 쉬워서 접근 방법이이랄 것도 없었다.. 준비된 학생수만 세주면 끝.. package com.cm; /** * https://www.hackerrank.com/challenges/angry-professor/problem?h_r=profile */ public class AngryProfessor { public AngryProfessor() { int k = 2 ; int[] a = {0,-1,2,1}; System.out.println(solution(k,a)); } public String solution(int k, int[] a){ int readyStudentCount = 0; for(int i : a){ if(i=