Cod sursa(job #1364202)
Utilizator | Data | 27 februarie 2015 15:42:10 | |
---|---|---|---|
Problema | Tablete | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
int main()
{ FILE *f=freopen("tablete.in","r",stdin);
freopen("tablete.out","w",stdout);
int n,k,i,j,c=1;;
cin>>n;
cin>>k;
for(i=1;i<=n;i++)
{ for(j=1;j<=n;j++)
{ if(j<k)cout<<i*j*c<<" ";
else cout<<2*j*i*c<<" ";
}
c++;
cout<<"\n";
}
return 0;
}