How a poor club's spreadsheet beat baseball's richest rosters