0

What are constraints that used in many code competitions?

I'm so confused when I start coding on CodeChef, when I try to search on google what constraints is.. It's so complex to understand. Does anyone who can explain it? For example: x<5<=100

2nd Nov 2017, 11:16 AM
Khyn Harold Jay Antoque
Khyn Harold Jay Antoque - avatar
4 Answers
+ 9
Perhaps it should be 5 < x <= 100 It means the value of x must be greater than 5 and less than or equal to 100. So valid values of x are: 6 to 100 You'll have to check x in your code in such a way that it works for all valid values of x, and any invalid value of x (like 0, 2, 5, 101, -7 etc.) can't be applied.
2nd Nov 2017, 11:29 AM
Shamima Yasmin
Shamima Yasmin - avatar
+ 2
Thank you Shamima Yasmin
2nd Nov 2017, 11:34 AM
Khyn Harold Jay Antoque
Khyn Harold Jay Antoque - avatar
+ 1
psosibly it(5<x<=100) may be x is greater than 5 and less than or equal 100....
2nd Nov 2017, 12:03 PM
ELIAS
ELIAS - avatar
0
thanks
2nd Nov 2017, 12:03 PM
ELIAS
ELIAS - avatar