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

#include <leetcode.h>

静态 Public 成员函数

static int totalMoney (int n)
 

详细描述

在文件 leetcode.h448 行定义.

成员函数说明

◆ totalMoney()

int leetcode::calculate_money_in_leetcode_bank::Solution::totalMoney ( int  n)
static

在文件 leetcode.cpp1025 行定义.

1025 {
1026 int sum = n / 7 * (28 + 7 * (n / 7 + 3)) / 2;
1027 for(int i = 0; i < n % 7; i++) {
1028 sum += n / 7 + 1 + i;
1029 }
1030 return sum;
1031 }

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


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