웅재의 코딩세상
[프로그래머스] n 번째 원소부터 본문
- 풀이
#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;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] 카운트 업 (0) | 2024.01.23 |
---|---|
[프로그래머스] 문자열의 뒤의 n글자 (0) | 2024.01.23 |
[프로그래머스] 문자열로 변환 (0) | 2024.01.23 |
[프로그래머스] 대문자로 바꾸기 (0) | 2024.01.23 |
[프로그래머스] 카운트 다운 (0) | 2024.01.23 |