Hacker News new | ask | show | jobs
by tialaramex 901 days ago
That's correct. In practice it appears that the AoC inputs provide numbers which are always co-prime (ie have no common factors other than 1).
1 comments

Do you know if there were any inputs on this problem that had non-prime numbers? Like others, I used LCM in my code, but mine were all prime numbers.
I don't know, presumably Topaz (who creates AoC) would know, but isn't telling.

We would probably find out if some inputs aren't co-prime because the naive multiplying solution breaks, but they could be non-prime and yet co-prime, for example 15, 14, 11, 23 is a set of numbers which are co-prime, but neither 15 nor 14 are prime.