y = P / x;
if (x * y == P)...
dont we have % for that? :-)
otherwise i agree it's not worth the effort to think much about this problem, unless for mental gymnastics. Complexity of sqrt(n) nets...
Type: Posts; User: Vaphell; Keyword(s):
y = P / x;
if (x * y == P)...
dont we have % for that? :-)
otherwise i agree it's not worth the effort to think much about this problem, unless for mental gymnastics. Complexity of sqrt(n) nets...
going from sqrt(n) down to 1 and checking if n%x==0 is plenty fast
i whipped up awk code (to avoid the hassle of creating files) that finds 60 pairs for n=240078886800 (number pulled out of the 4...