wrong answer

question link http://www.codechef.com/problems/ANUARM

my code http://www.codechef.com/viewsolution/5189196

have tried many test cases…getting the correct output…

please correct me with a test case which gives wrong output…(according to my code )
or rectify my code…

3 Likes

Hi, you are not printing the answers properly.

printf("%lld",b[i]); -> This statement in your program should be --> 	printf("%lld ",b[i]); 

Note the space after %lld. Further, solving this your code would most probably result into AC/TLE.

2 Likes

oh…ty…
now its giving a time limit error…
but i will try to figure it out…

2 Likes