by pavel_lishin · 2w ago · 0 comments
A student came up to Von Neumann on campus and decided to prank the great scientist. "Two trains are on the same track 50 miles apart and they hurtle towards each other at 50 mph. As they start, a really fast fly on the nose of one train flies towards th eother at 60mph. When it reaches the other train it immediately flies back to the first, then back to the second, and so on until the fly is crushed in the crash. How far will the fly fly?
Von Neumann thought for a moment, and then replied, "30 miles!" The student grinned. "I thought you'd know this one! The trains take half an hour to hit each other, therefore the fly will fly 30 miles."
Von Neumann started. "I didn't think of that, I summed the series."
———
Source: "The Prisoner's Dilemma" by William Poundstone
Write a program that reads this sequence and works out which player won the match.
there are multiple ways to compute this but not obvious way is to look at the end of the list and see who scored last point.
Also one train was a boy coming home (stative) and the dog was running