判断函数q1的功能,求出算法的时间复杂度______d

判断函数q1的功能,求出算法的时间复杂度______

def q1(n):
  i=2
  x=int(math.sqrt(n))
  while i<=x:
    if n%i==0:
       return False
    i+=1
  return True
答案
第1空:O(√n)

题目信息

题号:8176
题型:填空题
知识点:Python
难度:普通