Python3 program to find number of prime numbers in a subarray and performing updates
from math import ceil , floor , log NEW_LINE MAX = 1000 NEW_LINE def sieveOfEratosthenes ( isPrime ) : NEW_LINE INDENT isPrime [ 1 ] = False NEW_LINE for p in range ( 2 , MAX + 1 ) : NEW_LINE INDENT if p * p > MAX : NEW_LINE INDENT break NEW_LINE DEDENT DEDENT DEDENT