Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using std::cout;
- static bool primo(unsigned long n) {
- for (unsigned short i = 3; i < sqrt(n) + 1; i += 2)
- if (n % i == 0) return false;
- return true;
- }
- static unsigned long long num = 67590067757306080;
- int main() {
- for (unsigned long i = pow(2, 27) + 1, max = pow(2, 28); i < max; i += 2)
- if (num % (i - 1) == 0) if (primo(i)) if (primo(num / (i - 1) + 1)) {
- cout << i << ' ' << num / (i - 1) + 1 << '\n';
- break;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment