Cod sursa(job #804704)

Utilizator geniucosOncescu Costin geniucos Data 30 octombrie 2012 10:19:03
Problema Tablete Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.32 kb
#include<cstdio>
using namespace std;
int n,k,i,j;
int main()
{
freopen("tablete.in","r",stdin);
freopen("tablete.out","w",stdout);
scanf("%d %d",&n,&k);
if(n%2==0&&k%2==0)
{
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n;j++)
            printf("%d ",(i-1)*n+j);
        printf("\n");
    }
}
return 0;
}