x = Potion
y = Boots
z = Cloak
Since si Cloak ang pinakamahal, pwede syang laruin like z = x+2y , z=5x , z=3x+y.
Pinakamadali is hanapin yung lowest possible value ni z. Which we can do by letting the cheapest item to be zero.
x + y + z = 67
50x + 100y + 250z = 10,000
Let x be 0
100(y + z = 67)
100y + 100z = 6700
100y + 250z = 10,000
(-150z = -3300)/-150
z=22
y + 22 = 67
y= 67 - 22
y=45
Set#1(x=0,y=45,z=22)
Since nakuha na yung lowest value ni 22, add lang ng 1 sa kanya to find other possible sets.
Let z be 23, tapos ihiwalay na sya sa equation
67-23=
23x250=5,750
10,000-5750=4250
100(x + y = 44)
50x + 100y = 4250
100x + 100y = 4400
50x + 100y = 4250
(50x = 150)/50
x=3
3+y=44
y=41
Set#2(x=3,y=41,z=23)
Let z be 24(add uli ng 1)
67-24=43
10000-(24x250)=4000
100(x+y=43)
50x+100y=4000
100x+100y=4300
50x+100y=4000
(50x=300)/50
x=6
6+y=43
y=37
Set#3(x=6,y=37,z=24)
Observing the 3 first sets, habang tumataas ng isa si z, tumataas nang tatlo si x at bumababa naman ng apat si y.
z+1=(x+3)+(y-4)
So continuing that until the lowest positive number of y, the possible are number of each items sold are as follows.
Final Answer:
x is Potion
y is Boots
z is Cloak
Set#1(x=0,y=45,z=22)
Set#2(x=3,y=41,z=23)
Set#3(x=6,y=37,z=24)
Set#4(x=9,y=33,z=25)
Set#5(x=12,y=29,z=26)
Set#6(x=15,y=25,z=27)
Set#7(x=18,y=21,z=28)
Set#8(x=21,y=17,z=29)
Set#9(x=24,y=13,z=30)
Set#10(x=27,y=9,z=31)
Set#11(x=30,y=5,z=32)
Set#12(x=33,y=1,z=33)
Meron pa yan, kaso nga lang since items yan di pwede mag negative. Pwede din naman lets say nanakaw so bawas sa sales yun. Pero di ko na nilagay bwisit na ako eh