Problem submitting code pascal triangle

problem in submitting the code. test case is wrong but its giving right answer in the ide
solution:- https://ide.codingblocks.com/s/61429

Hi Ishita, you’ve not completely understood what a Pascal’s triangle is.
For n=6, the output should be:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1

But your code’s output is:
1
1 1
1 2 1
1 3 3 1
1 4 4 4 1
1 5 5 5 5 1

Basically, Pascal’s triangle is a triangular array of the binomial coefficients. Each number is the numbers directly above it added together.