프로그래머스 12954 x만큼 간격이 있는 n개의 숫자

1 개요[ | ]

프로그래머스 12954 x만큼 간격이 있는 n개의 숫자

2 C++[ | ]

#include <string>
#include <vector>

using namespace std;

vector<long long> solution(int x, int n) {
    vector<long long> answer;
    for(int i=0; i<n; i++) {
        answer.push_back(x+i*x);
    }
    return answer;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}