MIKE 3 output

mine is able to give 12 for this test case ( http://discuss.codechef.com/questions/39472/just-reevaluate-mike3 ) but still WA…

I am new on codechef

plz tell what is output format for this problem?

printf("%d",output);

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

printf("%d\n"output);

or any other?

There won’t be any Wrong Answer if you give either space separated or line separated integers as output as per the codechef conventions.
So

printf("%d"); this won’t work in case of multiple test cases.

But the other two outputs would work fine.

Also for wrong answer, the way which I think is the best for finding the error is by writing the brute force code also. Then for single Input check the output of both codes i.e. brute force and your code. Then you would be able to figure out the cases where your code fails.

1 Like
//