728x90
반응형
SMALL
#include <string>
#include <vector>
using namespace std;
vector<int> solution(int n, vector<int> numlist) {
vector<int> answer;
for(auto num : numlist)
{
if(num%n==0)
answer.push_back(num);
}
return answer;
}
728x90
반응형
LIST
'C++' 카테고리의 다른 글
[프로그래머스] 아이스 아메리카노 (0) | 2025.09.04 |
---|---|
[프로그래머스] 배열 원소의 길이 (0) | 2025.09.04 |
[프로그래머스] 순서쌍의 개수 (0) | 2025.09.04 |
[프로그래머스] 배열의 유사도 (0) | 2025.09.04 |
[프로그래머스] 점의 위치 구하기 (0) | 2025.09.04 |
댓글