1 câu trả lời
n = int(input("Nhap n: "))
a = []
for i in range(0,n+1):
a.append(int(0))
a[1]=1
# Sang nguyen to
for i in range(2,n // 2+1):
if a[i]==0:
for j in range(2,n // i+1):
a[i*j]=1
# Xuat
for i in range(2,n+1):
if a[i]==0:
print(i)