int add(int a, int b){
while(a!=0){
int temp=a^b;
a=((unsigned int)(a&b)<<1);
b=temp;
}
return b;
}
int add(int a, int b){
while(a!=0){
int temp=a^b;
a=((unsigned int)(a&b)<<1);
b=temp;
}
return b;
}
下一篇:【leetcode】】卡牌分组
【LeetCode】39. 组合总和
题目描述: 写一个函数,求两个整数之和,要求在函数体内不得使用+、-、*、/四则运算符号。解题思路: 首先看十们可以用三步...
数学07--不用加减乘除做加法-jz48题目概述解析&参考答案注意事项说明题目概述算
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M