So since I have to program with C++ for the
programming competition, and exercise 2 needs long long to store the number 600,851,475,143, I went ahead with it. I remember from last time I used it that this data type has a range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. However, when I used it the C-Free GCC compiler gave me an error indicating that the number is too big to use with long long. I tried to use __int64 instead, still same problem. I tried to use unsigned long long since it has a larger range of 0 to 18,446,744,073,709,551,615, but to no avail.
If it were a memory issue, even Matlab should have given me an error ( I used num2str to find first 2 prime factors since functions primes and factor can only acquire numbers up to 2^23 = 4294967296). What should I do?
PS: I once had an assignment to use linked lists to reserve really large integers and overload operators to handle them arithmetically, bu they're a hassle and
I really don't want to use it!