x만큼 간격이 있는 n개의 숫자

김현민·2021년 3월 20일
0

Algorithm

목록 보기
47/126
post-thumbnail

문제

코드

#include <string>
#include <vector>

using namespace std;

vector<long long> solution(int x, int n) {
    vector<long long> answer;
        for (int i = 1; i <= n; i++)
    {
        long long temp = i * x;
        answer.push_back(temp);
    }

    return answer;
}
profile
Jr. FE Dev

0개의 댓글