Start: May, 31, 2017 13:30:00
2017ACM通识课期末考试
End: May, 31, 2017 17:30:00
Time elapsed:
Time remaining:

Problem_ID: I
Result: Accepted
Time: 5ms
Memory: 1092kB
Author: 2016210402084
In contest: 1090

#include<stdio.h>
int main(void)
{
	int n,a,i,j,m,b,c,d;
	scanf("%d",&n);
	m=n;
	a=1;j=2;c=0;
	while(m--)
	{
		b=a+c;
		a=b;
		d=j;
		for(i=0;i<n;++i)
		{
			if(i==0)
				printf("%d",b);
			else
				printf(" %d",b);
			b=b+d;
			d=d+1;
		}
		printf("\n");
		n=n-1;
		c++;
		j++;
	}
	return 0;
}