Search:

Type: Posts; User: Vaphell; Keyword(s):

Search: Search took 0.10 seconds.

  1. Replies
    16
    Views
    994

    Re: For the math nerds...

    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...
  2. Replies
    16
    Views
    994

    Re: For the math nerds...

    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...
Results 1 to 2 of 2