Diferente pentru problema/sieve2 intre reviziile #1 si #2

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="sieve2") ==
Poveste şi cerinţă...
Giorgio is playing with the Sieve of Eratosthenes, one of the most ancient algorithms of all times. This algorithm starts with a row of all numbers from $2$ to $M$, then repeatedly selects the smallest non-selected number remaining in the row, erasing every multiple of it. At the end of the process, only prime numbers will have survived in the row!
 
Giorgio is trying to apply a similar idea, but with few differences.  Firstly, some numbers are missing from the starting row, which contains only $N$ numbers overall (each of them between $2$ and $M$), in increasing order $V_0, \ldots, V_{N-1}$. Secondly, every time Giorgio selects a number, he erases not only the \emph{multiples} of it but also its \emph{divisors}. As in the original algorithm, Giorgio keeps selecting numbers from the row (end erasing accordingly), stopping when every remaining number has been already selected; but he doesn't have to select numbers in increasing order. How many numbers can remain at the end of the process, at minimum?
h2. Date de intrare

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.