input: def consume_and_count(number, required, stock):
      """
      You are a hungry rabbit and have already eaten a certain amount of carrots, but you need to eat more to meet your daily requirement.
      This function should return a list containing:
      [ the total number of carrots consumed after the meal, 
        the number of carrots remaining after the meal ]
      If there are not enough carrots left, you will consume all the remaining carrots but will still be hungry.
  
      Example:
      * consume_and_count(5, 6, 10) -> [11, 4]
      * consume_and_count(4, 8, 9) -> [12, 1]
      * consume_and_count(1, 10, 10) -> [11, 0]
      * consume_and_count(2, 11, 5) -> [7, 0]
  
      Parameters:
      @number : integer
          the number of carrots you have already eaten.
      @required : integer
          the amount of carrots you still need to eat.
      @stock : integer
          the number of carrots available in stock
  
      Constraints:
      * 0 <= number <= 1000
      * 0 <= required <= 1000
      * 0 <= stock <= 1000
  
      Enjoy coding :)
      """
output:     
      total_consumed = number + min(required, stock)
      carrots_remaining = max(stock - required, 0)
      return [total_consumed, carrots_remaining]
  