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

Jmnote (토론 | 기여)님의 2023년 11월 16일 (목) 21:58 판
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)

1 개요[ | ]

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

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

vector<int> solution(vector<int> num_list, int n) {
    return vector<int>(num_list.begin(), num_list.begin()+n);
}