input: Write a function to print out the first n prime numbers using the Sieve of Eratosthenes algorithm. If n is less than or equal to 0, return an empty list.
  def print_first_n_primes(n):
      if n <= 0:
          return []
      primes = [True] * (n*n)
      primes[0] = primes[1] = False
      for i in range(2, int((n*n)**0.5)+1):
          if primes[i]:
              for j in range(i*i, n*n, i):
                  primes[j] = False
  
      prime_numbers = []
      count = 0
      for i in range(len(primes)):
          if primes[i]:
              prime_numbers.append(i)
              count += 1
              if count >= n:
                  break
      return prime_numbers
  
  assert print_first_n_primes(0)==[]
  assert print_first_n_primes(1)==[2]
  assert print_first_n_primes(5)==[2, 3, 5, 7, 11]
  assert print_first_n_primes(10)==[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
  assert print_first_n_primes(-5)==[]
output: def print_first_n_primes(n):
      if n <= 0:
          return []
      primes = [True] * (n*n)
      primes[0] = primes[1] = False
      for i in range(2, int((n*n)**0.5)+1):
          if primes[i]:
              for j in range(i*i, n*n, i):
                  primes[j] = False
  
      prime_numbers = []
      count = 0
      for i in range(len(primes)):
          if primes[i]:
              prime_numbers.append(i)
              count += 1
              if count >= n:
                  break
      return prime_numbers