[Python] two sum
python\nclass Solution:\n    def maximumSum(self, nums: List[int]) -> int:\n        dict_map = {}\n        \n        res = -1\n        for num in nums:\n       
```python\nclass Solution:\n    def maximumSum(self, nums: List[int]) -> int:\n        dict_map = {}\n        \n        res = -1\n        for num in nums:\n            temp = num\n            new_num = 0\n            while temp:\n                new_num += temp % 10\n                temp = temp // 10\n            if new_num in dict_map:\n                new_res = num + dict_map[new_num]\n                res = max(res, new_res)\n                dict_map[new_num] = max(num, dict_map[new_num])\n            else:\n                dict_map[new_num] = num\n        return res\n```
['Python', 'Python3']