Numbers whose count of divisors is prime: Difference between revisions

m
C++ - only test square numbers
(→‎{{header|Raku}}: Add a Raku example)
m (C++ - only test square numbers)
Line 103:
return EXIT_FAILURE;
}
int count = 0;
int width = static_cast<int>(std::ceil(std::log10(limit)));
for (int counti = 01;; ++i) {
for ( int n = 1;i n* < limiti; ++n) {
if (n >= limit)
break;
int divisors = divisor_count(n);
if (divisors != 2 && is_prime(divisors))
1,777

edits