Untitled
unknown
c_cpp
2 years ago
679 B
5
Indexable
#include <iostream>
#include <cmath>
int main() {
for (int i = 35000000; i <= 40000000; i++) {
int count = 0;
int sqrtI = std::round(std::sqrt(i));
for (int j = 1; j <= sqrtI; j++) {
if (i % j == 0) {
if (j % 2 == 1)
count++;
int k = i / j;
if (k % 2 == 1) {
count++;
if (j == k)
count--;
}
}
if (count > 5)
break;
}
if (count == 5)
std::cout << i << std::endl;
}
return 0;
}Editor is loading...