Forum

> > Off Topic > Are you good in math? than solve this question
Forums overviewOff Topic overviewLog in to reply

English Are you good in math? than solve this question

5 replies
To the start Previous 1 Next To the start

old Are you good in math? than solve this question

VenomEXsoldier
User Off Offline

Quote
If your good at math or very smart, than solve this which looks impossiable but its not, there is a way

I have 100$ and I want to have 100 parts. At the same time I only want to spend 100$ that I have.

List...

Compass 5$ each/1

Rulers 2$ each/1

Pencils 10cents each/1

Make the list equal to 100$ and 100 Parts (the supplies that were listed) write down the answer. This is not easy so if u think u can try. Don't think this is simple. I know the answer so I will be the judge.

This is just for fun so write what you can

old Re: Are you good in math? than solve this question

YellowBanana
BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function calculate()
	for a =10,80,10 do
		for b = 1,20 do
			for c = 1,20 do
				if((a * 0.1 + b * 2 + c * 5) == 100) then
					if(a + b + c == 100) then
						print(a.." pencils, "..b.." rules, "..c.." Compass")
					end
				end
			end
		end
	end
end

calculate()

output: 70 pencils, 19 rules, 11 Compass

What do i get?

old Re: Are you good in math? than solve this question

VenomEXsoldier
User Off Offline

Quote
YellowBanana has written
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function calculate()
	for a =10,80,10 do
		for b = 1,20 do
			for c = 1,20 do
				if((a * 0.1 + b * 2 + c * 5) == 100) then
					if(a + b + c == 100) then
						print(a.." pencils, "..b.." rules, "..c.." Compass")
					end
				end
			end
		end
	end
end

calculate()

output: 70 pencils, 19 rules, 11 Compass

What do i get?


Wow thats very good, but for now I have nothing to give lol like I said its just for fun but just a question, can u tell me where u get this 10,80,10?

Please try to explain more of how did u get it the answer. I did not get what u wrote there. My class gave us this question and everybody could not get it but only one person

old Re: Are you good in math? than solve this question

YellowBanana
BANNED Off Offline

Quote
Sure..
This is just a lua script but i could have easily done it by hand too.

U have to solve this system:

a * 0.1 + b * 2 + c * 5 = 100 ( all the parts cost 100 together)
a + b + c = 100 ( all the parts together are 100)

furthermore you know that you always must buy 10*n ( 10,20,30,40 etc.) pencils, because if you cannot divide it by 10, the total sum will be something like xx.80, and the other parts can only have round integers..

lets say you have 53 pencils.. you will never be able to get the costs of the parts to 100.. because you have 5.3 , and the other parts can never make 94.7.

for the rest, u just have to guess a bit
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview