def chislitel(n):
count=0
for i in range(2,int(n**0.5)+1):
if n%i==0:
if count:
return False
count+=1
return count==1
for i in range(174457,174506):
if chislitel(i):
print(i)
ответ: 174502
def chislitel(n):
count=0
for i in range(2,int(n**0.5)+1):
if n%i==0:
if count:
return False
count+=1
return count==1
for i in range(174457,174506):
if chislitel(i):
print(i)
ответ: 174502