Program not getting accepted

one test case is not getting accepted although the constraints and the outputs are ideal.

// System.out.print("number should be between -1000 and 1000");
you dont have to print this. comment it out
if this solves your doubt please mark it as resolved :slight_smile:

no mam this is not the error… my new submission doesn’t contain that line. still not accepted. And this is not the error because in each and every program i hav done this but got no errors. please look into it again.

here is your corrected code:


i took this code from your submissions and made the changes

but mam even if one input is out of range then it shouldn’t run… but i tried for the output 5 6 7 -19 9876 23 but it showed me the output… and this program has no error… why so?

the program breaks as soon as it reaches -1(5+6+7-19) so it doesnt need to read any further

ok thanku mam now i got it.