코딩테스트/프로그래머스 - LV 0

[프로그래머스] 카운트 다운

웅드 2024. 1. 23. 15:16

 

 

 

  • 풀이
#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;
}
반응형