mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-25 12:14:26 +08:00
16 lines
237 B
Go
16 lines
237 B
Go
package leetcode
|
|
|
|
func maximumWealth(accounts [][]int) int {
|
|
res := 0
|
|
for _, banks := range accounts {
|
|
sAmount := 0
|
|
for _, amount := range banks {
|
|
sAmount += amount
|
|
}
|
|
if sAmount > res {
|
|
res = sAmount
|
|
}
|
|
}
|
|
return res
|
|
}
|