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: 6ms
Memory: 1092kB
Author: 2016210402094
In contest: 1090

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

		 }
	 }
 }