Okay, my bad, thank you for your reply. :)
In the task description:
"Implement a function, which takes a non-negative integer"
So non-negative is assumed already. In production code this obviously would want some additional robustness, but based on the description of the task the solution fits.
The tests pass, and those are the final say anyway.
Werent we supossed to check if there is a negative number? Because I can't see it in this code¨.
I can +1 the fact that it wasn't clear you could adjust the difficulty.