Submission error!

I have tried to submit one problem but I failed a few times, When I run the code in my local machine it works perfectly but code-chef is not taking my submission.
Please help me with what to do?

Check the following update to your code.


1 Like

Thank you so much for your reply. I run your code it gives the same output as mine.
Here is my code, can you tell me where is the problem in my code?
#include <stdio.h>
int main(void)

int t;

    int n,x,p;
    scanf("%d %d %d",&n,&x,&p);

    if((3*x) - (n-x)>=p) {
return 0;


Your code needs to send newline ‘\n’ after printing Pass/Fail. You can either change printf to puts or add ‘\n’ at the end of the format string of the printf function. The puts function call implicitly sends newline to stdout after printing its argument, while the printf function does not do that.

Check the documentation for the puts function.


i.e. either puts(“Pass”); or printf(“Pass\n”); and the same for the other statement will fix the issue.

1 Like

I tried your method but it’s not taking the submission!
can’t it be a technical error from the backend?

What is the error message?

Brother I put the new line in both print function [printf(“PASS\n”) printf(“FAIL\n”)]
then it works.
Thank you.

Thanks for sharing the good news.

Best wishes.

bro can you explain what makes the difference by using “\n” in code and it submitted perfectly!