#include <stdio.h>
int main(void)
{
   int i = 2;
   long n = 600851475143;
   for (; n > 1; i++)
     for (; n % i == 0; n /= i)
       printf("%d\n", i);
   return 0;
}


On Thu, Feb 25, 2016 at 7:15 PM, FRIGN <d...@frign.de> wrote:
> On Thu, 25 Feb 2016 23:03:14 +0100
> Mattias Andrée <maand...@kth.se> wrote:
>
> Hey Mattias,
>
>> I haven't spent too much time on it. But why don't we
>> need factor, it is in coreutils and is useful to have?
>
> why not just write a naive implementation, using no external libs.
> I'm sure you can write a prime factorizer in under 30 lines of code.
>
> Cheers
>
> FRIGN
>
> --
> FRIGN <d...@frign.de>
>

Reply via email to