###### HDU 2153 --仙人球的残影

1

1
============
4

1  2  3  4
12        5
11        6
10  9  8  7
==================
10

1    2   3   4   5   6   7   8    9   10
36                                               11
35                                              12
34                                              13
33                                              14
32                                              15
31                                              16
30                                              17
29                                              18

28 27 26 25 24 23 22 21 20 19

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <math.h>

using namespace std;

int a[105];
int b[105];
int main()
{
int n;
while(scanf("%d",&n),n)
{
if(n==1)
{
printf("%3d\n",1);
continue;
}
for(int i=1; i<=4*(n-1)+1; i++)
b[i] = i;
int j=1;
for(j=1; j<=n; j++)
printf("%3d",b[j]);
printf("\n");
for(int k=1; k<=n-2; k++)
{
printf("%3d",b[4*(n-1)-k+1]);
for(int i=0; i<n-2; i++)
printf("   ");
printf("%3d\n",b[j+k-1]);
}
for(int i=4*(n-1)-(n-2); i>=j+n-2; i--)
printf("%3d",b[i]);
printf("\n");
}
return 0;
}

#### HDU 2153 仙人球的残影(类蛇形填数)

2016-03-30 20:53:19

#### HDOJ 2153-仙人球的残影

2016-03-13 16:50:52

#### hdu 2153 仙人球的残影

2014-03-24 12:04:15

#### HDU 2153 仙人球的残影

2014-03-27 23:26:46

#### HDU 2153 仙人球的残影

2014-04-15 18:36:31

#### HDU 2153 仙人球的残影.

2014-02-02 13:53:38

#### 仙人球的残影 2153

2014-04-27 02:53:29

#### HDOJ 2153 仙人球的残影

2015-11-27 19:58:00

#### hd 2153 仙人球的残影

2014-08-08 19:12:52

#### HDOJ 2153 仙人球的残影(水题)

2017-11-27 20:01:50

## 不良信息举报

HDU 2153 --仙人球的残影