(문제풀이)
프로그래머스(java) : 머쓱이보다 키 큰 사람
cogito-new
2022. 10. 10. 00:10
class Solution {
public int solution(int[] array, int height) {
int answer = 0;
int count = 0;
for(int i= 0; i<array.length; i++){
if(array[i] > height){
count++;
}
}
answer = count;
return answer;
}
}
반응형