본문 바로가기
C++

[프로그래머스] n 번째 원소까지

by 띰쥬 2025. 8. 28.
728x90
반응형
SMALL

#include <string>
#include <vector>

using namespace std;

vector<int> solution(vector<int> num_list, int n) {
    vector<int> answer;
    
    for(int i=0; i<n; i++)
    {
        answer.push_back(num_list[i]);
    }
    return answer;
}

728x90
반응형
LIST

댓글