Error on submit but output is as expected in custom test case


#1

My program gives correct output in custom test case & when on submit same program says seg fault for the same input.
If I run the same input as test custom input it gives correct output.