problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
leetcode::find_three_consecutive_integers_that_sum_to_a_given_number::Solution类 参考

#include <leetcode.h>

静态 Public 成员函数

static vector< long long > sumOfThree (long long num)
 

详细描述

在文件 leetcode.h1210 行定义.

成员函数说明

◆ sumOfThree()

vector< long long > leetcode::find_three_consecutive_integers_that_sum_to_a_given_number::Solution::sumOfThree ( long long  num)
static

在文件 leetcode.cpp3116 行定义.

3116 {
3117 if(num % 3 == 0) {
3118 const long long mid = num / 3;
3119 vector ans = {mid - 1, mid, mid + 1};
3120 return ans;
3121 }
3122 return {};
3123 }

被这些函数引用 leetcode::find_three_consecutive_integers_that_sum_to_a_given_number::TEST().


该类的文档由以下文件生成: