|
|
вернуться в форумRuntime error in python import math def getList(maxNumber): primeLst = [] for num in range(2,15000): if all(num%i!=0 for i in range(2,int(math.sqrt(num))+1)): primeLst.append(num) if len(primeLst)==maxNumber: return primeLst lst = [] for x in range(int(input())): lst.append(int(input())) primeNumbers = getList(max(lst)) for x in lst: print(primeNumbers[x-1]) I don't know why my code is error in testcase 2 Can anybody help me out of here ? |
|
|