Describe your issue
So the link of the problem statement is: CodeChef: Practical coding for everyone
Screenshot
My code is:
#include <stdio.h>
int main(void) {
int T;
scanf("%d",&T);
for(int i=0; i<T; i++)
{
int w1,w2,x1,x2,M;
scanf("%d %d %d %d %d ", &w1,&w2,&x1,&x2,&M);
if((x1<=((w2-w1)/M)) && (((w2-w1)/M)<=x2))
{
printf("1 \n");
}
else
{
printf("0 \n");
}
}
return 0;
}
Additional info
When I click on “run”, it is working and displaying the expected output, but when i submit it, it shows wrong answer. I have not bought the premium so I’d like some help to figure out what I am missing.
Thanks in advance.