4 ms·
Of course it's a coding problem, but the one efficient solution I could find right now requires tools that clearly fall in the category of "number theory" (even
by detaro 9y ago
Of course it's a coding problem, but the one efficient solution I could find right now requires tools that clearly fall in the category of "number theory" (even if it hasn't been teached as such), I wouldn't trust on them being part of high-school maths for everyone, and they're going to extremely seldom come up in practice for the vast majority of programmers. And inefficient solutions are going to be way to slow.