top | item 38820807 (no title) Yajirobe | 2 years ago > But if we multiply the numbers together we get a number that is divisible by every number in the table.Wouldn’t LCM be the correct/more general approach? The periods could have common factors, right? discuss order hn newest tialaramex|2 years 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). dunham|2 years ago 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. load replies (1)
tialaramex|2 years 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). dunham|2 years ago 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. load replies (1)
dunham|2 years ago 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. load replies (1)
tialaramex|2 years ago
dunham|2 years ago