While I haven't solved this problem yet, I did decrypt the problem description. It seems rather trivial, so what's the catch?
So far the only thing I though of are number limits. While input numbers are supposed to fit in standard integer types this is not necessarily the case with output.
After more thinking about this, input numbers not necessarily fit into standard types. We are only given an upper bound, not lower bound, and those are integers as opposed to natural numbers.