Checking constraints

Are the problems checked beyond their constraints. And if yes, then what will be the expected output or how to bound the problem strictly upon the constraints?

If there is written in problem statement, that 0 <= n <= 1000 you do not need to check that, tester checks that before problem is used in contest.

If you still think, that there is a problem in that, you can use assert statement in C/C++ same way tester is using it.

Similar discussion here.