2021年5月11日

不用加号的加法

摘要: 力扣中不用加号的加法:面试题17.01 问题:设计一个函数把两个数字相加。不得使用 + 或者其他算术运算符。 代码实现: class Solution { public int add(int a, int b) { while((a&b)!=0){//这两数的字节码相加是否会产生进位 int te 阅读全文

posted @ 2021-05-11 19:47 凡人精灵 阅读(82) 评论(0) 推荐(0) 编辑

导航