I have to find the modulo of division of this numbers:
239^(10^9) and 10^9 + 13
239^(10^9) and 10^9 + 15
... etc up to 1001;
Using only native libraries in c++. How to do that? As you can see, the first number is about 3 billion symbols.
I tried finding the length of modulo periods, but they are mush longer, than 10, and even unsigned long long int
can't deal with such big numbers (239^10). Also I think that "big numbers" algorithms (storing a number as an array) will not work for me too (500*10^9) is too much operations.
BTW, this is supposed to work less, than in 5 hours.