주사위의 개수

han.user();·2023년 3월 31일
0

프로그래머스

목록 보기
14/87
post-thumbnail

class Solution {
    public int solution(int[] box, int n) {
        int answer = 0;

        for (int nulbi: box) {
            if(answer==0){
                answer = nulbi/n;
            } else {
                answer = answer*(nulbi/n);
            }
        }
        return answer;
    }
}
profile
I'm still hungry.

0개의 댓글