题解 | #不用加减乘除做加法#

不用加减乘除做加法

http://www.nowcoder.com/practice/59ac416b4b944300b617d4f7f111b215

如果只是想过题的话。。调用Math封装的方法就好了XD

public class Solution {
    public int Add(int num1,int num2) {
        return Math.addExact(num1,num2);
    }
}
全部评论

相关推荐

昨天 16:31
已编辑
桂林电子科技大学 Python
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务