This math question is from KVPY SA 2009 exam :
The sides of a quadrilateral are all positive integers and three of them are 5, 10, 20. How many values are possible for fourth side?
Options: $\quad$ A. 29 $\quad$ B. 31 $\quad$ C. 32 $\quad$ D. 34
D option is the correct answer.
But when I tried to solve this by the method in picture (shared below) , I got 27 as answer with the values ranging from 7 to 33. Please correct me where I am wrong.
You are assuming that $y$ must be an integer, but this is not stated in the problem. It is necessary and sufficient that the longest side be greater than the sum of the other three sides. If the longest side is $20$, we have $20<x+15$ so that $6\leq x\leq20$. If $x$ is the longest side, we have $20\leq x<35$, so $6\leq x\leq 34$ and A is the correct answer.