Solution to the problem number URJC3_C of Spoj - URJC3_C.

Any questions do not hesitate to contact.

//Problema C

 //Triangulos de Pascal
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int m,n,x,temp;
    cin>>m;
    while(m--)
    {
        cin >> temp>>n;
        for(int i=0;i<n;i++)
        {
        x=temp;
            for(int k=0;k<=i;k++)
            {
            cout << x<<" ";
            x = x *(i-k)/(k+1);
            }
        cout << endl;
        }
    }
    return 0;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!