← 返回 ibm 的题目列表Compare Products from Three Separate Lists
类型:online_judge
Given three lists A, B, and C, where each list contains some products. Write a program to compare products A[i] and B[j], then compare this result with C[k]. Categorize the products into different groups based on the comparison results. The variables should accept input in this manner.
Requirements:
Input: Three lists A, B, C, all containing integers.
Output: A tuple containing three groups corresponding to different comparison results.
Constraints:
1 <= A.length, B.length, C.length <= 1000
Example:
Input: A = [1, 2, 3], B = [2, 3, 4], C = [1, 1, 1]
Output: ([1], [2, 2], [3, 4, 3])
Example
Input
A = [1, 2, 3] B = [2, 3, 4] C = [1, 1, 1]