int main()
{
    int n, i, j;
    scanf("%d", &n);
    int arr[n][n];                 //变长数组,C99
    for(i = 0; i < n; i++)
    {
        for(j = 0; j <= i; j++)
        {
            if(j == 0|| j == i)
            {
                arr[i][j] = 1;
            }
            else
            {
                arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
            }
            printf("%5d", arr[i][j]);
        }
        printf("\n");
    }
    return 0;
}