Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
spj没问题吧,为什么WA阿#include <stdio.h> void main(void) { int n; int i,j,k; scanf("%d",&n); k=2*n+1; for(i=0;i<n;i++) { printf("%d ",k++); for(j=0;j<i+1;j++) printf("%d ",n*(n-i+j)-j); printf("\n"); } for(i=n-1;i>2;i--) { printf("%d",k++); for(j=0;j<i;j++) printf(" %d",n*j + i - j); printf("\n"); } printf("%d 2\n",k++); printf("%d 1\n",k); } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator