URGENT HELP!! MY INTEREST IN CODING IS AT STAKE!!

I have submitted like 10 questions of beginner level. Each of them successfully compiled and was run on my ide but on codechef it shows wrong answer everytime
CodeChef: Practical coding for everyone
link for one of the questions is given above.

you are supposed to input and output as per rules. don’t print lines like “enter test cases” etc etc. just take input and show output as shown in example.

As mentioned by @divyanshu_rath , First remove the following:

printf("Enter the number of test cases\n"); // Line 6  
printf("Enter the value of n and k\n"); // Line 11  
printf("Enter the number of girls within each km\n"); // Line 15  

As It is clearly mentioned to print output in new line. Hence, on line 34, Change the code to following :

printf("%d\n",max);

Coding is full of errors, debugging, sleepless nights because of bugs. You shouldn’t be so much annoyed just for this.
Coders here even submit 50-60 submissions for some tricky problems. Have patience in order to become a successful coder. Happy Learning. :slight_smile:

done that still showing the same result