Https://ide.codingblocks.com/s/264562

my code is giving right output still it is not clearing all testcase

@Aditya-Kushwaha-914550392281281 n can be upto 1000, make a bigger array. And print answer of each test case in a new line. (right now it is all being printed in the same line)

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.