Domain Handling

I do not understand how to correctly format my domain handling for code chef questions.
eg. if the inputs are
0 < a < 2000, 10 <= b
then I can force input a, b to obey the domain with something like:
if a > 0:
a = 1
if a > 2000:
a = 1999
if b < 10:
b = 10
otherwise I can use logic that only allows correct domain inputs such as
if 0 < a < 2000, b >= 10:
[block of code]
return error

Or codechef may have some other format for domain handling. What is the desired format for handling extraneous inputs?

Please use appropriate title for question. This title gives look of spam post.
Coming to your question Be assured inputs given in codechef questions strictly follow input format and are in range given in question only.