I don't think this is self-evident or has an obviously accepted convention. The question should be clarified.
I don't think this [...] has an obviously accepted convention.
Neither of those consider negative ones.
Though it annoys the hell out of me that the problem doesn't distinguish between numbers and their representations and that, judging by the test cases, the author thinks that numbers and their decimal representation are the same. The mathworld and wikipedia articles are better at that, though not much.