Simple input Problem

My code is working fine in sublime text but on CB ide im getting segmentation fault,and on submitting it im getting run error

what is the mistake

hello @aryamaan1011
u r getting segementation fault because of some issue in cb ide (your code is correct for 5 input).

your code should be generalised i,e it should work for any number of input so make the required changes

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.