diff --git "a/Programmers/\354\227\260\354\206\215\353\220\234_\354\210\230\354\235\230_\355\225\251.cpp" "b/Programmers/\354\227\260\354\206\215\353\220\234_\354\210\230\354\235\230_\355\225\251.cpp" new file mode 100644 index 0000000..4eec349 --- /dev/null +++ "b/Programmers/\354\227\260\354\206\215\353\220\234_\354\210\230\354\235\230_\355\225\251.cpp" @@ -0,0 +1,18 @@ +#include +#include + +using namespace std; + +vector solution(int num, int total) { + vector result; + + // 첫 번째 수 계산 + int start = (total - (num * (num - 1) / 2)) / num; + + // 연속된 수를 계산하여 결과에 추가 + for (int i = 0; i < num; ++i) { + result.push_back(start + i); + } + + return result; +} \ No newline at end of file