Task
Given Two intgers a , b , find The sum of them , BUT You are not allowed to use the operators + and -
Notes
The numbers (a,b) may be positive , negative values or zeros .
Returning value will be integer .
Javascript: the Array reduce methods are disabled, along with eval, require, and module .
Java: the following methods are prohibited: addExact, average, collect, decrement, increment, nextAfter, nextDown, nextUp, reduce, subtractExact, sum, summing . The following classes are prohibited: BigDecimal and BigInteger .
NASM: the following instructions are prohibited: add, adc, adcx, adox, dec, inc, sbb, sub .
Input >> Output Examples
1- Add (5,19) ==> return (24)
2- Add (-27,18) ==> return (-9)
3- Add (-14,-16) ==> return (-30)
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #57 Frequency Analysis With Buckets (6kyu) (0) | 2018.06.07 |
---|---|
codewars #56 Maximum subarray sum (5kyu) (0) | 2018.06.05 |
codewars #54 Word a10n (abbreviation) (6kyu) (0) | 2018.06.01 |
codewars #53 FIXME: Hello (6kyu) (0) | 2018.05.31 |
codewars #52 Are they the "same"? (6kyu) (0) | 2018.05.30 |