코딩테스트/프로그래머스
[Level 1][C++] x만큼 간격이 있는 n개의 숫자
MJ.Lee
2024. 9. 27. 22:54
#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++)
answer.push_back(x*i);
return answer;
}