LintCode-剑指Offer-(1)A+B问题

来源:互联网 发布:vue js 编辑:程序博客网 时间:2024/06/05 09:03
class Solution {public:    /*     * @param a: The first integer     * @param b: The second integer     * @return: The sum of a and b     */    int aplusb(int a, int b) {        // write your code here, try to do it without arithmetic operators.        a=0-a;        b=0-b;        return 0-a-b;    }};
0 0
原创粉丝点击