class Solution {
public int solution(int slice, int n) {
int answer = 0;
if(n % slice == 0){
answer = n/slice;
}else{
answer = n/slice +1;
}
return answer;
}
}
'코딩테스트 예제' 카테고리의 다른 글
프로그래머스 옷가게 할인받기 (0) | 2023.04.16 |
---|---|
프로그래머스 배열의 평균값 구하기 (0) | 2023.04.16 |
간단한 배열 정렬하기! (0) | 2023.04.15 |
프로그래머스 피자나눠먹기2 예제 (0) | 2023.04.15 |
프로그래머스 피자나눠먹기1 예제 (0) | 2023.04.15 |