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
Solution: 20078309 | CodeChef
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.

done that still showing the same result

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 :


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: