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: 1716kB
Author: 2016212402023
In contest: 1090

#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
bool comp(int a,int b)
{
	return a>b;
}
int main()
{
	int a[120][120];
	int n;
	scanf("%d",&n);
		a[0][0]=1;
		for(int j=1;j<102;j++)
		{
			a[j][0]=a[j-1][0]+j;
		}
		for(int j=0;j<102;j++)
		{
			for(int i=1;i<101;i++)
		    {
			    a[j][i]=a[j][i-1]+i+j+1;
	      	}
		}
		for(int i=0;i<n;i++)
		{
			for(int j=0;j<n-i;j++)
			{
				printf("%d",a[i][j]);
				if(j!=n-i-1)
				printf(" ");
			}
			if(i!=n-1)
			printf("\n");
		}
	
}