코딩테스트

프로그래머스_0단계_n 번째 원소부터 C++

코딩기계 2024. 4. 9. 00:48

 

 

문제풀이:

#include <string>
#include <vector>

using namespace std;

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