leetcode371:两整数之和

思想:

1.转换成列表c=[a,b]

2.运用sum求和

class Solution:
    def getSum(self, a, b):
        """
        :type a: int
        :type b: int
        :rtype: int
        """
        c=[a,b]
        return sum(c)

这投机取巧啦

猜你喜欢

转载自blog.csdn.net/weixin_43160613/article/details/84196679