设电梯停在第x层,在第一层有y个人没有乘电梯而直接上楼.那么不满意的总分为 S=3[1+2+…+(33-x)]+3(1+2+…+y)+[ 1+2+…+(x-y-2)]
=3y(1+y)/2+3(33-x)(34-x)/2+(x-y-1)(x-y-2)/2
=2x²-xy-102x+2y²+3y+1684
=2x²-(y+102)x+2y²+3y+1684
=2[x²-(y+102)/2+(y+102) ²/4² ]+ (15y²-180y+3068)/8
=2[x-(y+102)/4]²+15(y-6)²/8 +316
≥316
显然,当y=6、x=27 时,最小值是316