下面的算法是判断n是否为素数,其算法时间复杂度为()。void prime(int n){ 判断n是否是素数 */ for (i=2; isqrt(n)) printf(“%d is a prime number”, n); else printf(“%d is not a prime number”, n);}
单选题
下面的算法是判断n是否为素数,其算法时间复杂度为()。void prime(int n){ 判断n是否是素数 */ for (i=2; isqrt(n)) printf(“%d is a prime number”, n); else printf(“%d is not a prime number”, n);}