I'm justpointing out that the regex solution is terrible once the numbers start to get large. Efficiency is not the primary concern in golf but a soution should terminate before the sun dies :-)
Another problem I have with the regex solution is that you don't know how much is enough for any given input. I'd say twice the largest 2 number would do it but I'm not sure, there will be complications when some of the numbers share factors.
It's an interesting puzzle though, it has a very simple solution when there's only 2 numbers:
largest(m, n) = (m - 1) * (n - 1) - 1 |