def IsPrime(a): for i in range(2,round(a**0.5)+1): if a%i == 0: return(False) return(True) x = int(input()) z = [] for i in range(101-x, 101+x+1): if IsPrime(i) and i != 101: z.append(i) if len(z)==0: print("嗯") else: print(*z)
def IsPrime(a): for i in range(2,round(a**0.5)+1): if a%i == 0: return(False) return(True) x = int(input()) z = [] for i in range(101-x, 101+x+1): if IsPrime(i) and i != 101: z.append(i) if len(z)==0: print("嗯") else: print(*z)
這麼簡單還要send程式碼
而且程式碼還是錯的
def IsPrime(a): for i in range(2,round(a**0.5)+1): if a%i == 0: return(False) return(True) x = int(input()) z = [] for i in range(101-x, 101+x+1): if IsPrime(i) and i != 101: z.append(i) if len(z)==0: print("嗯") else: print(*z)
這麼簡單還要send程式碼而且程式碼還是錯的
...