乾洗店 - 推理遊戲
By Iris
at 2011-02-15T13:55
at 2011-02-15T13:55
Table of Contents
※ 引述《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
: 那請問:剩下的送洗物要多少錢
: 謝謝~麻煩算法說明一下@@
--
: 小明將領帶跟袖套總共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
: 那請問:剩下的送洗物要多少錢
: 謝謝~麻煩算法說明一下@@
--
Tags:
推理遊戲
All Comments
Related Posts
數字序列的關係
By Dora
at 2011-02-14T22:57
at 2011-02-14T22:57
數字的推理問題
By Edith
at 2011-02-10T20:09
at 2011-02-10T20:09
數字的推理問題
By Xanthe
at 2011-02-08T22:27
at 2011-02-08T22:27
數獨
By Oscar
at 2011-02-05T00:16
at 2011-02-05T00:16
數獨
By John
at 2011-02-04T22:00
at 2011-02-04T22:00