input: from typing import List
  
  def min_operations(nums: List[int], k: int) -> int:
      """
      You are given a 0-indexed integer array nums, and an integer k.
  
      In one operation, you can remove one occurrence of the smallest element of nums.
  
      Return the minimum number of operations needed so that all elements of the array are greater than or equal to k.
  
      Examples:
      >>> nums = [2,11,10,1,3], k = 10
      3
      >>> nums = [1,1,2,4,9], k = 1
      0
      >>> nums = [1,1,2,4,9], k = 9
      4
  
      Constraints:
      1 <= nums.length <= 50
      1 <= nums[i] <= 10^9
      1 <= k <= 10^9
      The input is generated such that there is at least one index i such that nums[i] >= k.
      """
  
output: 
      nums.sort()
      operations = 0
      for num in nums:
          if num < k:
              operations += 1
          else:
              break
      return operations
  