可以使用以下c语言代码来实现: int countFactors(int n) { int count = 0; for (int i=1; i<=sqrt(n); i++) { if (n%i == 0) { if (n/i == i) count++;
else
count = count + 2;
}
}
return count;
}
可以使用以下c语言代码来实现: int countFactors(int n) { int count = 0; for (int i=1; i<=sqrt(n); i++) { if (n%i == 0) { if (n/i == i) count++;
else
count = count + 2;
}
}
return count;
}