웅재의 코딩세상
[프로그래머스] 카운트 다운 본문
- 풀이
#include <string>
#include <vector>
using namespace std;
vector<int> solution(int start, int end_num) {
vector<int> answer;
for(int i=start; i>=end_num; i--){
answer.push_back(i);
}
return answer;
}
반응형
'코딩테스트 > 프로그래머스 - LV 0' 카테고리의 다른 글
[프로그래머스] 문자열로 변환 (0) | 2024.01.23 |
---|---|
[프로그래머스] 대문자로 바꾸기 (0) | 2024.01.23 |
[프로그래머스] 소문자로 바꾸기 (0) | 2024.01.23 |
[프로그래머스] flag에 따라 다른 값 반환하기 (0) | 2024.01.23 |
[프로그래머스] 홀짝에 따라 다른 값 반환하기 (0) | 2024.01.23 |