Thanks for pointing that out, I have a lot to learn.
Correct operation of the function in this solution is not guaranteed.
Input: 1125899940397056 | Expected: 1125899906842624 | Output: 1125899973951489
Input: 4900000070000000 | Expected: 4900000000000000 | Output: 4900000140000001
Input: 9007199041343960 | Expected: 9007198946437696 | Output: 9007199136250225
The total number of such cases (for safe integers) is over 72 million.
work smart not hard
this is not fair at all
Loading collection data...
Thanks for pointing that out, I have a lot to learn.
Correct operation of the function in this solution is not guaranteed.
Input: 1125899940397056 | Expected: 1125899906842624 | Output: 1125899973951489
Input: 4900000070000000 | Expected: 4900000000000000 | Output: 4900000140000001
Input: 9007199041343960 | Expected: 9007198946437696 | Output: 9007199136250225
The total number of such cases (for safe integers) is over 72 million.
work smart not hard
this is not fair at all