假设某年级有4个班,每班有45名同学。本学期有5门课程考试,每门课程成绩是百分制。假定每个同学的成绩记录包含:学号、姓名各门课程的成绩共7项,其中学号是一个10位的字符串,每个学生都有唯一的学号,并且这4个班的成绩分别放在4个数组中,完成以下操作:
由于有4个班,为了区别每个班,故构造二维数组,第一个维度表示班级,第二个维度表示班内学号。
stu
(学生),score
(成绩,用于构造链表)。
学生数组a
(stu[4][45]
),用于存储学生数据;循环变量p
(stu*
),n
(unsigned char
);平均分数组cj
(float[4][45]
),用于计算平均分,下标与a
数组一一对应。
成绩生成函数void f1(stu a[][45])
,平均成绩计算函数void f2(stu a[][45], float cj[][45])
,冒泡排序函数void f3(stu a[][45], float cj[][45])
,选择排序函数void f4(stu a[][45], float cj[][45])
,链表构造函数score* f5(float cj[][45])
,菜单打印函数void f6()
,输出函数void f7(stu a[][45])
、void f8(stu a[][45], float cj[][45])
、void f9(stu a[][45], score* b)
,链表释放函数void f10(score* a)
,主函数int main()
。
#include <iostream>
#include <ctime>
using namespace std;
struct stu // 学生
{
char id[11], name[9];
unsigned char score[5];
};
// 成绩生成函数
void f1(stu a[][45])
{
srand(time(nullptr));
for (signed char i = 0; i < 4; ++i)
for (signed char j = 0; j < 45; ++j)
for (signed char k = 0; k < 5; ++k)
a[i][j].score[k] = rand() % 101;
}
// 平均成绩计算函数
void f2(stu a[][45], float cj[][45])
{
for (signed char i = 0; i < 4; ++i)
for (signed char j = 0; j < 45; ++j)
{
cj[i][j] = *a[i][j].score;
for (signed char k = 1; k < 5; ++k)
cj[i][j] += a[i][j].score[k];
cj[i][j] /= 5;
}
}
// 冒泡排序
void f3(stu a[][45], float cj[][45])
{
for (signed char i = 0; i < 4; ++i)
for (signed char j = 44; j > 0; --j)
{
bool f = true;
for (signed char k = 0; k < j; ++k)
if (cj[i][k] < cj[i][k + 1])
{
float p = cj[i][k];
cj[i][k] = cj[i][k + 1];
cj[i][k + 1] = p;
stu q = a[i][k];
a[i][k] = a[i][k + 1];
a[i][k + 1] = q;
f = false;
}
if (f)
break;
}
}
// 选择排序
void f4(stu a[][45], float cj[][45])
{
for (signed char i = 0; i < 4; ++i)
for (signed char j = 0; j < 44; ++j)
{
signed char k = j;
bool f = false;
for (signed char m = k + 1; m < 45; ++m)
if (cj[i][k] < cj[i][m])
{
k = m;
f = true;
}
if (f)
{
float p = cj[i][k];
cj[i][k] = cj[i][j];
cj[i][j] = p;
stu q = a[i][k];
a[i][k] = a[i][j];
a[i][j] = q;
}
}
}
// 构造链表
struct score
{
float data;
score *p;
};
score *f5(float cj[][45])
{
float *p = *cj;
score *a = new score, *b = a;
a->data = *p;
unsigned char n = 179;
do
(b = b->p = new score)->data = *++p;
while (--n);
b->p = nullptr;
return a;
}
// 清屏并打印菜单
void f6()
{
system("cls");
cout << "\t\t学生信息管理系统\n请选择操作:\n0-退出\n1-生成成绩\n2-计算平均成绩\n3-对各班排序(冒泡)\n4-对各班排序(选择)\n5-构造链表\n6-输出\n7-输出平均分\n8-输出链表\n9-释放链表\n";
}
// 输出
void f7(stu a[][45])
{
stu *p = *a;
unsigned char n = 180;
cout << "ID\t\t姓名\t科一\t科二\t科三\t科四\t科五\n";
do
cout << p->id << '\t' << p->name << '\t' << int(p->score[0]) << '\t' << int(p->score[1]) << '\t' << int(p->score[2]) << '\t' << int(p->score[3]) << '\t' << int(p->score[4]) << endl;
while (++p, --n);
}
// 输出+平均分
void f8(stu a[][45], float cj[][45])
{
stu *p = *a;
unsigned char n = 180;
float *q = *cj;
cout << "ID\t\t姓名\t科一\t科二\t科三\t科四\t科五\t平均\n";
do
cout << p->id << '\t' << p->name << '\t' << int(p->score[0]) << '\t' << int(p->score[1]) << '\t' << int(p->score[2]) << '\t' << int(p->score[3]) << '\t' << int(p->score[4]) << '\t' << *q++ << endl;
while (++p, --n);
}
// 输出+链表
void f9(stu a[][45], score *b)
{
stu *p = *a;
cout << "ID\t\t姓名\t科一\t科二\t科三\t科四\t科五\t平均\n";
do
cout << p->id << '\t' << p->name << '\t' << int(p->score[0]) << '\t' << int(p->score[1]) << '\t' << int(p->score[2]) << '\t' << int(p->score[3]) << '\t' << int(p->score[4]) << '\t' << b->data << endl;
while (++p, b = b->p);
}
// 释放链表
void f10(score *a)
{
if (!a)
return;
score *b = a->p;
delete a;
do
{
b = (a = b)->p;
delete a;
} while (b);
}
// 主函数
int main()
{
stu a[4][45], *p = *a;
float cj[4][45];
unsigned char n = 0;
// 生成学号和姓名
do
{
p->name[2] = p->id[10] = '\0';
*p->id = '8';
p->id[1] = p->id[4] = '2';
p->id[2] = p->id[6] = '0';
p->id[3] = p->id[5] = '1';
*p->name = p->id[8] = '0' + (n % 45 + 1) / 10;
p->name[1] = p->id[9] = '0' + (n % 45 + 1) % 10;
p++->id[7] = '0' + n / 45 + 1;
} while (++n < 180);
f6();
char c;
score *g = nullptr; // g为链表头指针
do
{
cin >> c; // 用户操作编号
switch (c)
{
case '0':
goto F;
case '1':
f1(a);
break;
case '2':
f2(a, cj);
break;
case '3':
f3(a, cj);
break;
case '4':
f4(a, cj);
break;
case '5':
if (g)
f10(g);
g = f5(cj);
break;
case '6':
f7(a);
break;
case '7':
f8(a, cj);
break;
case '8':
f9(a, g);
break;
case '9':
f10(g);
g = nullptr;
break;
default:
system("cls");
cout << "输入错误!\n请重新输入!\n\t\t学生信息管理系统\n请选择操作:\n0-退出\n1-生成成绩\n2-计算平均成绩\n3-对各班排序(冒泡)\n4-对各班排序(选择)\n5-构造链表\n6-输出\n7-输出平均分\n8-输出链表\n9-释放链表\n ";
continue;
}
system("pause");
f6();
} while (true);
F:
system("pause");
return 0;
}
初始界面:
选择1而后选择6:
ID 姓名 科一 科二 科三 科四 科五
8201210101 01 25 86 35 17 51
8201210102 02 18 21 46 52 51
8201210103 03 7 45 42 78 18
8201210104 04 80 78 86 61 49
8201210105 05 100 3 4 67 49
8201210106 06 31 82 90 100 36
8201210107 07 1 58 41 97 72
8201210108 08 18 86 68 22 69
8201210109 09 23 56 6 70 55
8201210110 10 38 64 5 75 36
8201210111 11 12 5 69 1 12
8201210112 12 39 83 72 73 2
8201210113 13 58 39 53 70 79
8201210114 14 78 60 1 12 15
8201210115 15 36 84 73 7 37
8201210116 16 8 68 50 58 87
8201210117 17 21 69 57 88 65
8201210118 18 71 68 42 29 9
8201210119 19 17 93 44 87 40
8201210120 20 99 47 26 30 1
8201210121 21 34 48 81 27 69
8201210122 22 46 33 85 23 28
8201210123 23 44 60 74 48 75
8201210124 24 76 8 45 51 94
8201210125 25 75 28 43 72 98
8201210126 26 6 12 84 28 86
8201210127 27 48 96 75 34 65
8201210128 28 26 39 99 40 3
8201210129 29 1 92 69 9 34
8201210130 30 67 40 28 55 26
8201210131 31 55 89 91 12 81
8201210132 32 11 92 73 57 55
8201210133 33 57 27 82 58 8
8201210134 34 77 44 14 13 64
8201210135 35 54 13 83 71 25
8201210136 36 22 76 5 49 19
8201210137 37 82 64 67 70 88
8201210138 38 18 67 64 6 98
8201210139 39 29 90 55 12 2
8201210140 40 18 0 47 90 43
8201210141 41 3 44 27 58 76
8201210142 42 90 53 9 98 16
8201210143 43 26 35 29 76 73
8201210144 44 40 9 92 37 50
8201210145 45 44 74 66 12 72
8201210201 01 15 98 32 38 66
8201210202 02 19 97 78 41 3
8201210203 03 37 90 53 7 55
8201210204 04 99 99 17 0 59
8201210205 05 17 22 80 52 50
8201210206 06 22 50 54 59 72
8201210207 07 38 15 26 18 81
8201210208 08 71 92 41 23 7
8201210209 09 74 85 19 14 0
8201210210 10 34 61 94 64 97
8201210211 11 96 83 35 52 76
8201210212 12 27 11 75 22 67
8201210213 13 65 90 32 63 25
8201210214 14 58 44 72 92 36
8201210215 15 76 1 16 67 57
8201210216 16 77 98 38 96 10
8201210217 17 84 29 29 90 44
8201210218 18 58 2 62 53 19
8201210219 19 54 16 78 31 47
8201210220 20 48 74 88 57 49
8201210221 21 84 16 67 15 49
8201210222 22 68 58 95 56 15
8201210223 23 14 46 45 80 19
8201210224 24 76 53 86 41 8
8201210225 25 11 58 44 61 25
8201210226 26 43 42 20 71 47
8201210227 27 37 71 67 100 87
8201210228 28 73 21 78 56 33
8201210229 29 2 18 20 12 66
8201210230 30 9 69 15 5 37
8201210231 31 50 63 36 21 4
8201210232 32 50 43 75 9 54
8201210233 33 81 3 0 74 75
8201210234 34 76 18 13 70 65
8201210235 35 9 39 68 63 53
8201210236 36 80 5 1 36 17
8201210237 37 13 5 91 94 23
8201210238 38 30 28 37 31 48
8201210239 39 4 26 31 2 74
8201210240 40 42 9 53 61 89
8201210241 41 6 79 93 93 92
8201210242 42 38 55 31 56 8
8201210243 43 17 85 38 100 88
8201210244 44 50 85 52 81 43
8201210245 45 55 5 57 26 93
8201210301 01 15 100 51 23 72
8201210302 02 48 67 42 84 58
8201210303 03 81 67 22 73 76
8201210304 04 82 77 68 54 9
8201210305 05 18 84 15 31 1
8201210306 06 36 95 61 62 3
8201210307 07 15 65 95 99 12
8201210308 08 47 2 92 69 48
8201210309 09 92 4 11 8 67
8201210310 10 30 82 91 52 8
8201210311 11 69 4 64 85 54
8201210312 12 50 76 54 53 32
8201210313 13 79 27 68 35 61
8201210314 14 7 18 36 22 32
8201210315 15 3 52 14 38 87
8201210316 16 66 30 14 16 20
8201210317 17 43 45 94 70 99
8201210318 18 87 46 11 27 92
8201210319 19 58 46 64 2 14
8201210320 20 63 17 31 21 84
8201210321 21 21 21 66 41 58
8201210322 22 52 56 29 27 87
8201210323 23 76 95 45 39 87
8201210324 24 42 15 19 41 18
8201210325 25 46 61 56 89 86
8201210326 26 95 14 9 45 0
8201210327 27 39 17 81 83 91
8201210328 28 17 9 20 47 53
8201210329 29 77 15 25 56 61
8201210330 30 78 98 86 39 32
8201210331 31 76 3 60 0 14
8201210332 32 97 12 28 26 83
8201210333 33 40 59 40 46 28
8201210334 34 75 55 73 68 58
8201210335 35 81 87 44 28 30
8201210336 36 3 59 73 10 56
8201210337 37 72 49 28 42 52
8201210338 38 60 7 44 5 8
8201210339 39 81 73 93 31 39
8201210340 40 16 6 47 68 25
8201210341 41 57 9 15 71 41
8201210342 42 17 71 94 79 51
8201210343 43 2 87 28 0 32
8201210344 44 83 43 31 88 71
8201210345 45 86 0 64 16 58
8201210401 01 0 32 96 7 52
8201210402 02 34 40 51 84 9
8201210403 03 14 96 51 12 42
8201210404 04 41 64 88 96 74
8201210405 05 7 37 6 35 1
8201210406 06 99 54 74 44 91
8201210407 07 40 19 88 93 48
8201210408 08 11 36 44 39 67
8201210409 09 20 94 20 69 15
8201210410 10 3 10 1 32 27
8201210411 11 79 16 82 92 91
8201210412 12 99 45 78 65 41
8201210413 13 45 76 9 85 57
8201210414 14 0 60 56 77 34
8201210415 15 60 86 67 99 56
8201210416 16 38 16 25 89 75
8201210417 17 90 61 10 27 95
8201210418 18 86 76 29 87 40
8201210419 19 97 59 39 60 80
8201210420 20 98 11 27 9 98
8201210421 21 27 6 99 28 0
8201210422 22 93 99 84 94 80
8201210423 23 9 67 52 22 18
8201210424 24 78 42 97 45 14
8201210425 25 10 94 23 1 26
8201210426 26 86 9 26 79 9
8201210427 27 100 69 4 39 98
8201210428 28 69 8 24 34 19
8201210429 29 78 6 69 52 91
8201210430 30 80 95 29 90 84
8201210431 31 67 44 66 53 70
8201210432 32 49 24 24 83 98
8201210433 33 45 3 70 18 45
8201210434 34 18 12 94 20 46
8201210435 35 41 89 2 36 72
8201210436 36 89 17 93 70 62
8201210437 37 84 65 43 55 31
8201210438 38 39 70 82 27 43
8201210439 39 74 86 21 30 41
8201210440 40 99 60 94 14 24
8201210441 41 48 89 92 53 39
8201210442 42 2 74 57 100 70
8201210443 43 9 43 61 16 1
8201210444 44 100 52 49 7 27
8201210445 45 94 86 28 91 88
选择2而后选择7:
ID 姓名 科一 科二 科三 科四 科五 平均
8201210101 01 25 86 35 17 51 42.8
8201210102 02 18 21 46 52 51 37.6
8201210103 03 7 45 42 78 18 38
8201210104 04 80 78 86 61 49 70.8
8201210105 05 100 3 4 67 49 44.6
8201210106 06 31 82 90 100 36 67.8
8201210107 07 1 58 41 97 72 53.8
8201210108 08 18 86 68 22 69 52.6
8201210109 09 23 56 6 70 55 42
8201210110 10 38 64 5 75 36 43.6
8201210111 11 12 5 69 1 12 19.8
8201210112 12 39 83 72 73 2 53.8
8201210113 13 58 39 53 70 79 59.8
8201210114 14 78 60 1 12 15 33.2
8201210115 15 36 84 73 7 37 47.4
8201210116 16 8 68 50 58 87 54.2
8201210117 17 21 69 57 88 65 60
8201210118 18 71 68 42 29 9 43.8
8201210119 19 17 93 44 87 40 56.2
8201210120 20 99 47 26 30 1 40.6
8201210121 21 34 48 81 27 69 51.8
8201210122 22 46 33 85 23 28 43
8201210123 23 44 60 74 48 75 60.2
8201210124 24 76 8 45 51 94 54.8
8201210125 25 75 28 43 72 98 63.2
8201210126 26 6 12 84 28 86 43.2
8201210127 27 48 96 75 34 65 63.6
8201210128 28 26 39 99 40 3 41.4
8201210129 29 1 92 69 9 34 41
8201210130 30 67 40 28 55 26 43.2
8201210131 31 55 89 91 12 81 65.6
8201210132 32 11 92 73 57 55 57.6
8201210133 33 57 27 82 58 8 46.4
8201210134 34 77 44 14 13 64 42.4
8201210135 35 54 13 83 71 25 49.2
8201210136 36 22 76 5 49 19 34.2
8201210137 37 82 64 67 70 88 74.2
8201210138 38 18 67 64 6 98 50.6
8201210139 39 29 90 55 12 2 37.6
8201210140 40 18 0 47 90 43 39.6
8201210141 41 3 44 27 58 76 41.6
8201210142 42 90 53 9 98 16 53.2
8201210143 43 26 35 29 76 73 47.8
8201210144 44 40 9 92 37 50 45.6
8201210145 45 44 74 66 12 72 53.6
8201210201 01 15 98 32 38 66 49.8
8201210202 02 19 97 78 41 3 47.6
8201210203 03 37 90 53 7 55 48.4
8201210204 04 99 99 17 0 59 54.8
8201210205 05 17 22 80 52 50 44.2
8201210206 06 22 50 54 59 72 51.4
8201210207 07 38 15 26 18 81 35.6
8201210208 08 71 92 41 23 7 46.8
8201210209 09 74 85 19 14 0 38.4
8201210210 10 34 61 94 64 97 70
8201210211 11 96 83 35 52 76 68.4
8201210212 12 27 11 75 22 67 40.4
8201210213 13 65 90 32 63 25 55
8201210214 14 58 44 72 92 36 60.4
8201210215 15 76 1 16 67 57 43.4
8201210216 16 77 98 38 96 10 63.8
8201210217 17 84 29 29 90 44 55.2
8201210218 18 58 2 62 53 19 38.8
8201210219 19 54 16 78 31 47 45.2
8201210220 20 48 74 88 57 49 63.2
8201210221 21 84 16 67 15 49 46.2
8201210222 22 68 58 95 56 15 58.4
8201210223 23 14 46 45 80 19 40.8
8201210224 24 76 53 86 41 8 52.8
8201210225 25 11 58 44 61 25 39.8
8201210226 26 43 42 20 71 47 44.6
8201210227 27 37 71 67 100 87 72.4
8201210228 28 73 21 78 56 33 52.2
8201210229 29 2 18 20 12 66 23.6
8201210230 30 9 69 15 5 37 27
8201210231 31 50 63 36 21 4 34.8
8201210232 32 50 43 75 9 54 46.2
8201210233 33 81 3 0 74 75 46.6
8201210234 34 76 18 13 70 65 48.4
8201210235 35 9 39 68 63 53 46.4
8201210236 36 80 5 1 36 17 27.8
8201210237 37 13 5 91 94 23 45.2
8201210238 38 30 28 37 31 48 34.8
8201210239 39 4 26 31 2 74 27.4
8201210240 40 42 9 53 61 89 50.8
8201210241 41 6 79 93 93 92 72.6
8201210242 42 38 55 31 56 8 37.6
8201210243 43 17 85 38 100 88 65.6
8201210244 44 50 85 52 81 43 62.2
8201210245 45 55 5 57 26 93 47.2
8201210301 01 15 100 51 23 72 52.2
8201210302 02 48 67 42 84 58 59.8
8201210303 03 81 67 22 73 76 63.8
8201210304 04 82 77 68 54 9 58
8201210305 05 18 84 15 31 1 29.8
8201210306 06 36 95 61 62 3 51.4
8201210307 07 15 65 95 99 12 57.2
8201210308 08 47 2 92 69 48 51.6
8201210309 09 92 4 11 8 67 36.4
8201210310 10 30 82 91 52 8 52.6
8201210311 11 69 4 64 85 54 55.2
8201210312 12 50 76 54 53 32 53
8201210313 13 79 27 68 35 61 54
8201210314 14 7 18 36 22 32 23
8201210315 15 3 52 14 38 87 38.8
8201210316 16 66 30 14 16 20 29.2
8201210317 17 43 45 94 70 99 70.2
8201210318 18 87 46 11 27 92 52.6
8201210319 19 58 46 64 2 14 36.8
8201210320 20 63 17 31 21 84 43.2
8201210321 21 21 21 66 41 58 41.4
8201210322 22 52 56 29 27 87 50.2
8201210323 23 76 95 45 39 87 68.4
8201210324 24 42 15 19 41 18 27
8201210325 25 46 61 56 89 86 67.6
8201210326 26 95 14 9 45 0 32.6
8201210327 27 39 17 81 83 91 62.2
8201210328 28 17 9 20 47 53 29.2
8201210329 29 77 15 25 56 61 46.8
8201210330 30 78 98 86 39 32 66.6
8201210331 31 76 3 60 0 14 30.6
8201210332 32 97 12 28 26 83 49.2
8201210333 33 40 59 40 46 28 42.6
8201210334 34 75 55 73 68 58 65.8
8201210335 35 81 87 44 28 30 54
8201210336 36 3 59 73 10 56 40.2
8201210337 37 72 49 28 42 52 48.6
8201210338 38 60 7 44 5 8 24.8
8201210339 39 81 73 93 31 39 63.4
8201210340 40 16 6 47 68 25 32.4
8201210341 41 57 9 15 71 41 38.6
8201210342 42 17 71 94 79 51 62.4
8201210343 43 2 87 28 0 32 29.8
8201210344 44 83 43 31 88 71 63.2
8201210345 45 86 0 64 16 58 44.8
8201210401 01 0 32 96 7 52 37.4
8201210402 02 34 40 51 84 9 43.6
8201210403 03 14 96 51 12 42 43
8201210404 04 41 64 88 96 74 72.6
8201210405 05 7 37 6 35 1 17.2
8201210406 06 99 54 74 44 91 72.4
8201210407 07 40 19 88 93 48 57.6
8201210408 08 11 36 44 39 67 39.4
8201210409 09 20 94 20 69 15 43.6
8201210410 10 3 10 1 32 27 14.6
8201210411 11 79 16 82 92 91 72
8201210412 12 99 45 78 65 41 65.6
8201210413 13 45 76 9 85 57 54.4
8201210414 14 0 60 56 77 34 45.4
8201210415 15 60 86 67 99 56 73.6
8201210416 16 38 16 25 89 75 48.6
8201210417 17 90 61 10 27 95 56.6
8201210418 18 86 76 29 87 40 63.6
8201210419 19 97 59 39 60 80 67
8201210420 20 98 11 27 9 98 48.6
8201210421 21 27 6 99 28 0 32
8201210422 22 93 99 84 94 80 90
8201210423 23 9 67 52 22 18 33.6
8201210424 24 78 42 97 45 14 55.2
8201210425 25 10 94 23 1 26 30.8
8201210426 26 86 9 26 79 9 41.8
8201210427 27 100 69 4 39 98 62
8201210428 28 69 8 24 34 19 30.8
8201210429 29 78 6 69 52 91 59.2
8201210430 30 80 95 29 90 84 75.6
8201210431 31 67 44 66 53 70 60
8201210432 32 49 24 24 83 98 55.6
8201210433 33 45 3 70 18 45 36.2
8201210434 34 18 12 94 20 46 38
8201210435 35 41 89 2 36 72 48
8201210436 36 89 17 93 70 62 66.2
8201210437 37 84 65 43 55 31 55.6
8201210438 38 39 70 82 27 43 52.2
8201210439 39 74 86 21 30 41 50.4
8201210440 40 99 60 94 14 24 58.2
8201210441 41 48 89 92 53 39 64.2
8201210442 42 2 74 57 100 70 60.6
8201210443 43 9 43 61 16 1 26
8201210444 44 100 52 49 7 27 47
8201210445 45 94 86 28 91 88 77.4
选择4、5而后选择8:
ID 姓名 科一 科二 科三 科四 科五 平均
8201210137 37 82 64 67 70 88 74.2
8201210104 04 80 78 86 61 49 70.8
8201210106 06 31 82 90 100 36 67.8
8201210131 31 55 89 91 12 81 65.6
8201210127 27 48 96 75 34 65 63.6
8201210125 25 75 28 43 72 98 63.2
8201210123 23 44 60 74 48 75 60.2
8201210117 17 21 69 57 88 65 60
8201210113 13 58 39 53 70 79 59.8
8201210132 32 11 92 73 57 55 57.6
8201210119 19 17 93 44 87 40 56.2
8201210124 24 76 8 45 51 94 54.8
8201210116 16 8 68 50 58 87 54.2
8201210107 07 1 58 41 97 72 53.8
8201210112 12 39 83 72 73 2 53.8
8201210145 45 44 74 66 12 72 53.6
8201210142 42 90 53 9 98 16 53.2
8201210108 08 18 86 68 22 69 52.6
8201210121 21 34 48 81 27 69 51.8
8201210138 38 18 67 64 6 98 50.6
8201210135 35 54 13 83 71 25 49.2
8201210143 43 26 35 29 76 73 47.8
8201210115 15 36 84 73 7 37 47.4
8201210133 33 57 27 82 58 8 46.4
8201210144 44 40 9 92 37 50 45.6
8201210105 05 100 3 4 67 49 44.6
8201210118 18 71 68 42 29 9 43.8
8201210110 10 38 64 5 75 36 43.6
8201210130 30 67 40 28 55 26 43.2
8201210126 26 6 12 84 28 86 43.2
8201210122 22 46 33 85 23 28 43
8201210101 01 25 86 35 17 51 42.8
8201210134 34 77 44 14 13 64 42.4
8201210109 09 23 56 6 70 55 42
8201210141 41 3 44 27 58 76 41.6
8201210128 28 26 39 99 40 3 41.4
8201210129 29 1 92 69 9 34 41
8201210120 20 99 47 26 30 1 40.6
8201210140 40 18 0 47 90 43 39.6
8201210103 03 7 45 42 78 18 38
8201210102 02 18 21 46 52 51 37.6
8201210139 39 29 90 55 12 2 37.6
8201210136 36 22 76 5 49 19 34.2
8201210114 14 78 60 1 12 15 33.2
8201210111 11 12 5 69 1 12 19.8
8201210241 41 6 79 93 93 92 72.6
8201210227 27 37 71 67 100 87 72.4
8201210210 10 34 61 94 64 97 70
8201210211 11 96 83 35 52 76 68.4
8201210243 43 17 85 38 100 88 65.6
8201210216 16 77 98 38 96 10 63.8
8201210220 20 48 74 88 57 49 63.2
8201210244 44 50 85 52 81 43 62.2
8201210214 14 58 44 72 92 36 60.4
8201210222 22 68 58 95 56 15 58.4
8201210217 17 84 29 29 90 44 55.2
8201210213 13 65 90 32 63 25 55
8201210204 04 99 99 17 0 59 54.8
8201210224 24 76 53 86 41 8 52.8
8201210228 28 73 21 78 56 33 52.2
8201210206 06 22 50 54 59 72 51.4
8201210240 40 42 9 53 61 89 50.8
8201210201 01 15 98 32 38 66 49.8
8201210203 03 37 90 53 7 55 48.4
8201210234 34 76 18 13 70 65 48.4
8201210202 02 19 97 78 41 3 47.6
8201210245 45 55 5 57 26 93 47.2
8201210208 08 71 92 41 23 7 46.8
8201210233 33 81 3 0 74 75 46.6
8201210235 35 9 39 68 63 53 46.4
8201210221 21 84 16 67 15 49 46.2
8201210232 32 50 43 75 9 54 46.2
8201210237 37 13 5 91 94 23 45.2
8201210219 19 54 16 78 31 47 45.2
8201210226 26 43 42 20 71 47 44.6
8201210205 05 17 22 80 52 50 44.2
8201210215 15 76 1 16 67 57 43.4
8201210223 23 14 46 45 80 19 40.8
8201210212 12 27 11 75 22 67 40.4
8201210225 25 11 58 44 61 25 39.8
8201210218 18 58 2 62 53 19 38.8
8201210209 09 74 85 19 14 0 38.4
8201210242 42 38 55 31 56 8 37.6
8201210207 07 38 15 26 18 81 35.6
8201210238 38 30 28 37 31 48 34.8
8201210231 31 50 63 36 21 4 34.8
8201210236 36 80 5 1 36 17 27.8
8201210239 39 4 26 31 2 74 27.4
8201210230 30 9 69 15 5 37 27
8201210229 29 2 18 20 12 66 23.6
8201210317 17 43 45 94 70 99 70.2
8201210323 23 76 95 45 39 87 68.4
8201210325 25 46 61 56 89 86 67.6
8201210330 30 78 98 86 39 32 66.6
8201210334 34 75 55 73 68 58 65.8
8201210303 03 81 67 22 73 76 63.8
8201210339 39 81 73 93 31 39 63.4
8201210344 44 83 43 31 88 71 63.2
8201210342 42 17 71 94 79 51 62.4
8201210327 27 39 17 81 83 91 62.2
8201210302 02 48 67 42 84 58 59.8
8201210304 04 82 77 68 54 9 58
8201210307 07 15 65 95 99 12 57.2
8201210311 11 69 4 64 85 54 55.2
8201210335 35 81 87 44 28 30 54
8201210313 13 79 27 68 35 61 54
8201210312 12 50 76 54 53 32 53
8201210318 18 87 46 11 27 92 52.6
8201210310 10 30 82 91 52 8 52.6
8201210301 01 15 100 51 23 72 52.2
8201210308 08 47 2 92 69 48 51.6
8201210306 06 36 95 61 62 3 51.4
8201210322 22 52 56 29 27 87 50.2
8201210332 32 97 12 28 26 83 49.2
8201210337 37 72 49 28 42 52 48.6
8201210329 29 77 15 25 56 61 46.8
8201210345 45 86 0 64 16 58 44.8
8201210320 20 63 17 31 21 84 43.2
8201210333 33 40 59 40 46 28 42.6
8201210321 21 21 21 66 41 58 41.4
8201210336 36 3 59 73 10 56 40.2
8201210315 15 3 52 14 38 87 38.8
8201210341 41 57 9 15 71 41 38.6
8201210319 19 58 46 64 2 14 36.8
8201210309 09 92 4 11 8 67 36.4
8201210326 26 95 14 9 45 0 32.6
8201210340 40 16 6 47 68 25 32.4
8201210331 31 76 3 60 0 14 30.6
8201210343 43 2 87 28 0 32 29.8
8201210305 05 18 84 15 31 1 29.8
8201210316 16 66 30 14 16 20 29.2
8201210328 28 17 9 20 47 53 29.2
8201210324 24 42 15 19 41 18 27
8201210338 38 60 7 44 5 8 24.8
8201210314 14 7 18 36 22 32 23
8201210422 22 93 99 84 94 80 90
8201210445 45 94 86 28 91 88 77.4
8201210430 30 80 95 29 90 84 75.6
8201210415 15 60 86 67 99 56 73.6
8201210404 04 41 64 88 96 74 72.6
8201210406 06 99 54 74 44 91 72.4
8201210411 11 79 16 82 92 91 72
8201210419 19 97 59 39 60 80 67
8201210436 36 89 17 93 70 62 66.2
8201210412 12 99 45 78 65 41 65.6
8201210441 41 48 89 92 53 39 64.2
8201210418 18 86 76 29 87 40 63.6
8201210427 27 100 69 4 39 98 62
8201210442 42 2 74 57 100 70 60.6
8201210431 31 67 44 66 53 70 60
8201210429 29 78 6 69 52 91 59.2
8201210440 40 99 60 94 14 24 58.2
8201210407 07 40 19 88 93 48 57.6
8201210417 17 90 61 10 27 95 56.6
8201210432 32 49 24 24 83 98 55.6
8201210437 37 84 65 43 55 31 55.6
8201210424 24 78 42 97 45 14 55.2
8201210413 13 45 76 9 85 57 54.4
8201210438 38 39 70 82 27 43 52.2
8201210439 39 74 86 21 30 41 50.4
8201210416 16 38 16 25 89 75 48.6
8201210420 20 98 11 27 9 98 48.6
8201210435 35 41 89 2 36 72 48
8201210444 44 100 52 49 7 27 47
8201210414 14 0 60 56 77 34 45.4
8201210409 09 20 94 20 69 15 43.6
8201210402 02 34 40 51 84 9 43.6
8201210403 03 14 96 51 12 42 43
8201210426 26 86 9 26 79 9 41.8
8201210408 08 11 36 44 39 67 39.4
8201210434 34 18 12 94 20 46 38
8201210401 01 0 32 96 7 52 37.4
8201210433 33 45 3 70 18 45 36.2
8201210423 23 9 67 52 22 18 33.6
8201210421 21 27 6 99 28 0 32
8201210428 28 69 8 24 34 19 30.8
8201210425 25 10 94 23 1 26 30.8
8201210443 43 9 43 61 16 1 26
8201210405 05 7 37 6 35 1 17.2
8201210410 10 3 10 1 32 27 14.6
采用分函数编写,结构清晰,将复杂的问题简化为一个个函数的小问题,实现了系统的编写。缺点:增加了函数调用的时空成本。