LoginSignup
0
0

1672. Richest Customer Wealth

Posted at

1672. Richest Customer Wealth

前の値と比較して、値を入れ替えていく方法を行った。
そこそこ成績は良かったため嬉しい。

class Solution:
    def maximumWealth(self, accounts: List[List[int]]) -> int:
        compare_wealth = 0
        for i in range(0, len(accounts)):
            compare_wealth2 = sum(accounts[i])
            if(compare_wealth <= compare_wealth2):
                compare_wealth = compare_wealth2
        return compare_wealth
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0