NZEC error in C# Sums in a Triangle problem

This is my solution: http://www.codechef.com/viewsolution/2531226

I have read many articles. Everywhere I read this:

Usually, returning non-zero values
from main() will cause this error. It
helps telling crash from WA (Wrong
Answer) with interpreted languages.
Typically this would happen if you
omit a return 0; from main() in C. For
interpreted languages or Java/C++,
this could happen if your program
threw an exception which was not
caught (e.g. Trying to allocate too
much memory in a vector).

However I am still not able to figure out what is wrong. Please can some one look into this

I’m not C# guy, but it’s not working for input from statement http://ideone.com/hbU1p0

Thanks for the insight. I have updated the question. I made needful changes but still I am getting the same error.

There is same error, try it one IdeOne :wink: I updated the code there (same link)…

I cannot understand why is it so. It’s working fine on my machine. I cannot figure out the reason for this error.