Xmas Puzzle 2019(3)

L D[AR2P#0.0]

Lifetime Supporting Member
Join Date
Nov 2006
Location
UK
Posts
6,694
Another puzzle for you - answers by pm again.


Code:
You have 30 coins which you want to deposit in a bank 10km away. 
A taxi takes you but can only carry a maximum of 10 coins at a time.
The taxi charges 1 coin/km going towards the bank, and nothing when returning.
You can leave coins at the side of the road without fear of them being taken.

What is the maximum number of coins you can deposit at the bank?
 
I was able to figure out the answer by visualizing moving the coins one 10 coin batch at a time. Once LD is ready to reveal the correct answer, I’d like to see if anyone has figured out an actual equation or algorithm to solve this programmatically.
One thing is for sure: This scenario makes stuffing your savings in the mattress seem like sound investment advice ��
 
Last edited:
One solution:


Carry as many coins as possible 1km at time i.e. carry 10 coins 1km, go back get another 10, go back and get the final 10 leaving you with 27 at the 1km mark. Repeat until at the bank with 8 coins.


0km=30

1km=30-3=27
2km=27-3=24
3km=24-3=21
4km=21-3=18
5km=18-2=16
6km=16-2=14
7km=14-2=12
8km=12-2=10
9km=10-1=9
10km=9-1=8
 
One solution:


Carry as many coins as possible 1km at time i.e. carry 10 coins 1km, go back get another 10, go back and get the final 10 leaving you with 27 at the 1km mark. Repeat until at the bank with 8 coins.


0km=30

1km=30-3=27
2km=27-3=24
3km=24-3=21
4km=21-3=18
5km=18-2=16
6km=16-2=14
7km=14-2=12
8km=12-2=10
9km=10-1=9
10km=9-1=8

Why not simply pay the taxi 10 coins to carry ten coins to the bank and then pocket the remaining ten coins upon returning?
 
Give the taxi driver his 10 coins which he sets aside on the sidewalk and I set 10 coins of my own on the side walk and he drives me to the bank.
Then we both go back and pickup our money.
 

Similar Topics

What is the area of the square? Answers by pm please.
Replies
9
Views
2,857
A PLC rack has 100 input slots and the 100 slots can draw a total maximum of 1000mA. You have two types of input card available, either a 20 input...
Replies
15
Views
4,692
Find 3 palindromic numbers that, when added together, make 85709 (Numbers are in Base 10) Answers by pm please.
Replies
19
Views
6,472
It was too early for Easter, suppose I could have done Chinese New year, but that's too close to Valentines Day. Two parts : 1. A Logix5000...
Replies
1
Views
1,312
Two brothers were walking down the road. The first brother poses a question to the other: 'If I take the digits 1 through 9 and write them down...
Replies
4
Views
1,755
Back
Top Bottom