restructure zeta/** to storage/zeta/**
This commit is contained in:
24
storage/zeta/py/completed/2581.py
Normal file
24
storage/zeta/py/completed/2581.py
Normal file
@@ -0,0 +1,24 @@
|
||||
M, N = int(input()), int(input())
|
||||
P = []
|
||||
MP = []
|
||||
|
||||
|
||||
for i in range(2, N+1):
|
||||
for p in P:
|
||||
if i % p == 0:
|
||||
break
|
||||
elif p ** 2 > i:
|
||||
if i >= M:
|
||||
MP.append(i)
|
||||
P.append(i)
|
||||
break
|
||||
else:
|
||||
if i >= M:
|
||||
MP.append(i)
|
||||
P.append(i)
|
||||
|
||||
if MP:
|
||||
print(sum(MP))
|
||||
print(MP[0])
|
||||
else:
|
||||
print(-1)
|
||||
Reference in New Issue
Block a user