please help:
3 traveling salesmen are traveling together and stop in a small town for one night. They've been to the town before, and so know of a decent hotel that they can stay in with two beds and a couch for 30$ a night. They decide to split the cost equally, and each pay 10$. Later that evening, the manager of the hotel says to his bellhop "Hey, bellhop. I like those guys; they're good people, they come to our hotel often and they clean up after themselves. Why don't you head down to their room and give them a 5$ discount?" so the bellhop goes to give the 5$ to the salesmen.
As the bellhop is on his way, he thinks, wait- I don't like those guys. they never tip me, and besides how am I going to split 5$ equally into three parts?
So the bellhop takes two dollars for himself and gives the salesmen 3$ instead of 5.
At this point, the salesmen have all paid 9$ (30/3=10, 10-[3/3]=9)
9x3= 27 (the total cost after their 3 dollar discount)
the bellhop only took two, and 27+2=29, not 30, so what happened to that 1$?
this is plaguing me.
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
The hotel actually only took in $25 after the discount, so the $2 tip the bellhop took adds up to $27 plus the $3 the patrons get back.
i will't think of of something for polynomial time yet a owing to cut back the type of available paths calculated: # roads traveled (#rt to any quantity extra) = #cities - a million take the #r maximum inexpensive roads and be conscious regardless of if that's obtainable to make a path. If not upload the subsequent chaepest highway. If not proceed till ultimately you're able to make a path. as without postpone for the reason that's made that's the main inexpensive. this must be lots speedier because of the fact odds are that each and every and each tried path would be lots shorter than an finished path so the interation ought to opt to not be as extensive regardless of if the accomplished type of interations are not from now on signifigantly decreased.