Skip to content

Commit bdc0624

Browse files
author
zj
committed
371. Sum of Two Integers
1 parent 5dcdd0b commit bdc0624

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 371. Sum of Two Integers
2+
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.
3+
4+
##### Example:
5+
6+
Given a = 1 and b = 2, return 3.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @param {number} a
3+
* @param {number} b
4+
* @return {number}
5+
*/
6+
//Distribution 38.99%,runtime 104ms
7+
var getSum = function(a, b) {
8+
return a+b;
9+
};

0 commit comments

Comments
 (0)