※ 引述《ki1010ds (机车)》之铭言:
: 小明将领带跟袖套总共30件送洗
assumption: x, y belong positive integer
x + y = 30
: 几天后,小明取回一包送洗物
: 发觉其中的数量是当初送洗的袖套的一半
: 与领带的三分之一,他付了27元
assumption: x, y =\= 0
ax/3 + by/2 = 27
: 那目前已知4个袖套和5条领带的洗涤费相同
5a = 4b, a = 4b/5
4bx/15 + by/2 = 27
8bx + 15by = 27*30
x/2, y/3
if y = 3, 9, 15, 21, 27, x die
y = 6, x = 24, 32b/5 + 3b = 27, b = 2.872340455319.......
12 18, 24b/5 + 6b = 27, b = 2.5, a = 2
18 12, 16b/5 + 9b = 27, b = 2.2131147540............
24 6, 8b/5 + 12b = 27, b = 1.98529411764..........
x = 18, y = 12, a = 2, b = 2.5
get back x = 9, y = 4, 9*2 + 4*2.5 = 28
remain x = 9, y = 8, 9*2 + 8*2.5 = 38
38 + 28 -27 = 39
: 那请问:剩下的送洗物要多少钱
: 谢谢~麻烦算法说明一下@@