본문 바로가기
Algorithm/Programmers

[Programmers] Lv.0 | 주사위의 개수 | Java

by unknownomad 2025. 10. 15.

문제

https://school.programmers.co.kr/learn/courses/30/lessons/120845

 

풀이

class Solution {
    public int solution(int[] box, int n) {
        int width = box[0] / n;
        int depth = box[1] / n;
        int height = box[2] / n;
        
        return width * depth * height;
    }
}

댓글