No, but return value is integer anyway, so there is no possible way to return correct value using integer. We can return 0 in this case, because input data will be kind of incorrect, but I don't think it's a good way to solve the task.
Description says: "Input will always be a non-negative integer.", so we can omit handling this case
What about negative values? For example n = -5, m = -4. I think it should return 0. Your solution will give 19.
Loading collection data...
No, but return value is integer anyway, so there is no possible way to return correct value using integer. We can return 0 in this case, because input data will be kind of incorrect, but I don't think it's a good way to solve the task.
Description says: "Input will always be a non-negative integer.", so we can omit handling this case
What about negative values? For example n = -5, m = -4. I think it should return 0. Your solution will give 19.