Sieve of Eratosthenes
p = 2 NEW_LINE while p * p <= R : NEW_LINE INDENT if ( prime [ p ] == 0 ) : NEW_LINE INDENT for i in range ( p * p , R + 1 , p ) : NEW_LINE INDENT prime [ i ] = 1 NEW_LINE DEDENT DEDENT p += 1 NEW_LINE DEDENT