0
点赞
收藏
分享

微信扫一扫

LeetCode 1672.最富有客户的资产总量(简单)

三次方 2022-04-14 阅读 76
leetcode

原文链接:力扣

        思路:很简单,直接暴力遍历一遍即可。

class Solution {
public:
    int maximumWealth(vector<vector<int>>& accounts) {
        int Max=0;
        int tmp;
        for(auto a:accounts)
        {
            tmp=0;
            for(auto b:a)
            {
                tmp+=b;
            }
            Max=max(Max,tmp);
        }
        return Max;
    }
};
举报

相关推荐

0 条评论