cswork / OA打开练习工作台

UkgOA #2

Number of Duplicates

估计简单评测数据准备中,可先阅读题面

考点(AI 标注)哈希计数

You are given a list of products, where each product has a name, price, and weight. Your task is to determine how many duplicate products are in the list. A duplicate product is defined as a product that has the same name, price, and weight as another product in the list. Function Parameters: name: A list of strings where name[i] represents the name of the product at index i. price: A list of integers where price[i] represents the price of the product at index i. weight: A list of integers where weight[i] represents the weight of the product at index i. Returns: An integer denoting the number of duplicate products in the list. Constraints

  • 1 ≤ n ≤ 10⁵
  • 1 ≤ price[i], weight[i] ≤ 1000
  • name[i] consists of lowercase English letters (a-z) and has at most 10 characters.