题目链接:https://leetcode-cn.com/problems/find-three-consecutive-integers-that-sum-to-a-given-number/
题目如下:
class Solution {
public:
vector<long long> sumOfThree(long long num) {
//结论:如果num是3的倍数,返回num/3-1、num/3、num/3+1,否则返回空数组
if(num%3==0) return {num/3-1,num/3,num/3+1};
else return {};
}
};