#include #include using namespace std; void f1(int); void f2(int); int main() { int c = 1; for (int i = 78000000; i <= 85000000; i++) { if (i % 2 == 1) f1(i); else f2(i); c = 1; } return 0; } void f1(int i) { int c = 1; if (int(sqrt(i)) * int(sqrt(i)) == i && i % int(sqrt(i)) == 0) c--; for (int j = 3; j <= sqrt(i); j += 2) { if (i % j == 0) c += 2; if (c > 4) break; } if (c == 4) { cout << i << " " << i << "\n"; } } void f2(int i) { int c = 0, max = 0; for (int j = 2; j <= sqrt(i); j++) { if (i % j == 0) { if (j % 2 == 1) { c++; if (j > max)max = j; } else if (i / j % 2 == 1) { c++; if (i / j > max) max = i / j; } } if (c > 4) break; } if (c == 4) { cout << i << " " << max << "\n"; } }