본문 바로가기
C++

[프로그래머스] 주사위의 개수

by 띰쥬 2025. 9. 5.
728x90
반응형
SMALL

#include <string>
#include <vector>

using namespace std;

int solution(vector<int> box, int n) {
    int answer = 1;
    
    for(int i:box)
        answer *= i/n;
    
    return answer;
}

728x90
반응형
LIST

댓글