CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #727 #729 →

#728. Pattern: Pascal's triangle

You are given n. Print the **Pascal's triangle** pattern of size n, like in the example. Be careful with spaces (spaces at the end of a line do not matter). ### Input One integer n (2 ≤ n ≤ 9). ### Output The pattern.

Examples

Input
6
Output
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
Input
8
Output
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!