Run Time Error While submitting the code

When I submitted the below code it is showing run time error but when i am compiling this code on various test cases it is running fine. Could you please help me in figuring out the issue with the code.
https://ide.geeksforgeeks.org/iaGFBpEvFH

@sonamchandra3376 in middle for loop you are running till <=t while array size is t only make it <t
dont forget to mark resolved and hit like if cleared :smiley:

The middle loop is for XOR all natural no. from 0 to t i.e size of array( as mentioned in problem statement). Hence i think it should be <=t. In the video also the limit it <=size of array. Please correct me if i am wrong.

@sonamchandra3376 actually the error is in input like if you give array in same line then the code works fine but when input is like this-
2
0
2
your code gives error check it

Thanks, it worked for me.

np just mark it resolved :smiley: