Integer Max

ichayil (1)
Working on a Project Euler problem and the question asks for the largest prime number that is a factor of 600851475143. As you can see, this is significantly larger than the maximum of a long data type, which maxes out at 2147483647. Any ideas around this?

I'm running on Windows 32, so int64 is not a valid option for me. It seems like I'll likely have to use a different language to solve this problem.
dumb0t (21)
have u tried using int64?
firedraco (5495)
Use a bignum library.
buffbill (416)
have you tried using long long int?
modoran (1245)
sizeof (__int64) = sizeof (long long int) = 8 using MinGW X86, so it will work in your case.
Registered users can post here. Sign in or register to post.