CodeChef: Practical coding for everyone this is the link of my solution
Brother, it returns
You need to check
if( ((x%5)==0) && (y>=(x+0.5)) , for correct answer .
instead of if((double)x>(y+0.5)||x%5!=0) you should use if((double)x>(y+0.5)&& x%5!=0) as here you need follow both the conditions.