NZEC error

Can anyone please tell me why I am getting an NZEC error in this program?? I cant find it! CodeChef: Practical coding for everyone …please!!

You probably changed indexes somewhere…

In 3rd test case it prints only 3 and failed the last test case.

this is your corrected code…LINK!!!

the error was in ur nested loop the inner loop should range upto “c” while u had written “r”…!!!

1 Like

Thanks a lot!! Such a silly mistake!!!

http://www.polepositionmarketing.com/emp-media/blog-images/Chinese%20Proverb.png

4 Likes

hehe…got it…:stuck_out_tongue:

2 Likes