Same pattern printed. still all test cases failed

here is the link to my code.

Hello @ParthCr7,

Yes, I totally agree with you.
The logic of your code is correct.
It is producing the output as you wanted it to.
The pattern is correct.

Then, what could be the reason?
Let’s read the question again.
But, this time read every single line.
Suggestion: Focus more on the explanation part.

Your output format is wrong.:wink:

Hope, this would help.
Give a like, if you are satisfied.

Do u mean i hv to put spaces between each number also

Tab “\t”,
this is something you have to insert.

Each column should be separated by each other with a tab.
this means each element either a number or a " ", should be separated by “\t”.

Hope, this would clear your doubt.
If you still face problem, feel free to ask.

Please, mark it as resolved if your doubt has been solved.

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.