소수문제 털어가기 9020 골드바흐 제외, 아마 대입 여러번 해서 옳은거 하면 될듯
This commit is contained in:
16
zeta_python/completed/1929.py
Normal file
16
zeta_python/completed/1929.py
Normal file
@@ -0,0 +1,16 @@
|
||||
M, N = map(int, input().split())
|
||||
P = []
|
||||
|
||||
for i in range(2, N+1):
|
||||
for p in P:
|
||||
if i % p == 0:
|
||||
break
|
||||
elif p ** 2 > i:
|
||||
if i >= M:
|
||||
print(i)
|
||||
P.append(i)
|
||||
break
|
||||
else:
|
||||
if i >= M:
|
||||
print(i)
|
||||
P.append(i)
|
||||
Reference in New Issue
Block a user