웅재의 코딩세상
[프로그래머스] 카운트 업 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
vector<int> solution(int start_num, int end_num) {
vector<int> answer;
for(int i=start_num; i<= end_num; i++) {
answer.push_back(i);
}
return answer;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] 원소들의 곱과 합 (0) | 2024.01.23 |
---|---|
[프로그래머스] 첫 번째로 나오는 음수 (0) | 2024.01.23 |
[프로그래머스] 문자열의 뒤의 n글자 (0) | 2024.01.23 |
[프로그래머스] n 번째 원소부터 (0) | 2024.01.23 |
[프로그래머스] 문자열로 변환 (0) | 2024.01.23 |