Skip to content

Commit 7af661b

Browse files
committed
Fix 5613 test
1 parent adaf03b commit 7af661b

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

leetcode/5613. Richest Customer Wealth/5613. Richest Customer Wealth_test.go

Whitespace-only changes.
File renamed without changes.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package leetcode
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
)
7+
8+
type question491 struct {
9+
para491
10+
ans491
11+
}
12+
13+
// para 是参数
14+
// one 代表第一个参数
15+
type para491 struct {
16+
accounts [][]int
17+
}
18+
19+
// ans 是答案
20+
// one 代表第一个答案
21+
type ans491 struct {
22+
one int
23+
}
24+
25+
func Test_Problem491(t *testing.T) {
26+
27+
qs := []question491{
28+
29+
{
30+
para491{[][]int{{1, 2, 3}, {3, 2, 1}}},
31+
ans491{6},
32+
},
33+
34+
{
35+
para491{[][]int{{1, 5}, {7, 3}, {3, 5}}},
36+
ans491{10},
37+
},
38+
39+
{
40+
para491{[][]int{{2, 8, 7}, {7, 1, 3}, {1, 9, 5}}},
41+
ans491{17},
42+
},
43+
}
44+
45+
fmt.Printf("------------------------Leetcode Problem 491------------------------\n")
46+
47+
for _, q := range qs {
48+
_, p := q.ans491, q.para491
49+
fmt.Printf("【input】:%v 【output】:%v\n", p, maximumWealth(p.accounts))
50+
}
51+
fmt.Printf("\n\n\n")
52+
}

0 commit comments

Comments
 (0)