Notice that once the
paybacksubroutine is defined, the all the calculations are done with a simple one-liner, followed by a single
sayto print the results, and then wrapped with
MAINto produce a command-line interface. Wee!
Alas, I believe this would be the slowest version yet but for the fact I replaced
$_in the given / when statement.