371. Sum of Two Integersphp
相加给定的两个数,但不能使用+或-运算符。.net
能够用二进制的与运算完成。此处用array_sum完成。code
<?php class Solution { /** * @param Integer $a * @param Integer $b * @return Integer */ function getSum($a, $b) { return array_sum([$a,$b]); } }
若以为本文章对你有用,欢迎用爱发电资助。leetcode