1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
// @Title: 找到和为给定整数的三个连续整数 (Find Three Consecutive Integers That Sum to a Given Number)
// @Author: 15816537946@163.com
// @Date: 2022-02-19 23:56:54
// @Runtime: 0 ms
// @Memory: 1.9 MB
func sumOfThree(num int64) []int64 {
    if num%3 == 0 {
        return []int64{num/3-1,num/3,num/3+1}
    }
    return nil
}