首页 > 学院 > 开发设计 > 正文

371. Sum of Two Integers

2019-11-06 06:56:00
字体:
来源:转载
供稿:网友

题目

Calculate the sum of two integers a and b, but you are not allowed to use the Operator + and -.

Example: Given a = 1 and b = 2, return 3.

Credits: Special thanks to @fujiaozhu for adding this PRoblem and creating all test cases.

Subscribe to see which companies asked this question.


思路

很简单,注意溢出


Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.Credits:Special thanks to @fujiaozhu for adding this problem and creating all test cases.Subscribe to see which companies asked this question.
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表