这道题又扣了一分,得到了19分,不知哪里错了。。。
import math
ipt = input().split(" ")
M = int(ipt[0])
N = int(ipt[1])
r_list = ['2','3','5','7']
for i in range(10000):
if i%2 == 0:
continue
else:
for j in range(3,int(math.sqrt(i))+1):
if i%j == 0:
break
if j == int(math.sqrt(i)):
r_list.append(str(i))
if len(r_list)>=N:
break
if len(r_list)>=N:
break
r_list = r_list[M-1:N]
for i in range(0,len(r_list),10):
r_str = " ".join(r_list[i:i+10])
print(r_str)