设电梯停在第x层,在第1层有y人没有乘电梯即直接上楼,那么不满意的总分为:
s=3[1+2+3+…+(33-x)]+3(1+2+…+y)+[1+2+…+(x-y-2)],
=
3×(33−x)(34−x) |
2 |
3y(y+1) |
2 |
(x−y−2)(x−y−1) |
2 |
=2x2-(y+102)x+2y2+3y+1684,
=2(x-
y+102 |
4 |
1 |
8 |
=2(x-
y+102 |
4 |
15 |
8 |
又当x=27,y=6时,s=316,
故当电梯停在第27层时,不满意的总分最小,最小值为316.
3×(33−x)(34−x) |
2 |
3y(y+1) |
2 |
(x−y−2)(x−y−1) |
2 |
y+102 |
4 |
1 |
8 |
y+102 |
4 |
15 |
8 |