Robbie Hatley’s Solutions, in Perl, for The Weekly Challenge #016 (“Pythagoras Pie Puzzle” and “Validating Bitcoin Addresses”)
For those not familiar with "The Weekly Challenge", it is a weekly programming puzzle with two parts, with a new pair of tasks each Monday. You can find it here: The Weekly Challenge The tasks for challenge #016 are as follows: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 016-1: Pythagoras Pie Puzzle Proposed by Jo Christian Oterhals. At a party a pie is to be shared by 100 guests. The first guest gets 1% of the pie, the second guest gets 2% of the remaining pie, the third gets 3% of the remaining pie, the fourth gets 4%, and so on. Write a script that figures out which guest gets the largest piece of pie. I simply performed the calculations described. What happened, I found surprising. Robbie Hatley's Perl Solution to The Weekly Challenge 016-1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Task 016-2: Validating Bitcoin Addresses Write a script to validate a given bitcoin address. Most Bitcoin addr...